mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-17 03:02:24 +01:00
GCC 5.2 only has nullptr if running in C++11 mode (or greater). Every
GCC since 4.7 has a __cplusplus macro we can check to see what version of the C++ standard is being used. This change preserves the logic that was used for GCC 4, but for GCC versions greater than 4, we will assume it has nullptr if and only if the __cplusplus macro is large enough. This allows catch to work on GCC 5.2 when it is not running in C++11 mode.
This commit is contained in:
parent
74eef52644
commit
c8b4c922a5
@ -67,7 +67,7 @@
|
|||||||
// GCC
|
// GCC
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
|
||||||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 && defined(__GXX_EXPERIMENTAL_CXX0X__) )
|
#if (__GNUC__ > 4 && __cplusplus >= 201103L) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 && defined(__GXX_EXPERIMENTAL_CXX0X__) )
|
||||||
# define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR
|
# define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user