Lines Matching refs:_Size
135 template <size_t _N_words, size_t _Size>
138 template <size_t _N_words, size_t _Size>
139 struct __has_storage_type<__bitset<_N_words, _Size> >
144 template <size_t _N_words, size_t _Size>
193 {return to_ulong(integral_constant<bool, _Size < sizeof(unsigned long) * CHAR_BIT>());}
195 … {return to_ullong(integral_constant<bool, _Size < sizeof(unsigned long long) * CHAR_BIT>());}
218 template <size_t _N_words, size_t _Size>
221 __bitset<_N_words, _Size>::__bitset() _NOEXCEPT
233 template <size_t _N_words, size_t _Size>
235 __bitset<_N_words, _Size>::__init(unsigned long long __v, false_type) _NOEXCEPT
238 size_t __sz = _Size;
250 template <size_t _N_words, size_t _Size>
253 __bitset<_N_words, _Size>::__init(unsigned long long __v, true_type) _NOEXCEPT
256 if (_Size < __bits_per_word)
257 __first_[0] &= ( 1ULL << _Size ) - 1;
264 template <size_t _N_words, size_t _Size>
267 __bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
273 _Size >= 2 * __bits_per_word ? static_cast<__storage_type>(__v >> __bits_per_word)
274 …ic_cast<__storage_type>((__v >> __bits_per_word) & (__storage_type(1) << (_Size - __bits_per_word)…
285 template <size_t _N_words, size_t _Size>
288 __bitset<_N_words, _Size>::operator&=(const __bitset& __v) _NOEXCEPT
294 template <size_t _N_words, size_t _Size>
297 __bitset<_N_words, _Size>::operator|=(const __bitset& __v) _NOEXCEPT
303 template <size_t _N_words, size_t _Size>
306 __bitset<_N_words, _Size>::operator^=(const __bitset& __v) _NOEXCEPT
312 template <size_t _N_words, size_t _Size>
314 __bitset<_N_words, _Size>::flip() _NOEXCEPT
317 size_type __n = _Size;
331 template <size_t _N_words, size_t _Size>
333 __bitset<_N_words, _Size>::to_ulong(false_type) const
335 const_iterator __e = __make_iter(_Size);
343 template <size_t _N_words, size_t _Size>
346 __bitset<_N_words, _Size>::to_ulong(true_type) const
351 template <size_t _N_words, size_t _Size>
353 __bitset<_N_words, _Size>::to_ullong(false_type) const
355 const_iterator __e = __make_iter(_Size);
363 template <size_t _N_words, size_t _Size>
366 __bitset<_N_words, _Size>::to_ullong(true_type) const
371 template <size_t _N_words, size_t _Size>
374 __bitset<_N_words, _Size>::to_ullong(true_type, false_type) const
379 template <size_t _N_words, size_t _Size>
381 __bitset<_N_words, _Size>::to_ullong(true_type, true_type) const
389 template <size_t _N_words, size_t _Size>
391 __bitset<_N_words, _Size>::all() const _NOEXCEPT
394 size_type __n = _Size;
409 template <size_t _N_words, size_t _Size>
411 __bitset<_N_words, _Size>::any() const _NOEXCEPT
414 size_type __n = _Size;
429 template <size_t _N_words, size_t _Size>
432 __bitset<_N_words, _Size>::__hash_code() const _NOEXCEPT
440 template <size_t _Size>
441 class __bitset<1, _Size>
504 template <size_t _Size>
507 __bitset<1, _Size>::__bitset() _NOEXCEPT
512 template <size_t _Size>
515 __bitset<1, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
517 _Size == __bits_per_word ? static_cast<__storage_type>(__v)
518 … : static_cast<__storage_type>(__v) & ((__storage_type(1) << _Size) - 1)
523 template <size_t _Size>
526 __bitset<1, _Size>::operator&=(const __bitset& __v) _NOEXCEPT
531 template <size_t _Size>
534 __bitset<1, _Size>::operator|=(const __bitset& __v) _NOEXCEPT
539 template <size_t _Size>
542 __bitset<1, _Size>::operator^=(const __bitset& __v) _NOEXCEPT
547 template <size_t _Size>
550 __bitset<1, _Size>::flip() _NOEXCEPT
552 __storage_type __m = ~__storage_type(0) >> (__bits_per_word - _Size);
557 template <size_t _Size>
560 __bitset<1, _Size>::to_ulong() const
565 template <size_t _Size>
568 __bitset<1, _Size>::to_ullong() const
573 template <size_t _Size>
576 __bitset<1, _Size>::all() const _NOEXCEPT
578 __storage_type __m = ~__storage_type(0) >> (__bits_per_word - _Size);
582 template <size_t _Size>
585 __bitset<1, _Size>::any() const _NOEXCEPT
587 __storage_type __m = ~__storage_type(0) >> (__bits_per_word - _Size);
591 template <size_t _Size>
594 __bitset<1, _Size>::__hash_code() const _NOEXCEPT
664 template <size_t _Size> class _LIBCPP_TEMPLATE_VIS bitset;
665 template <size_t _Size> struct hash<bitset<_Size> >;
667 template <size_t _Size>
669 : private __bitset<_Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1, _Size>
672 … static const unsigned __n_words = _Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1;
673 typedef __bitset<__n_words, _Size> base;
739 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR size_t size() const _NOEXCEPT {return _Size;}
763 template <size_t _Size>
765 bitset<_Size>::bitset(const _CharT* __str,
774 size_t _Mp = _VSTD::min(__rlen, _Size);
784 _VSTD::fill(base::__make_iter(__i), base::__make_iter(_Size), false);
787 template <size_t _Size>
789 bitset<_Size>::bitset(const basic_string<_CharT,_Traits,_Allocator>& __str,
802 size_t _Mp = _VSTD::min(__rlen, _Size);
812 _VSTD::fill(base::__make_iter(__i), base::__make_iter(_Size), false);
815 template <size_t _Size>
817 bitset<_Size>&
818 bitset<_Size>::operator&=(const bitset& __rhs) _NOEXCEPT
824 template <size_t _Size>
826 bitset<_Size>&
827 bitset<_Size>::operator|=(const bitset& __rhs) _NOEXCEPT
833 template <size_t _Size>
835 bitset<_Size>&
836 bitset<_Size>::operator^=(const bitset& __rhs) _NOEXCEPT
842 template <size_t _Size>
843 bitset<_Size>&
844 bitset<_Size>::operator<<=(size_t __pos) _NOEXCEPT
846 __pos = _VSTD::min(__pos, _Size);
847 …D::copy_backward(base::__make_iter(0), base::__make_iter(_Size - __pos), base::__make_iter(_Size));
852 template <size_t _Size>
853 bitset<_Size>&
854 bitset<_Size>::operator>>=(size_t __pos) _NOEXCEPT
856 __pos = _VSTD::min(__pos, _Size);
857 _VSTD::copy(base::__make_iter(__pos), base::__make_iter(_Size), base::__make_iter(0));
858 _VSTD::fill_n(base::__make_iter(_Size - __pos), __pos, false);
862 template <size_t _Size>
864 bitset<_Size>&
865 bitset<_Size>::set() _NOEXCEPT
867 _VSTD::fill_n(base::__make_iter(0), _Size, true);
871 template <size_t _Size>
872 bitset<_Size>&
873 bitset<_Size>::set(size_t __pos, bool __val)
875 if (__pos >= _Size)
882 template <size_t _Size>
884 bitset<_Size>&
885 bitset<_Size>::reset() _NOEXCEPT
887 _VSTD::fill_n(base::__make_iter(0), _Size, false);
891 template <size_t _Size>
892 bitset<_Size>&
893 bitset<_Size>::reset(size_t __pos)
895 if (__pos >= _Size)
902 template <size_t _Size>
904 bitset<_Size>
905 bitset<_Size>::operator~() const _NOEXCEPT
912 template <size_t _Size>
914 bitset<_Size>&
915 bitset<_Size>::flip() _NOEXCEPT
921 template <size_t _Size>
922 bitset<_Size>&
923 bitset<_Size>::flip(size_t __pos)
925 if (__pos >= _Size)
933 template <size_t _Size>
936 bitset<_Size>::to_ulong() const
941 template <size_t _Size>
944 bitset<_Size>::to_ullong() const
949 template <size_t _Size>
952 bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
954 basic_string<_CharT, _Traits, _Allocator> __r(_Size, __zero);
955 for (size_t __i = 0; __i < _Size; ++__i)
958 __r[_Size - 1 - __i] = __one;
963 template <size_t _Size>
967 bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
972 template <size_t _Size>
976 bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
981 template <size_t _Size>
984 bitset<_Size>::to_string(char __zero, char __one) const
989 template <size_t _Size>
992 bitset<_Size>::count() const _NOEXCEPT
994 return static_cast<size_t>(__count_bool_true(base::__make_iter(0), _Size));
997 template <size_t _Size>
1000 bitset<_Size>::operator==(const bitset& __rhs) const _NOEXCEPT
1002 return _VSTD::equal(base::__make_iter(0), base::__make_iter(_Size), __rhs.__make_iter(0));
1005 template <size_t _Size>
1008 bitset<_Size>::operator!=(const bitset& __rhs) const _NOEXCEPT
1013 template <size_t _Size>
1015 bitset<_Size>::test(size_t __pos) const
1017 if (__pos >= _Size)
1023 template <size_t _Size>
1026 bitset<_Size>::all() const _NOEXCEPT
1031 template <size_t _Size>
1034 bitset<_Size>::any() const _NOEXCEPT
1039 template <size_t _Size>
1041 bitset<_Size>
1042 bitset<_Size>::operator<<(size_t __pos) const _NOEXCEPT
1049 template <size_t _Size>
1051 bitset<_Size>
1052 bitset<_Size>::operator>>(size_t __pos) const _NOEXCEPT
1059 template <size_t _Size>
1061 bitset<_Size>
1062 operator&(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
1064 bitset<_Size> __r = __x;
1069 template <size_t _Size>
1071 bitset<_Size>
1072 operator|(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
1074 bitset<_Size> __r = __x;
1079 template <size_t _Size>
1081 bitset<_Size>
1082 operator^(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
1084 bitset<_Size> __r = __x;
1089 template <size_t _Size>
1090 struct _LIBCPP_TEMPLATE_VIS hash<bitset<_Size> >
1091 : public unary_function<bitset<_Size>, size_t>
1094 size_t operator()(const bitset<_Size>& __bs) const _NOEXCEPT
1098 template <class _CharT, class _Traits, size_t _Size>
1100 operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x);
1102 template <class _CharT, class _Traits, size_t _Size>
1104 operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x);