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
2024-04-03 14:26:18 -04:00
parent c9cc3dc646
commit 80a5a86514
2 changed files with 4 additions and 0 deletions

View File

@@ -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