Skip to content

Commit 6f180c8

Browse files
author
Hana Dusíková
committed
remove GNU literals for GCC10+
1 parent e6d31c5 commit 6f180c8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

include/ctre/literals.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,14 @@ namespace literals {
3131
#ifdef __INTEL_COMPILER
3232
// not enable literals
3333
#elif defined __GNUC__
34-
#if not(__GNUC__ == 9)
34+
#if __GNUC__ < 9
3535
#define CTRE_ENABLE_LITERALS
36+
#elif __GNUC__ >= 10
37+
#if !(__cpp_nontype_template_parameter_class || (__cpp_nontype_template_args >= 201911L))
38+
// newer versions of GCC will give error when trying to use GNU extension
39+
#else
40+
#define CTRE_ENABLE_LITERALS
41+
#endif
3642
#endif
3743
#endif
3844

0 commit comments

Comments
 (0)