summaryrefslogtreecommitdiffstats
path: root/libcxx/include/bitset
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/bitset')
-rw-r--r--libcxx/include/bitset86
1 files changed, 43 insertions, 43 deletions
diff --git a/libcxx/include/bitset b/libcxx/include/bitset
index 7ec860e3927..ecf9a570564 100644
--- a/libcxx/include/bitset
+++ b/libcxx/include/bitset
@@ -598,61 +598,61 @@ class bitset
static const unsigned __n_words = _Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1;
typedef __bitset<__n_words, _Size> base;
-public:
+public:
typedef typename base::reference reference;
typedef typename base::const_reference const_reference;
- // 23.3.5.1 constructors:
+ // 23.3.5.1 constructors:
/*constexpr*/ _LIBCPP_INLINE_VISIBILITY bitset() {}
/*constexpr*/ _LIBCPP_INLINE_VISIBILITY bitset(unsigned long long __v) : base(__v) {}
explicit bitset(const char* __str);
- template<class _CharT, class _Traits, class _Allocator>
- explicit bitset(const basic_string<_CharT,_Traits,_Allocator>& __str,
- typename basic_string<_CharT,_Traits,_Allocator>::size_type __pos = 0,
- typename basic_string<_CharT,_Traits,_Allocator>::size_type __n =
+ template<class _CharT, class _Traits, class _Allocator>
+ explicit bitset(const basic_string<_CharT,_Traits,_Allocator>& __str,
+ typename basic_string<_CharT,_Traits,_Allocator>::size_type __pos = 0,
+ typename basic_string<_CharT,_Traits,_Allocator>::size_type __n =
(basic_string<_CharT,_Traits,_Allocator>::npos),
- _CharT __zero = _CharT('0'), _CharT __one = _CharT('1'));
+ _CharT __zero = _CharT('0'), _CharT __one = _CharT('1'));
- // 23.3.5.2 bitset operations:
+ // 23.3.5.2 bitset operations:
bitset& operator&=(const bitset& __rhs);
- bitset& operator|=(const bitset& __rhs);
- bitset& operator^=(const bitset& __rhs);
- bitset& operator<<=(size_t __pos);
- bitset& operator>>=(size_t __pos);
- bitset& set();
- bitset& set(size_t __pos, bool __val = true);
- bitset& reset();
- bitset& reset(size_t __pos);
- bitset operator~() const;
- bitset& flip();
- bitset& flip(size_t __pos);
-
- // element access:
+ bitset& operator|=(const bitset& __rhs);
+ bitset& operator^=(const bitset& __rhs);
+ bitset& operator<<=(size_t __pos);
+ bitset& operator>>=(size_t __pos);
+ bitset& set();
+ bitset& set(size_t __pos, bool __val = true);
+ bitset& reset();
+ bitset& reset(size_t __pos);
+ bitset operator~() const;
+ bitset& flip();
+ bitset& flip(size_t __pos);
+
+ // element access:
_LIBCPP_INLINE_VISIBILITY const_reference operator[](size_t __p) const {return base::__make_ref(__p);}
_LIBCPP_INLINE_VISIBILITY reference operator[](size_t __p) {return base::__make_ref(__p);}
- unsigned long to_ulong() const;
- unsigned long long to_ullong() const;
- template <class _CharT, class _Traits, class _Allocator>
+ unsigned long to_ulong() const;
+ unsigned long long to_ullong() const;
+ template <class _CharT, class _Traits, class _Allocator>
basic_string<_CharT, _Traits, _Allocator> to_string(_CharT __zero = _CharT('0'),
- _CharT __one = _CharT('1')) const;
- template <class _CharT, class _Traits>
+ _CharT __one = _CharT('1')) const;
+ template <class _CharT, class _Traits>
basic_string<_CharT, _Traits, allocator<_CharT> > to_string(_CharT __zero = _CharT('0'),
- _CharT __one = _CharT('1')) const;
- template <class _CharT>
+ _CharT __one = _CharT('1')) const;
+ template <class _CharT>
basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > to_string(_CharT __zero = _CharT('0'),
- _CharT __one = _CharT('1')) const;
+ _CharT __one = _CharT('1')) const;
basic_string<char, char_traits<char>, allocator<char> > to_string(char __zero = '0',
- char __one = '1') const;
+ char __one = '1') const;
size_t count() const;
/*constexpr*/ _LIBCPP_INLINE_VISIBILITY size_t size() const {return _Size;}
- bool operator==(const bitset& __rhs) const;
- bool operator!=(const bitset& __rhs) const;
- bool test(size_t __pos) const;
- bool all() const;
- bool any() const;
+ bool operator==(const bitset& __rhs) const;
+ bool operator!=(const bitset& __rhs) const;
+ bool test(size_t __pos) const;
+ bool all() const;
+ bool any() const;
_LIBCPP_INLINE_VISIBILITY bool none() const {return !any();}
- bitset operator<<(size_t __pos) const;
- bitset operator>>(size_t __pos) const;
+ bitset operator<<(size_t __pos) const;
+ bitset operator>>(size_t __pos) const;
private:
@@ -690,9 +690,9 @@ bitset<_Size>::bitset(const char* __str)
}
template <size_t _Size>
-template<class _CharT, class _Traits, class _Allocator>
-bitset<_Size>::bitset(const basic_string<_CharT,_Traits,_Allocator>& __str,
- typename basic_string<_CharT,_Traits,_Allocator>::size_type __pos,
+template<class _CharT, class _Traits, class _Allocator>
+bitset<_Size>::bitset(const basic_string<_CharT,_Traits,_Allocator>& __str,
+ typename basic_string<_CharT,_Traits,_Allocator>::size_type __pos,
typename basic_string<_CharT,_Traits,_Allocator>::size_type __n,
_CharT __zero, _CharT __one)
{
@@ -867,7 +867,7 @@ bitset<_Size>::to_ullong() const
}
template <size_t _Size>
-template <class _CharT, class _Traits, class _Allocator>
+template <class _CharT, class _Traits, class _Allocator>
basic_string<_CharT, _Traits, _Allocator>
bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
{
@@ -881,7 +881,7 @@ bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
}
template <size_t _Size>
-template <class _CharT, class _Traits>
+template <class _CharT, class _Traits>
inline _LIBCPP_INLINE_VISIBILITY
basic_string<_CharT, _Traits, allocator<_CharT> >
bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
@@ -890,7 +890,7 @@ bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
}
template <size_t _Size>
-template <class _CharT>
+template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >
bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
OpenPOWER on IntegriCloud