|
6108 | 6108 | class reference {
|
6109 | 6109 | friend class bitset;
|
6110 | 6110 | reference() noexcept;
|
| 6111 | + |
6111 | 6112 | public:
|
6112 | 6113 | ~reference() noexcept;
|
6113 |
| - reference& operator=(bool x) noexcept; // for \tcode{b[i] = x;} |
6114 |
| - reference& operator=(const reference&) noexcept; // for \tcode{b[i] = b[j];} |
6115 |
| - bool operator~() const noexcept; // flips the bit |
6116 |
| - operator bool() const noexcept; // for \tcode{x = b[i];} |
6117 |
| - reference& flip() noexcept; // for \tcode{b[i].flip();} |
| 6114 | + reference& operator=(bool x) noexcept; // for \tcode{b[i] = x;} |
| 6115 | + reference& operator=(const reference&) noexcept; // for \tcode{b[i] = b[j];} |
| 6116 | + bool operator~() const noexcept; // flips the bit |
| 6117 | + operator bool() const noexcept; // for \tcode{x = b[i];} |
| 6118 | + reference& flip() noexcept; // for \tcode{b[i].flip();} |
6118 | 6119 | };
|
6119 | 6120 |
|
6120 | 6121 | // \ref{bitset.cons}, constructors
|
|
6124 | 6125 | explicit bitset(
|
6125 | 6126 | const basic_string<charT, traits, Allocator>& str,
|
6126 | 6127 | typename basic_string<charT, traits, Allocator>::size_type pos = 0,
|
6127 |
| - typename basic_string<charT, traits, Allocator>::size_type n = |
6128 |
| - basic_string<charT, traits, Allocator>::npos, |
| 6128 | + typename basic_string<charT, traits, Allocator>::size_type n |
| 6129 | + = basic_string<charT, traits, Allocator>::npos, |
6129 | 6130 | charT zero = charT('0'),
|
6130 | 6131 | charT one = charT('1'));
|
6131 | 6132 | template <class charT>
|
|
6150 | 6151 | bitset<N>& flip(size_t pos);
|
6151 | 6152 |
|
6152 | 6153 | // element access:
|
6153 |
| - constexpr bool operator[](size_t pos) const; // for \tcode{b[i];} |
6154 |
| - reference operator[](size_t pos); // for \tcode{b[i];} |
| 6154 | + constexpr bool operator[](size_t pos) const; // for \tcode{b[i];} |
| 6155 | + reference operator[](size_t pos); // for \tcode{b[i];} |
6155 | 6156 |
|
6156 | 6157 | unsigned long to_ulong() const;
|
6157 | 6158 | unsigned long long to_ullong() const;
|
|
6262 | 6263 | \indexlibrary{\idxcode{bitset}!constructor}%
|
6263 | 6264 | \begin{itemdecl}
|
6264 | 6265 | template <class charT, class traits, class Allocator>
|
6265 |
| -explicit |
6266 |
| -bitset(const basic_string<charT, traits, Allocator>& str, |
6267 |
| - typename basic_string<charT, traits, Allocator>::size_type pos = 0, |
6268 |
| - typename basic_string<charT, traits, Allocator>::size_type n = |
6269 |
| - basic_string<charT, traits, Allocator>::npos, |
6270 |
| - charT zero = charT('0'), charT one = charT('1')); |
| 6266 | + explicit bitset( |
| 6267 | + const basic_string<charT, traits, Allocator>& str, |
| 6268 | + typename basic_string<charT, traits, Allocator>::size_type pos = 0, |
| 6269 | + typename basic_string<charT, traits, Allocator>::size_type n |
| 6270 | + = basic_string<charT, traits, Allocator>::npos, |
| 6271 | + charT zero = charT('0'), |
| 6272 | + charT one = charT('1')); |
6271 | 6273 | \end{itemdecl}
|
6272 | 6274 |
|
6273 | 6275 | \begin{itemdescr}
|
|
6320 | 6322 | explicit bitset(
|
6321 | 6323 | const charT* str,
|
6322 | 6324 | typename basic_string<charT>::size_type n = basic_string<charT>::npos,
|
6323 |
| - charT zero = charT('0'), charT one = charT('1')); |
| 6325 | + charT zero = charT('0'), |
| 6326 | + charT one = charT('1')); |
6324 | 6327 | \end{itemdecl}
|
6325 | 6328 |
|
6326 | 6329 | \begin{itemdescr}
|
6327 | 6330 | \pnum
|
6328 | 6331 | \effects Constructs an object of class \tcode{bitset<N>} as if by:
|
6329 | 6332 | \begin{codeblock}
|
6330 |
| -bitset( |
6331 |
| - n == basic_string<charT>::npos |
6332 |
| - ? basic_string<charT>(str) |
6333 |
| - : basic_string<charT>(str, n), |
6334 |
| - 0, n, zero, one) |
| 6333 | +bitset(n == basic_string<charT>::npos |
| 6334 | + ? basic_string<charT>(str) |
| 6335 | + : basic_string<charT>(str, n), |
| 6336 | + 0, n, zero, one) |
6335 | 6337 | \end{codeblock}
|
6336 |
| - |
6337 | 6338 | \end{itemdescr}
|
6338 | 6339 |
|
6339 | 6340 |
|
|
6618 | 6619 | \indexlibrarymember{to_string}{bitset}%
|
6619 | 6620 | \begin{itemdecl}
|
6620 | 6621 | template <class charT = char,
|
6621 |
| - class traits = char_traits<charT>, |
6622 |
| - class Allocator = allocator<charT>> |
| 6622 | + class traits = char_traits<charT>, |
| 6623 | + class Allocator = allocator<charT>> |
6623 | 6624 | basic_string<charT, traits, Allocator>
|
6624 |
| - to_string(charT zero = charT('0'), charT one = charT('1')) const; |
| 6625 | + to_string(charT zero = charT('0'), charT one = charT('1')) const; |
6625 | 6626 | \end{itemdecl}
|
6626 | 6627 |
|
6627 | 6628 | \begin{itemdescr}
|
|
6866 | 6867 | \begin{itemdecl}
|
6867 | 6868 | template <class charT, class traits, size_t N>
|
6868 | 6869 | basic_istream<charT, traits>&
|
6869 |
| - operator>>(basic_istream<charT, traits>& is, bitset<N>& x); |
| 6870 | + operator>>(basic_istream<charT, traits>& is, bitset<N>& x); |
6870 | 6871 | \end{itemdecl}
|
6871 | 6872 |
|
6872 | 6873 | \begin{itemdescr}
|
|
6911 | 6912 | \begin{itemdecl}
|
6912 | 6913 | template <class charT, class traits, size_t N>
|
6913 | 6914 | basic_ostream<charT, traits>&
|
6914 |
| - operator<<(basic_ostream<charT, traits>& os, const bitset<N>& x); |
| 6915 | + operator<<(basic_ostream<charT, traits>& os, const bitset<N>& x); |
6915 | 6916 | \end{itemdecl}
|
6916 | 6917 |
|
6917 | 6918 | \begin{itemdescr}
|
|
0 commit comments