diff options
Diffstat (limited to 'googletest/include')
-rw-r--r-- | googletest/include/gtest/internal/gtest-port.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 5d81adb..6db191b 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -257,6 +257,19 @@ // deprecated; calling a marked function // should generate a compiler warning +// The definition of GTEST_INTERNAL_CPLUSPLUS_LANG comes first because it can +// potentially be used as an #include guard. +#if defined(_MSVC_LANG) +#define GTEST_INTERNAL_CPLUSPLUS_LANG _MSVC_LANG +#elif defined(__cplusplus) +#define GTEST_INTERNAL_CPLUSPLUS_LANG __cplusplus +#endif + +#if !defined(GTEST_INTERNAL_CPLUSPLUS_LANG) || \ + GTEST_INTERNAL_CPLUSPLUS_LANG < 201402L +#error C++ versions less than C++14 are not supported. +#endif + #include <ctype.h> // for isspace, etc #include <stddef.h> // for ptrdiff_t #include <stdio.h> |