Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Unified Diff: util/stdlib/string_number_conversion.cc

Issue 809833002: string_number_conversions: only check CXX_LIBRARY_HAS_CONSTEXPR (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/stdlib/string_number_conversion.cc
diff --git a/util/stdlib/string_number_conversion.cc b/util/stdlib/string_number_conversion.cc
index de8b5788e37da4845c124c06776cd2089117752c..8ab949efeaf85404b931bc38a7e9dccd9f4ba67e 100644
--- a/util/stdlib/string_number_conversion.cc
+++ b/util/stdlib/string_number_conversion.cc
@@ -25,11 +25,11 @@
#include "util/stdlib/cxx.h"
// CONSTEXPR_STATIC_ASSERT will be a normal static_assert if the C++ library is
-// the C++11 library. If using an older C++ library when compiling C++11 code,
-// the std::numeric_limits<>::min() and max() functions will not be marked as
-// constexpr, and thus won’t be usable with C++11’s static_assert(). In that
-// case, a run-time CHECK() will have to do.
-#if CXX_LIBRARY_VERSION >= 2011 && CXX_LIBRARY_HAS_CONSTEXPR
+// the C++11 library. If using an older C++ library, the
+// std::numeric_limits<>::min() and max() functions will not be marked as
+// constexpr, and thus won’t be usable with static_assert(). In that case, a
+// run-time CHECK() will have to do.
+#if CXX_LIBRARY_HAS_CONSTEXPR
#define CONSTEXPR_STATIC_ASSERT(condition, message) \
static_assert(condition, message)
#else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698