|
6001 | 6001 | const counted_iterator& x, const counted_iterator<I2>& y); |
6002 | 6002 |
|
6003 | 6003 | friend constexpr decltype(auto) iter_move(const counted_iterator& i) |
6004 | | - noexcept(noexcept(ranges::iter_move(i.current))) |
| 6004 | + noexcept(noexcept(ranges::iter_move(i.@\exposid{current}@))) |
6005 | 6005 | requires @\libconcept{input_iterator}@<I>; |
6006 | 6006 | template<@\libconcept{indirectly_swappable}@<I> I2> |
6007 | 6007 | friend constexpr void iter_swap(const counted_iterator& x, const counted_iterator<I2>& y) |
6008 | | - noexcept(noexcept(ranges::iter_swap(x.current, y.current))); |
| 6008 | + noexcept(noexcept(ranges::iter_swap(x.@\exposid{current}@, y.@\exposid{current}@))); |
6009 | 6009 |
|
6010 | 6010 | private: |
6011 | | - I current = I(); // \expos |
6012 | | - iter_difference_t<I> length = 0; // \expos |
| 6011 | + I @\exposid{current}@ = I(); // \expos |
| 6012 | + iter_difference_t<I> @\exposid{length}@ = 0; // \expos |
6013 | 6013 | }; |
6014 | 6014 |
|
6015 | 6015 | template<@\libconcept{input_iterator}@ I> |
|
6035 | 6035 |
|
6036 | 6036 | \pnum |
6037 | 6037 | \effects |
6038 | | -Initializes \tcode{current} with \tcode{std::move(i)} and |
6039 | | -\tcode{length} with \tcode{n}. |
| 6038 | +Initializes \exposid{current} with \tcode{std::move(i)} and |
| 6039 | +\exposid{length} with \tcode{n}. |
6040 | 6040 | \end{itemdescr} |
6041 | 6041 |
|
6042 | 6042 | \indexlibraryctor{counted_iterator}% |
|
6049 | 6049 | \begin{itemdescr} |
6050 | 6050 | \pnum |
6051 | 6051 | \effects |
6052 | | -Initializes \tcode{current} with \tcode{x.current} and |
6053 | | -\tcode{length} with \tcode{x.length}. |
| 6052 | +Initializes \exposid{current} with \tcode{x.\exposid{current}} and |
| 6053 | +\exposid{length} with \tcode{x.\exposid{length}}. |
6054 | 6054 | \end{itemdescr} |
6055 | 6055 |
|
6056 | 6056 | \indexlibrarymember{operator=}{counted_iterator}% |
|
6063 | 6063 | \begin{itemdescr} |
6064 | 6064 | \pnum |
6065 | 6065 | \effects |
6066 | | -Assigns \tcode{x.current} to \tcode{current} and |
6067 | | -\tcode{x.length} to \tcode{length}. |
| 6066 | +Assigns \tcode{x.\exposid{current}} to \exposid{current} and |
| 6067 | +\tcode{x.\exposid{length}} to \exposid{length}. |
6068 | 6068 |
|
6069 | 6069 | \pnum |
6070 | 6070 | \returns |
|
6081 | 6081 | \begin{itemdescr} |
6082 | 6082 | \pnum |
6083 | 6083 | \effects |
6084 | | -Equivalent to: \tcode{return current;} |
| 6084 | +Equivalent to: \tcode{return \exposid{current};} |
6085 | 6085 | \end{itemdescr} |
6086 | 6086 |
|
6087 | 6087 | \indexlibrarymember{base}{counted_iterator}% |
|
6092 | 6092 | \begin{itemdescr} |
6093 | 6093 | \pnum |
6094 | 6094 | \returns |
6095 | | -\tcode{std::move(current)}. |
| 6095 | +\tcode{std::move(\exposid{current})}. |
6096 | 6096 | \end{itemdescr} |
6097 | 6097 |
|
6098 | 6098 | \indexlibrarymember{count}{counted_iterator}% |
|
6103 | 6103 | \begin{itemdescr} |
6104 | 6104 | \pnum |
6105 | 6105 | \effects |
6106 | | -Equivalent to: \tcode{return length;} |
| 6106 | +Equivalent to: \tcode{return \exposid{length};} |
6107 | 6107 | \end{itemdescr} |
6108 | 6108 |
|
6109 | 6109 | \rSec3[counted.iter.elem]{Element access} |
|
6118 | 6118 | \begin{itemdescr} |
6119 | 6119 | \pnum |
6120 | 6120 | \hardexpects |
6121 | | -\tcode{length > 0} is \tcode{true}. |
| 6121 | +\tcode{\exposid{length} > 0} is \tcode{true}. |
6122 | 6122 |
|
6123 | 6123 | \pnum |
6124 | 6124 | \effects |
6125 | | -Equivalent to: \tcode{return *current;} |
| 6125 | +Equivalent to: \tcode{return *\exposid{current};} |
6126 | 6126 | \end{itemdescr} |
6127 | 6127 |
|
6128 | 6128 | \indexlibrarymember{operator->}{counted_iterator}% |
|
6134 | 6134 | \begin{itemdescr} |
6135 | 6135 | \pnum |
6136 | 6136 | \effects |
6137 | | -Equivalent to: \tcode{return to_address(current);} |
| 6137 | +Equivalent to: \tcode{return to_address(\exposid{current});} |
6138 | 6138 | \end{itemdescr} |
6139 | 6139 |
|
6140 | 6140 | \indexlibrarymember{operator[]}{counted_iterator}% |
|
6150 | 6150 |
|
6151 | 6151 | \pnum |
6152 | 6152 | \effects |
6153 | | -Equivalent to: \tcode{return current[n];} |
| 6153 | +Equivalent to: \tcode{return \exposid{current}[n];} |
6154 | 6154 | \end{itemdescr} |
6155 | 6155 |
|
6156 | 6156 | \rSec3[counted.iter.nav]{Navigation} |
|
6163 | 6163 | \begin{itemdescr} |
6164 | 6164 | \pnum |
6165 | 6165 | \hardexpects |
6166 | | -\tcode{length > 0} is \tcode{true}. |
| 6166 | +\tcode{\exposid{length} > 0} is \tcode{true}. |
6167 | 6167 |
|
6168 | 6168 | \pnum |
6169 | 6169 | \effects |
6170 | 6170 | Equivalent to: |
6171 | 6171 | \begin{codeblock} |
6172 | | -++current; |
6173 | | ---length; |
| 6172 | +++@\exposid{current}@; |
| 6173 | +--@\exposid{length}@; |
6174 | 6174 | return *this; |
6175 | 6175 | \end{codeblock} |
6176 | 6176 | \end{itemdescr} |
|
6183 | 6183 | \begin{itemdescr} |
6184 | 6184 | \pnum |
6185 | 6185 | \hardexpects |
6186 | | -\tcode{length > 0} is \tcode{true}. |
| 6186 | +\tcode{\exposid{length} > 0} is \tcode{true}. |
6187 | 6187 |
|
6188 | 6188 | \pnum |
6189 | 6189 | \effects |
6190 | 6190 | Equivalent to: |
6191 | 6191 | \begin{codeblock} |
6192 | | ---length; |
6193 | | -try { return current++; } |
6194 | | -catch(...) { ++length; throw; } |
| 6192 | +--@\exposid{length}@; |
| 6193 | +try { return @\exposid{current}@++; } |
| 6194 | +catch(...) { ++@\exposid{length}@; throw; } |
6195 | 6195 | \end{codeblock} |
6196 | 6196 | \end{itemdescr} |
6197 | 6197 |
|
|
6223 | 6223 | \effects |
6224 | 6224 | Equivalent to: |
6225 | 6225 | \begin{codeblock} |
6226 | | ---current; |
6227 | | -++length; |
| 6226 | +--@\exposid{current}@; |
| 6227 | +++@\exposid{length}@; |
6228 | 6228 | return *this; |
6229 | 6229 | \end{codeblock} |
6230 | 6230 | \end{itemdescr} |
|
6255 | 6255 | \begin{itemdescr} |
6256 | 6256 | \pnum |
6257 | 6257 | \effects |
6258 | | -Equivalent to: \tcode{return counted_iterator(current + n, length - n);} |
| 6258 | +Equivalent to: \tcode{return counted_iterator(\exposid{current} + n, \exposid{length} - n);} |
6259 | 6259 | \end{itemdescr} |
6260 | 6260 |
|
6261 | 6261 | \indexlibrarymember{operator+}{counted_iterator}% |
|
6280 | 6280 | \begin{itemdescr} |
6281 | 6281 | \pnum |
6282 | 6282 | \hardexpects |
6283 | | -\tcode{n <= length} is \tcode{true}. |
| 6283 | +\tcode{n <= \exposid{length} is \tcode{true}}. |
6284 | 6284 |
|
6285 | 6285 | \pnum |
6286 | 6286 | \effects |
6287 | 6287 | Equivalent to: |
6288 | 6288 | \begin{codeblock} |
6289 | | -current += n; |
6290 | | -length -= n; |
| 6289 | +@\exposid{current}@ += n; |
| 6290 | +@\exposid{length}@ -= n; |
6291 | 6291 | return *this; |
6292 | 6292 | \end{codeblock} |
6293 | 6293 | \end{itemdescr} |
|
6301 | 6301 | \begin{itemdescr} |
6302 | 6302 | \pnum |
6303 | 6303 | \effects |
6304 | | -Equivalent to: \tcode{return counted_iterator(current - n, length + n);} |
| 6304 | +Equivalent to: \tcode{return counted_iterator(\exposid{current} - n, \exposid{length} + n);} |
6305 | 6305 | \end{itemdescr} |
6306 | 6306 |
|
6307 | 6307 | \indexlibrarymember{operator-}{counted_iterator}% |
|
6319 | 6319 |
|
6320 | 6320 | \pnum |
6321 | 6321 | \effects |
6322 | | -Equivalent to: \tcode{return y.length - x.length;} |
| 6322 | +Equivalent to: \tcode{return y.\exposid{length} - x.\exposid{length};} |
6323 | 6323 | \end{itemdescr} |
6324 | 6324 |
|
6325 | 6325 | \indexlibrarymember{operator-}{counted_iterator}% |
|
6332 | 6332 | \pnum |
6333 | 6333 | \effects |
6334 | 6334 | Equivalent to: |
6335 | | -\tcode{return -x.length;} |
| 6335 | +\tcode{return -x.\exposid{length};} |
6336 | 6336 | \end{itemdescr} |
6337 | 6337 |
|
6338 | 6338 | \indexlibrarymember{operator-}{counted_iterator}% |
|
6344 | 6344 | \begin{itemdescr} |
6345 | 6345 | \pnum |
6346 | 6346 | \effects |
6347 | | -Equivalent to: \tcode{return y.length;} |
| 6347 | +Equivalent to: \tcode{return y.\exposid{length};} |
6348 | 6348 | \end{itemdescr} |
6349 | 6349 |
|
6350 | 6350 | \indexlibrarymember{operator-=}{counted_iterator}% |
|
6356 | 6356 | \begin{itemdescr} |
6357 | 6357 | \pnum |
6358 | 6358 | \hardexpects |
6359 | | -\tcode{-n <= length} is \tcode{true}. |
| 6359 | +\tcode{-n <= \exposid{length} is \tcode{true}}. |
6360 | 6360 |
|
6361 | 6361 | \pnum |
6362 | 6362 | \effects |
6363 | 6363 | Equivalent to: |
6364 | 6364 | \begin{codeblock} |
6365 | | -current -= n; |
6366 | | -length += n; |
| 6365 | +@\exposid{current}@ -= n; |
| 6366 | +@\exposid{length}@ += n; |
6367 | 6367 | return *this; |
6368 | 6368 | \end{codeblock} |
6369 | 6369 | \end{itemdescr} |
|
6385 | 6385 |
|
6386 | 6386 | \pnum |
6387 | 6387 | \effects |
6388 | | -Equivalent to: \tcode{return x.length == y.length;} |
| 6388 | +Equivalent to: \tcode{return x.\exposid{length} == y.\exposid{length};} |
6389 | 6389 | \end{itemdescr} |
6390 | 6390 |
|
6391 | 6391 | \indexlibrarymember{operator==}{counted_iterator}% |
|
6397 | 6397 | \begin{itemdescr} |
6398 | 6398 | \pnum |
6399 | 6399 | \effects |
6400 | | -Equivalent to: \tcode{return x.length == 0;} |
| 6400 | +Equivalent to: \tcode{return x.\exposid{length} == 0;} |
6401 | 6401 | \end{itemdescr} |
6402 | 6402 |
|
6403 | 6403 | \indexlibrarymember{operator<=>}{counted_iterator}% |
|
6415 | 6415 |
|
6416 | 6416 | \pnum |
6417 | 6417 | \effects |
6418 | | -Equivalent to: \tcode{return y.length <=> x.length;} |
| 6418 | +Equivalent to: \tcode{return y.\exposid{length} <=> x.\exposid{length};} |
6419 | 6419 |
|
6420 | 6420 | \pnum |
6421 | 6421 | \begin{note} |
6422 | 6422 | The argument order in the \effects element is reversed |
6423 | | -because \tcode{length} counts down, not up. |
| 6423 | +because \exposid{length} counts down, not up. |
6424 | 6424 | \end{note} |
6425 | 6425 | \end{itemdescr} |
6426 | 6426 |
|
|
6430 | 6430 | \begin{itemdecl} |
6431 | 6431 | friend constexpr decltype(auto) |
6432 | 6432 | iter_move(const counted_iterator& i) |
6433 | | - noexcept(noexcept(ranges::iter_move(i.current))) |
| 6433 | + noexcept(noexcept(ranges::iter_move(i.@\exposid{current}@))) |
6434 | 6434 | requires @\libconcept{input_iterator}@<I>; |
6435 | 6435 | \end{itemdecl} |
6436 | 6436 |
|
6437 | 6437 | \begin{itemdescr} |
6438 | 6438 | \pnum |
6439 | 6439 | \hardexpects |
6440 | | -\tcode{i.length > 0} is \tcode{true}. |
| 6440 | +\tcode{i.\exposid{length} > 0} is \tcode{true}. |
6441 | 6441 |
|
6442 | 6442 | \pnum |
6443 | 6443 | \effects |
6444 | | -Equivalent to: \tcode{return ranges::iter_move(i.current);} |
| 6444 | +Equivalent to: \tcode{return ranges::iter_move(i.\exposid{current});} |
6445 | 6445 | \end{itemdescr} |
6446 | 6446 |
|
6447 | 6447 | \indexlibrarymember{iter_swap}{counted_iterator}% |
6448 | 6448 | \begin{itemdecl} |
6449 | 6449 | template<@\libconcept{indirectly_swappable}@<I> I2> |
6450 | 6450 | friend constexpr void |
6451 | 6451 | iter_swap(const counted_iterator& x, const counted_iterator<I2>& y) |
6452 | | - noexcept(noexcept(ranges::iter_swap(x.current, y.current))); |
| 6452 | + noexcept(noexcept(ranges::iter_swap(x.@\exposid{current}@, y.@\exposid{current}@))); |
6453 | 6453 | \end{itemdecl} |
6454 | 6454 |
|
6455 | 6455 | \begin{itemdescr} |
6456 | 6456 | \pnum |
6457 | 6457 | \hardexpects |
6458 | | -Both \tcode{x.length > 0} and \tcode{y.length > 0} are \tcode{true}. |
| 6458 | +Both \tcode{x.\exposid{length} > 0} and \tcode{y.\exposid{length} > 0} are \tcode{true}. |
6459 | 6459 |
|
6460 | 6460 | \pnum |
6461 | 6461 | \effects |
6462 | | -Equivalent to \tcode{ranges::iter_swap(x.current, y.current)}. |
| 6462 | +Equivalent to \tcode{ranges::iter_swap(x.\exposid{current}, y.\exposid{current})}. |
6463 | 6463 | \end{itemdescr} |
6464 | 6464 |
|
6465 | 6465 | \rSec2[unreachable.sentinel]{Unreachable sentinel} |
|
0 commit comments