27-bitset.patch 925 B

123456789101112131415161718192021222324252627
  1. diff --git a/include/bitset b/include/bitset
  2. index e4c01e6..7ad332c 100644
  3. --- a/include/bitset
  4. +++ b/include/bitset
  5. @@ -150,6 +150,10 @@ _LIBCPP_PUSH_MACROS
  6. #include <__undef_macros>
  7. +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  8. +#pragma GCC system_header
  9. +#endif
  10. +
  11. _LIBCPP_BEGIN_NAMESPACE_STD
  12. template <size_t _N_words, size_t _Size>
  13. @@ -289,9 +293,9 @@ inline
  14. _LIBCPP_CONSTEXPR
  15. __bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
  16. #ifndef _LIBCPP_CXX03_LANG
  17. -#if __SIZEOF_SIZE_T__ == 8
  18. +#if SIZE_MAX == 0xffffffffffffffffULL
  19. : __first_{__v}
  20. -#elif __SIZEOF_SIZE_T__ == 4
  21. +#elif SIZE_MAX == 0xffffffffULL
  22. : __first_{static_cast<__storage_type>(__v),
  23. _Size >= 2 * __bits_per_word ? static_cast<__storage_type>(__v >> __bits_per_word)
  24. : static_cast<__storage_type>((__v >> __bits_per_word) & (__storage_type(1) << (_Size - __bits_per_word)) - 1)}