Skip to content

Commit 5bc74d5

Browse files
authored
For GCC10, we should check __cplusplus >= 201709L when determining if c++20 is supported (#949)
1 parent c54ba6f commit 5bc74d5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/etl/profiles/determine_compiler_language_support.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ SOFTWARE.
5858
#endif
5959
#elif defined(ETL_COMPILER_ARM5)
6060
#define ETL_CPP20_SUPPORTED 0
61+
#elif defined(ETL_COMPILER_GCC)
62+
#if (__GNUC__ == 10)
63+
#define ETL_CPP20_SUPPORTED (__cplusplus >= 201709L)
64+
#else
65+
#define ETL_CPP20_SUPPORTED (__cplusplus >= 202002L)
66+
#endif
6167
#else
6268
#define ETL_CPP20_SUPPORTED (__cplusplus >= 202002L)
6369
#endif

0 commit comments

Comments
 (0)