@@ -136,6 +136,8 @@ template <size_t N> struct hash<std::bitset<N>>;
136136# include < __assert>
137137# include < __bit_reference>
138138# include < __config>
139+ # include < __cstddef/ptrdiff_t.h>
140+ # include < __cstddef/size_t.h>
139141# include < __functional/hash.h>
140142# include < __functional/unary_function.h>
141143# include < __type_traits/is_char_like_type.h>
@@ -170,9 +172,7 @@ struct __has_storage_type<__bitset<_N_words, _Size> > {
170172template <size_t _N_words, size_t _Size>
171173class __bitset {
172174public:
173- typedef ptrdiff_t difference_type;
174- typedef size_t size_type;
175- typedef size_type __storage_type;
175+ typedef size_t __storage_type;
176176
177177protected:
178178 typedef __bitset __self;
@@ -301,28 +301,28 @@ inline _LIBCPP_CONSTEXPR __bitset<_N_words, _Size>::__bitset(unsigned long long
301301template <size_t _N_words, size_t _Size>
302302inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
303303__bitset<_N_words, _Size>::operator &=(const __bitset& __v) _NOEXCEPT {
304- for (size_type __i = 0 ; __i < _N_words; ++__i)
304+ for (size_t __i = 0 ; __i < _N_words; ++__i)
305305 __first_[__i] &= __v.__first_ [__i];
306306}
307307
308308template <size_t _N_words, size_t _Size>
309309inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
310310__bitset<_N_words, _Size>::operator |=(const __bitset& __v) _NOEXCEPT {
311- for (size_type __i = 0 ; __i < _N_words; ++__i)
311+ for (size_t __i = 0 ; __i < _N_words; ++__i)
312312 __first_[__i] |= __v.__first_ [__i];
313313}
314314
315315template <size_t _N_words, size_t _Size>
316316inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void
317317__bitset<_N_words, _Size>::operator ^=(const __bitset& __v) _NOEXCEPT {
318- for (size_type __i = 0 ; __i < _N_words; ++__i)
318+ for (size_t __i = 0 ; __i < _N_words; ++__i)
319319 __first_[__i] ^= __v.__first_ [__i];
320320}
321321
322322template <size_t _N_words, size_t _Size>
323323_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 void __bitset<_N_words, _Size>::flip() _NOEXCEPT {
324324 // do middle whole words
325- size_type __n = _Size;
325+ size_t __n = _Size;
326326 __storage_pointer __p = __first_;
327327 for (; __n >= __bits_per_word; ++__p, __n -= __bits_per_word)
328328 *__p = ~*__p;
@@ -390,7 +390,7 @@ __bitset<_N_words, _Size>::to_ullong(true_type, true_type) const {
390390template <size_t _N_words, size_t _Size>
391391_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool __bitset<_N_words, _Size>::all() const _NOEXCEPT {
392392 // do middle whole words
393- size_type __n = _Size;
393+ size_t __n = _Size;
394394 __const_storage_pointer __p = __first_;
395395 for (; __n >= __bits_per_word; ++__p, __n -= __bits_per_word)
396396 if (~*__p)
@@ -407,7 +407,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool __bitset<_N_words, _Siz
407407template <size_t _N_words, size_t _Size>
408408_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool __bitset<_N_words, _Size>::any() const _NOEXCEPT {
409409 // do middle whole words
410- size_type __n = _Size;
410+ size_t __n = _Size;
411411 __const_storage_pointer __p = __first_;
412412 for (; __n >= __bits_per_word; ++__p, __n -= __bits_per_word)
413413 if (*__p)
@@ -424,17 +424,15 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 bool __bitset<_N_words, _Siz
424424template <size_t _N_words, size_t _Size>
425425inline size_t __bitset<_N_words, _Size>::__hash_code() const _NOEXCEPT {
426426 size_t __h = 0 ;
427- for (size_type __i = 0 ; __i < _N_words; ++__i)
427+ for (size_t __i = 0 ; __i < _N_words; ++__i)
428428 __h ^= __first_[__i];
429429 return __h;
430430}
431431
432432template <size_t _Size>
433433class __bitset <1 , _Size> {
434434public:
435- typedef ptrdiff_t difference_type;
436- typedef size_t size_type;
437- typedef size_type __storage_type;
435+ typedef size_t __storage_type;
438436
439437protected:
440438 typedef __bitset __self;
@@ -549,9 +547,7 @@ inline size_t __bitset<1, _Size>::__hash_code() const _NOEXCEPT {
549547template <>
550548class __bitset <0 , 0 > {
551549public:
552- typedef ptrdiff_t difference_type;
553- typedef size_t size_type;
554- typedef size_type __storage_type;
550+ typedef size_t __storage_type;
555551
556552protected:
557553 typedef __bitset __self;
0 commit comments