diff --git a/include/__config b/include/__config index ce39243c..f803c9a8 100644 --- a/include/__config +++ b/include/__config @@ -368,7 +368,14 @@ namespace std { #endif #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES + +// constexpr was added to GCC in 4.6. +#if _GNUC_VER < 406 #define _LIBCPP_HAS_NO_CONSTEXPR +// Can only use constexpr in c++11 mode. +#elif !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L +#define _LIBCPP_HAS_NO_CONSTEXPR +#endif #define _NOEXCEPT throw() #define _NOEXCEPT_(x) diff --git a/include/bitset b/include/bitset index 4cc7dbda..8c278cc7 100644 --- a/include/bitset +++ b/include/bitset @@ -249,9 +249,9 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR __bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT #ifndef _LIBCPP_HAS_NO_CONSTEXPR -#if __SIZE_WIDTH__ == 64 +#if __SIZEOF_SIZE_T__ == 8 : __first_{__v} -#elif __SIZE_WIDTH__ == 32 +#elif __SIZEOF_SIZE_T__ == 4 : __first_{__v, __v >> __bits_per_word} #else #error This constructor has not been ported to this platform