GNU: Fix detection of C++ 11 mode in GCC 4.{4,5,6}

These versions of the compiler have experimental C++11 support and so do
not define `__cplusplus` correctly, but do define a feature macro we can
use to distinguish this mode.
This commit is contained in:
Brad King committed 2024-04-05 07:38:14 -04:00
1 parent c9cc3dc646
commit 80a5a86514
2 files changed
+4

No files matched your search

+2
View File
@@ -78,6 +78,8 @@ char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
# else
# define CXX_STD __cplusplus
# endif
#elif __cplusplus == 1 && defined(__GXX_EXPERIMENTAL_CXX0X__)
# define CXX_STD CXX_STD_11
#else
# define CXX_STD __cplusplus
#endif
@@ -47,6 +47,8 @@ struct Outputter;
# else
# define CXX_STD __cplusplus
# endif
#elif __cplusplus == 1 && defined(__GXX_EXPERIMENTAL_CXX0X__)
# define CXX_STD CXX_STD_11
#else
# define CXX_STD __cplusplus
#endif