Chromium Code Reviews| Index: util/stdlib/cxx.h |
| diff --git a/util/stdlib/cxx.h b/util/stdlib/cxx.h |
| index 261a6c11239fbc3e365ba2bb7783ce76b3e78b7f..4ccd5dd0ace4361c766633fdb0809a07ec29387f 100644 |
| --- a/util/stdlib/cxx.h |
| +++ b/util/stdlib/cxx.h |
| @@ -15,6 +15,15 @@ |
| #ifndef CRASHPAD_UTIL_STDLIB_CXX_H_ |
| #define CRASHPAD_UTIL_STDLIB_CXX_H_ |
| +#include "build/build_config.h" |
| + |
| +#if defined(COMPILER_MSVC) |
| + |
| +#define CXX_LIBRARY_VERSION 2011 |
| +#define CXX_HAS_CONSTEXPR 1 |
|
Mark Mentovai
2014/12/15 23:44:23
I thought you said that MSVC didn’t have constexpr
scottmg
2014/12/15 23:48:38
Ugh. :( Fixed, and util/stdlib/string_number_conve
|
| + |
| +#else // !COMPILER_MSVC |
| + |
| // <ciso646> doesn’t do very much, and under libc++, it will cause the |
| // _LIBCPP_VERSION macro to be defined properly. Under libstdc++, it doesn’t |
| // cause __GLIBCXX__ to be defined, but if _LIBCPP_VERSION isn’t defined after |
| @@ -50,8 +59,12 @@ |
| __GLIBCXX__ != 20120702ul) || /* GCC 4.5.4 */ \ |
| (defined(_LIBCPP_VERSION))) |
| #define CXX_LIBRARY_VERSION 2011 |
| +#define CXX_HAS_CONSTEXPR 1 |
| #else |
| #define CXX_LIBRARY_VERSION 2003 |
| +#define CXX_HAS_CONSTEXPR 0 |
| #endif |
| +#endif // COMPILER_MSVC |
| + |
| #endif // CRASHPAD_UTIL_STDLIB_CXX_H_ |