aboutsummaryrefslogtreecommitdiff
path: root/absl/base/policy_checks.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/base/policy_checks.h')
-rw-r--r--absl/base/policy_checks.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/absl/base/policy_checks.h b/absl/base/policy_checks.h
index 06b32439..b8cd4c94 100644
--- a/absl/base/policy_checks.h
+++ b/absl/base/policy_checks.h
@@ -44,17 +44,17 @@
// Toolchain Check
// -----------------------------------------------------------------------------
-// We support MSVC++ 14.0 update 2 and later.
+// We support Visual Studio 2017 (MSVC++ 15.0) and later.
// This minimum will go up.
-#if defined(_MSC_FULL_VER) && _MSC_FULL_VER < 190023918 && !defined(__clang__)
-#error "This package requires Visual Studio 2015 Update 2 or higher."
+#if defined(_MSC_VER) && _MSC_VER < 1910 && !defined(__clang__)
+#error "This package requires Visual Studio 2017 (MSVC++ 15.0) or higher."
#endif
-// We support gcc 4.7 and later.
+// We support GCC 7 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__ < 7
+#error "This package requires GCC 7 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
// -----------------------------------------------------------------------------