diff options
author | theraven <theraven@FreeBSD.org> | 2012-03-14 00:09:36 +0000 |
---|---|---|
committer | theraven <theraven@FreeBSD.org> | 2012-03-14 00:09:36 +0000 |
commit | 7bd22d0949674b61e2c1a97cbb6caeeb5ab7fd19 (patch) | |
tree | 077f044b08d256dd8348f977fe56d18c08fccd78 /contrib/libc++/include/bitset | |
parent | d83b894ff4280333de5ef40496cfd061b515ba54 (diff) | |
parent | baa75b9984d33ea49ffb76a73507b64d879166cc (diff) | |
download | FreeBSD-src-7bd22d0949674b61e2c1a97cbb6caeeb5ab7fd19.zip FreeBSD-src-7bd22d0949674b61e2c1a97cbb6caeeb5ab7fd19.tar.gz |
Import new versions of libcxxrt and libc++.
Please tests any C++ code you care about with -stdlib=libc++!
Approved by: dim (mentor)
Diffstat (limited to 'contrib/libc++/include/bitset')
-rw-r--r-- | contrib/libc++/include/bitset | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/contrib/libc++/include/bitset b/contrib/libc++/include/bitset index c970f32..6e12e5c 100644 --- a/contrib/libc++/include/bitset +++ b/contrib/libc++/include/bitset @@ -129,6 +129,8 @@ template <size_t N> struct hash<std::bitset<N>>; #include <cassert> #endif +#include <__undef_min_max> + _LIBCPP_BEGIN_NAMESPACE_STD template <size_t _N_words, size_t _Size> @@ -211,7 +213,7 @@ __bitset<_N_words, _Size>::__bitset() _NOEXCEPT template <size_t _N_words, size_t _Size> void -__bitset<_N_words, _Size>::__init(unsigned long long __v, false_type) +__bitset<_N_words, _Size>::__init(unsigned long long __v, false_type) _NOEXCEPT { __storage_type __t[sizeof(unsigned long long) / sizeof(__storage_type)]; for (size_t __i = 0; __i < sizeof(__t)/sizeof(__t[0]); ++__i, __v >>= __bits_per_word) @@ -224,7 +226,7 @@ __bitset<_N_words, _Size>::__init(unsigned long long __v, false_type) template <size_t _N_words, size_t _Size> inline _LIBCPP_INLINE_VISIBILITY void -__bitset<_N_words, _Size>::__init(unsigned long long __v, true_type) +__bitset<_N_words, _Size>::__init(unsigned long long __v, true_type) _NOEXCEPT { __first_[0] = __v; _VSTD::fill(__first_ + 1, __first_ + sizeof(__first_)/sizeof(__first_[0]), __storage_type(0)); @@ -558,7 +560,7 @@ protected: friend class __bit_const_reference<__bitset>; friend class __bit_iterator<__bitset, false>; friend class __bit_iterator<__bitset, true>; - friend class __bit_array<__bitset>; + friend struct __bit_array<__bitset>; typedef __bit_reference<__bitset> reference; typedef __bit_const_reference<__bitset> const_reference; @@ -572,9 +574,9 @@ protected: {return reference(0, 1);} _LIBCPP_INLINE_VISIBILITY const_reference __make_ref(size_t) const _NOEXCEPT {return const_reference(0, 1);} - _LIBCPP_INLINE_VISIBILITY iterator __make_iter(size_t __pos) _NOEXCEPT + _LIBCPP_INLINE_VISIBILITY iterator __make_iter(size_t) _NOEXCEPT {return iterator(0, 0);} - _LIBCPP_INLINE_VISIBILITY const_iterator __make_iter(size_t __pos) const _NOEXCEPT + _LIBCPP_INLINE_VISIBILITY const_iterator __make_iter(size_t) const _NOEXCEPT {return const_iterator(0, 0);} _LIBCPP_INLINE_VISIBILITY void operator&=(const __bitset&) _NOEXCEPT {} @@ -693,11 +695,11 @@ bitset<_Size>::bitset(const _CharT* __str, #else assert(!"bitset string ctor has invalid argument"); #endif - size_t _M = _VSTD::min(__rlen, _Size); + size_t _Mp = _VSTD::min(__rlen, _Size); size_t __i = 0; - for (; __i < _M; ++__i) + for (; __i < _Mp; ++__i) { - _CharT __c = __str[_M - 1 - __i]; + _CharT __c = __str[_Mp - 1 - __i]; if (__c == __zero) (*this)[__i] = false; else @@ -727,11 +729,11 @@ bitset<_Size>::bitset(const basic_string<_CharT,_Traits,_Allocator>& __str, #else assert(!"bitset string ctor has invalid argument"); #endif - size_t _M = _VSTD::min(__rlen, _Size); + size_t _Mp = _VSTD::min(__rlen, _Size); size_t __i = 0; - for (; __i < _M; ++__i) + for (; __i < _Mp; ++__i) { - _CharT __c = __str[__pos + _M - 1 - __i]; + _CharT __c = __str[__pos + _Mp - 1 - __i]; if (_Traits::eq(__c, __zero)) (*this)[__i] = false; else |