Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

etl::variant throws error during compilation with IAR 9.40.1 #771

Open
H0ppl opened this issue Oct 10, 2023 · 1 comment
Open

etl::variant throws error during compilation with IAR 9.40.1 #771

H0ppl opened this issue Oct 10, 2023 · 1 comment

Comments

@H0ppl
Copy link

H0ppl commented Oct 10, 2023

Hi, I have issues with etl::variant and IAR 9.40.1.

I have the following etl_profile:

#ifndef ETL_PROFILE_H
#define ETL_PROFILE_H

#define ETL_TARGET_DEVICE_GENERIC
#define ETL_TARGET_OS_NONE
#define ETL_CPP11_SUPPORTED 1
#define ETL_CPP14_SUPPORTED 1
#define ETL_CPP17_SUPPORTED 0
#define ETL_COMPILER_IAR

#endif

When I try to compile the project just with the necessary include for etl::variant #include "etl/variant.h", I get the following error, poiting to U8 in include\etl\private\variant_legacy.h",163:

template <typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8>
^
"Error[Pe040]: expected an identifier

When I remove the #include "private/variant_legacy.h" in variant.h, the code is compiling without errors:

#ifndef ETL_VARIANT_INCLUDED
#define ETL_VARIANT_INCLUDED

#include "platform.h"

#if !ETL_USING_CPP11 || defined(ETL_USE_LEGACY_VARIANT)
  #include "private/variant_legacy.h"  // etl::variant
#else
  //#include "private/variant_legacy.h"   // etl::legacy::variant -> removed
  #include "private/variant_variadic.h"  // etl::variant
#endif

#endif

Not sure if the include here is correct or if there's another error in my code or cmake configuration which leads to the compilation problem.

@jwellbelove
Copy link
Contributor

I will try to download the relevant IAR compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants