diff options
Diffstat (limited to 'absl/base')
-rw-r--r-- | absl/base/policy_checks.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/absl/base/policy_checks.h b/absl/base/policy_checks.h index 06b32439..d13073c8 100644 --- a/absl/base/policy_checks.h +++ b/absl/base/policy_checks.h @@ -50,11 +50,11 @@ #error "This package requires Visual Studio 2015 Update 2 or higher." #endif -// We support gcc 4.7 and later. +// We support gcc 5 and later. // This minimum will go up. #if defined(__GNUC__) && !defined(__clang__) -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) -#error "This package requires gcc 4.7 or higher." +#if __GNUC__ < 5 +#error "This package requires gcc 5 or higher." #endif #endif @@ -69,13 +69,15 @@ // C++ Version Check // ----------------------------------------------------------------------------- -// Enforce C++11 as the minimum. Note that Visual Studio has not -// advanced __cplusplus despite being good enough for our purposes, so -// so we exempt it from the check. -#if defined(__cplusplus) && !defined(_MSC_VER) -#if __cplusplus < 201103L -#error "C++ versions less than C++11 are not supported." -#endif +// Enforce C++14 as the minimum. +#if defined(_MSVC_LANG) +#if _MSVC_LANG < 201402L +#error "C++ versions less than C++14 are not supported." +#endif // _MSVC_LANG < 201402L +#elif defined(__cplusplus) +#if __cplusplus < 201402L +#error "C++ versions less than C++14 are not supported." +#endif // __cplusplus < 201402L #endif // ----------------------------------------------------------------------------- |