diff options
Diffstat (limited to 'contrib/libc++/include/bitset')
-rw-r--r-- | contrib/libc++/include/bitset | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/contrib/libc++/include/bitset b/contrib/libc++/include/bitset index 1167f50..dd9be4f 100644 --- a/contrib/libc++/include/bitset +++ b/contrib/libc++/include/bitset @@ -249,7 +249,13 @@ 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 : __first_{__v} +#elif __SIZE_WIDTH__ == 32 + : __first_{__v, __v >> __bits_per_word} +#else +#error This constructor has not been ported to this platform +#endif #endif { #ifdef _LIBCPP_HAS_NO_CONSTEXPR @@ -626,13 +632,14 @@ __bitset<0, 0>::__bitset(unsigned long long) _NOEXCEPT { } -template <size_t _Size> class _LIBCPP_VISIBLE bitset; -template <size_t _Size> struct hash<bitset<_Size> >; +template <size_t _Size> class _LIBCPP_TYPE_VIS bitset; +template <size_t _Size> struct _LIBCPP_TYPE_VIS hash<bitset<_Size> >; template <size_t _Size> -class _LIBCPP_VISIBLE bitset +class _LIBCPP_TYPE_VIS bitset : private __bitset<_Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1, _Size> { +public: static const unsigned __n_words = _Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1; typedef __bitset<__n_words, _Size> base; @@ -1053,7 +1060,7 @@ operator^(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT } template <size_t _Size> -struct _LIBCPP_VISIBLE hash<bitset<_Size> > +struct _LIBCPP_TYPE_VIS hash<bitset<_Size> > : public unary_function<bitset<_Size>, size_t> { _LIBCPP_INLINE_VISIBILITY |