|
5989 | 5989 | const counted_iterator& x, const counted_iterator<I2>& y); |
5990 | 5990 |
|
5991 | 5991 | friend constexpr decltype(auto) iter_move(const counted_iterator& i) |
5992 | | - noexcept(noexcept(ranges::iter_move(i.current))) |
| 5992 | + noexcept(noexcept(ranges::iter_move(i.@\exposid{current}@))) |
5993 | 5993 | requires @\libconcept{input_iterator}@<I>; |
5994 | 5994 | template<@\libconcept{indirectly_swappable}@<I> I2> |
5995 | 5995 | friend constexpr void iter_swap(const counted_iterator& x, const counted_iterator<I2>& y) |
5996 | | - noexcept(noexcept(ranges::iter_swap(x.current, y.current))); |
| 5996 | + noexcept(noexcept(ranges::iter_swap(x.@\exposid{current}@, y.@\exposid{current}@))); |
5997 | 5997 |
|
5998 | 5998 | private: |
5999 | | - I current = I(); // \expos |
6000 | | - iter_difference_t<I> length = 0; // \expos |
| 5999 | + I @\exposid{current}@ = I(); // \expos |
| 6000 | + iter_difference_t<I> @\exposid{length}@ = 0; // \expos |
6001 | 6001 | }; |
6002 | 6002 |
|
6003 | 6003 | template<@\libconcept{input_iterator}@ I> |
|
6023 | 6023 |
|
6024 | 6024 | \pnum |
6025 | 6025 | \effects |
6026 | | -Initializes \tcode{current} with \tcode{std::move(i)} and |
6027 | | -\tcode{length} with \tcode{n}. |
| 6026 | +Initializes \exposid{current} with \tcode{std::move(i)} and |
| 6027 | +\exposid{length} with \tcode{n}. |
6028 | 6028 | \end{itemdescr} |
6029 | 6029 |
|
6030 | 6030 | \indexlibraryctor{counted_iterator}% |
|
6037 | 6037 | \begin{itemdescr} |
6038 | 6038 | \pnum |
6039 | 6039 | \effects |
6040 | | -Initializes \tcode{current} with \tcode{x.current} and |
6041 | | -\tcode{length} with \tcode{x.length}. |
| 6040 | +Initializes \exposid{current} with \tcode{x.\exposid{current}} and |
| 6041 | +\exposid{length} with \tcode{x.\exposid{length}}. |
6042 | 6042 | \end{itemdescr} |
6043 | 6043 |
|
6044 | 6044 | \indexlibrarymember{operator=}{counted_iterator}% |
|
6051 | 6051 | \begin{itemdescr} |
6052 | 6052 | \pnum |
6053 | 6053 | \effects |
6054 | | -Assigns \tcode{x.current} to \tcode{current} and |
6055 | | -\tcode{x.length} to \tcode{length}. |
| 6054 | +Assigns \tcode{x.\exposid{current}} to \exposid{current} and |
| 6055 | +\tcode{x.\exposid{length}} to \exposid{length}. |
6056 | 6056 |
|
6057 | 6057 | \pnum |
6058 | 6058 | \returns |
|
6069 | 6069 | \begin{itemdescr} |
6070 | 6070 | \pnum |
6071 | 6071 | \effects |
6072 | | -Equivalent to: \tcode{return current;} |
| 6072 | +Equivalent to: \tcode{return \exposid{current};} |
6073 | 6073 | \end{itemdescr} |
6074 | 6074 |
|
6075 | 6075 | \indexlibrarymember{base}{counted_iterator}% |
|
6080 | 6080 | \begin{itemdescr} |
6081 | 6081 | \pnum |
6082 | 6082 | \returns |
6083 | | -\tcode{std::move(current)}. |
| 6083 | +\tcode{std::move(\exposid{current})}. |
6084 | 6084 | \end{itemdescr} |
6085 | 6085 |
|
6086 | 6086 | \indexlibrarymember{count}{counted_iterator}% |
|
6091 | 6091 | \begin{itemdescr} |
6092 | 6092 | \pnum |
6093 | 6093 | \effects |
6094 | | -Equivalent to: \tcode{return length;} |
| 6094 | +Equivalent to: \tcode{return \exposid{length};} |
6095 | 6095 | \end{itemdescr} |
6096 | 6096 |
|
6097 | 6097 | \rSec3[counted.iter.elem]{Element access} |
|
6106 | 6106 | \begin{itemdescr} |
6107 | 6107 | \pnum |
6108 | 6108 | \hardexpects |
6109 | | -\tcode{length > 0} is \tcode{true}. |
| 6109 | +\tcode{\exposid{length} > 0} is \tcode{true}. |
6110 | 6110 |
|
6111 | 6111 | \pnum |
6112 | 6112 | \effects |
6113 | | -Equivalent to: \tcode{return *current;} |
| 6113 | +Equivalent to: \tcode{return *\exposid{current};} |
6114 | 6114 | \end{itemdescr} |
6115 | 6115 |
|
6116 | 6116 | \indexlibrarymember{operator->}{counted_iterator}% |
|
6122 | 6122 | \begin{itemdescr} |
6123 | 6123 | \pnum |
6124 | 6124 | \effects |
6125 | | -Equivalent to: \tcode{return to_address(current);} |
| 6125 | +Equivalent to: \tcode{return to_address(\exposid{current});} |
6126 | 6126 | \end{itemdescr} |
6127 | 6127 |
|
6128 | 6128 | \indexlibrarymember{operator[]}{counted_iterator}% |
|
6138 | 6138 |
|
6139 | 6139 | \pnum |
6140 | 6140 | \effects |
6141 | | -Equivalent to: \tcode{return current[n];} |
| 6141 | +Equivalent to: \tcode{return \exposid{current}[n];} |
6142 | 6142 | \end{itemdescr} |
6143 | 6143 |
|
6144 | 6144 | \rSec3[counted.iter.nav]{Navigation} |
|
6151 | 6151 | \begin{itemdescr} |
6152 | 6152 | \pnum |
6153 | 6153 | \hardexpects |
6154 | | -\tcode{length > 0} is \tcode{true}. |
| 6154 | +\tcode{\exposid{length} > 0} is \tcode{true}. |
6155 | 6155 |
|
6156 | 6156 | \pnum |
6157 | 6157 | \effects |
6158 | 6158 | Equivalent to: |
6159 | 6159 | \begin{codeblock} |
6160 | | -++current; |
6161 | | ---length; |
| 6160 | +++@\exposid{current}@; |
| 6161 | +--@\exposid{length}@; |
6162 | 6162 | return *this; |
6163 | 6163 | \end{codeblock} |
6164 | 6164 | \end{itemdescr} |
|
6171 | 6171 | \begin{itemdescr} |
6172 | 6172 | \pnum |
6173 | 6173 | \hardexpects |
6174 | | -\tcode{length > 0} is \tcode{true}. |
| 6174 | +\tcode{\exposid{length} > 0} is \tcode{true}. |
6175 | 6175 |
|
6176 | 6176 | \pnum |
6177 | 6177 | \effects |
6178 | 6178 | Equivalent to: |
6179 | 6179 | \begin{codeblock} |
6180 | | ---length; |
6181 | | -try { return current++; } |
6182 | | -catch(...) { ++length; throw; } |
| 6180 | +--@\exposid{length}@; |
| 6181 | +try { return @\exposid{current}@++; } |
| 6182 | +catch(...) { ++@\exposid{length}@; throw; } |
6183 | 6183 | \end{codeblock} |
6184 | 6184 | \end{itemdescr} |
6185 | 6185 |
|
|
6211 | 6211 | \effects |
6212 | 6212 | Equivalent to: |
6213 | 6213 | \begin{codeblock} |
6214 | | ---current; |
6215 | | -++length; |
| 6214 | +--@\exposid{current}@; |
| 6215 | +++@\exposid{length}@; |
6216 | 6216 | return *this; |
6217 | 6217 | \end{codeblock} |
6218 | 6218 | \end{itemdescr} |
|
6243 | 6243 | \begin{itemdescr} |
6244 | 6244 | \pnum |
6245 | 6245 | \effects |
6246 | | -Equivalent to: \tcode{return counted_iterator(current + n, length - n);} |
| 6246 | +Equivalent to: \tcode{return counted_iterator(\exposid{current} + n, \exposid{length} - n);} |
6247 | 6247 | \end{itemdescr} |
6248 | 6248 |
|
6249 | 6249 | \indexlibrarymember{operator+}{counted_iterator}% |
|
6268 | 6268 | \begin{itemdescr} |
6269 | 6269 | \pnum |
6270 | 6270 | \hardexpects |
6271 | | -\tcode{n <= length} is \tcode{true}. |
| 6271 | +\tcode{n <= \exposid{length} is \tcode{true}}. |
6272 | 6272 |
|
6273 | 6273 | \pnum |
6274 | 6274 | \effects |
6275 | 6275 | Equivalent to: |
6276 | 6276 | \begin{codeblock} |
6277 | | -current += n; |
6278 | | -length -= n; |
| 6277 | +@\exposid{current}@ += n; |
| 6278 | +@\exposid{length}@ -= n; |
6279 | 6279 | return *this; |
6280 | 6280 | \end{codeblock} |
6281 | 6281 | \end{itemdescr} |
|
6289 | 6289 | \begin{itemdescr} |
6290 | 6290 | \pnum |
6291 | 6291 | \effects |
6292 | | -Equivalent to: \tcode{return counted_iterator(current - n, length + n);} |
| 6292 | +Equivalent to: \tcode{return counted_iterator(\exposid{current} - n, \exposid{length} + n);} |
6293 | 6293 | \end{itemdescr} |
6294 | 6294 |
|
6295 | 6295 | \indexlibrarymember{operator-}{counted_iterator}% |
|
6307 | 6307 |
|
6308 | 6308 | \pnum |
6309 | 6309 | \effects |
6310 | | -Equivalent to: \tcode{return y.length - x.length;} |
| 6310 | +Equivalent to: \tcode{return y.\exposid{length} - x.\exposid{length};} |
6311 | 6311 | \end{itemdescr} |
6312 | 6312 |
|
6313 | 6313 | \indexlibrarymember{operator-}{counted_iterator}% |
|
6320 | 6320 | \pnum |
6321 | 6321 | \effects |
6322 | 6322 | Equivalent to: |
6323 | | -\tcode{return -x.length;} |
| 6323 | +\tcode{return -x.\exposid{length};} |
6324 | 6324 | \end{itemdescr} |
6325 | 6325 |
|
6326 | 6326 | \indexlibrarymember{operator-}{counted_iterator}% |
|
6332 | 6332 | \begin{itemdescr} |
6333 | 6333 | \pnum |
6334 | 6334 | \effects |
6335 | | -Equivalent to: \tcode{return y.length;} |
| 6335 | +Equivalent to: \tcode{return y.\exposid{length};} |
6336 | 6336 | \end{itemdescr} |
6337 | 6337 |
|
6338 | 6338 | \indexlibrarymember{operator-=}{counted_iterator}% |
|
6344 | 6344 | \begin{itemdescr} |
6345 | 6345 | \pnum |
6346 | 6346 | \hardexpects |
6347 | | -\tcode{-n <= length} is \tcode{true}. |
| 6347 | +\tcode{-n <= \exposid{length} is \tcode{true}}. |
6348 | 6348 |
|
6349 | 6349 | \pnum |
6350 | 6350 | \effects |
6351 | 6351 | Equivalent to: |
6352 | 6352 | \begin{codeblock} |
6353 | | -current -= n; |
6354 | | -length += n; |
| 6353 | +@\exposid{current}@ -= n; |
| 6354 | +@\exposid{length}@ += n; |
6355 | 6355 | return *this; |
6356 | 6356 | \end{codeblock} |
6357 | 6357 | \end{itemdescr} |
|
6373 | 6373 |
|
6374 | 6374 | \pnum |
6375 | 6375 | \effects |
6376 | | -Equivalent to: \tcode{return x.length == y.length;} |
| 6376 | +Equivalent to: \tcode{return x.\exposid{length} == y.\exposid{length};} |
6377 | 6377 | \end{itemdescr} |
6378 | 6378 |
|
6379 | 6379 | \indexlibrarymember{operator==}{counted_iterator}% |
|
6385 | 6385 | \begin{itemdescr} |
6386 | 6386 | \pnum |
6387 | 6387 | \effects |
6388 | | -Equivalent to: \tcode{return x.length == 0;} |
| 6388 | +Equivalent to: \tcode{return x.\exposid{length} == 0;} |
6389 | 6389 | \end{itemdescr} |
6390 | 6390 |
|
6391 | 6391 | \indexlibrarymember{operator<=>}{counted_iterator}% |
|
6403 | 6403 |
|
6404 | 6404 | \pnum |
6405 | 6405 | \effects |
6406 | | -Equivalent to: \tcode{return y.length <=> x.length;} |
| 6406 | +Equivalent to: \tcode{return y.\exposid{length} <=> x.\exposid{length};} |
6407 | 6407 |
|
6408 | 6408 | \pnum |
6409 | 6409 | \begin{note} |
6410 | 6410 | The argument order in the \effects element is reversed |
6411 | | -because \tcode{length} counts down, not up. |
| 6411 | +because \exposid{length} counts down, not up. |
6412 | 6412 | \end{note} |
6413 | 6413 | \end{itemdescr} |
6414 | 6414 |
|
|
6418 | 6418 | \begin{itemdecl} |
6419 | 6419 | friend constexpr decltype(auto) |
6420 | 6420 | iter_move(const counted_iterator& i) |
6421 | | - noexcept(noexcept(ranges::iter_move(i.current))) |
| 6421 | + noexcept(noexcept(ranges::iter_move(i.@\exposid{current}@))) |
6422 | 6422 | requires @\libconcept{input_iterator}@<I>; |
6423 | 6423 | \end{itemdecl} |
6424 | 6424 |
|
6425 | 6425 | \begin{itemdescr} |
6426 | 6426 | \pnum |
6427 | 6427 | \hardexpects |
6428 | | -\tcode{i.length > 0} is \tcode{true}. |
| 6428 | +\tcode{i.\exposid{length} > 0} is \tcode{true}. |
6429 | 6429 |
|
6430 | 6430 | \pnum |
6431 | 6431 | \effects |
6432 | | -Equivalent to: \tcode{return ranges::iter_move(i.current);} |
| 6432 | +Equivalent to: \tcode{return ranges::iter_move(i.\exposid{current});} |
6433 | 6433 | \end{itemdescr} |
6434 | 6434 |
|
6435 | 6435 | \indexlibrarymember{iter_swap}{counted_iterator}% |
6436 | 6436 | \begin{itemdecl} |
6437 | 6437 | template<@\libconcept{indirectly_swappable}@<I> I2> |
6438 | 6438 | friend constexpr void |
6439 | 6439 | iter_swap(const counted_iterator& x, const counted_iterator<I2>& y) |
6440 | | - noexcept(noexcept(ranges::iter_swap(x.current, y.current))); |
| 6440 | + noexcept(noexcept(ranges::iter_swap(x.@\exposid{current}@, y.@\exposid{current}@))); |
6441 | 6441 | \end{itemdecl} |
6442 | 6442 |
|
6443 | 6443 | \begin{itemdescr} |
6444 | 6444 | \pnum |
6445 | 6445 | \hardexpects |
6446 | | -Both \tcode{x.length > 0} and \tcode{y.length > 0} are \tcode{true}. |
| 6446 | +Both \tcode{x.\exposid{length} > 0} and \tcode{y.\exposid{length} > 0} are \tcode{true}. |
6447 | 6447 |
|
6448 | 6448 | \pnum |
6449 | 6449 | \effects |
6450 | | -Equivalent to \tcode{ranges::iter_swap(x.current, y.current)}. |
| 6450 | +Equivalent to \tcode{ranges::iter_swap(x.\exposid{current}, y.\exposid{current})}. |
6451 | 6451 | \end{itemdescr} |
6452 | 6452 |
|
6453 | 6453 | \rSec2[unreachable.sentinel]{Unreachable sentinel} |
|
0 commit comments