|
5987 | 5987 | const counted_iterator& x, const counted_iterator<I2>& y); |
5988 | 5988 |
|
5989 | 5989 | friend constexpr decltype(auto) iter_move(const counted_iterator& i) |
5990 | | - noexcept(noexcept(ranges::iter_move(i.current))) |
| 5990 | + noexcept(noexcept(ranges::iter_move(i.@\exposid{current}@))) |
5991 | 5991 | requires @\libconcept{input_iterator}@<I>; |
5992 | 5992 | template<@\libconcept{indirectly_swappable}@<I> I2> |
5993 | 5993 | friend constexpr void iter_swap(const counted_iterator& x, const counted_iterator<I2>& y) |
5994 | | - noexcept(noexcept(ranges::iter_swap(x.current, y.current))); |
| 5994 | + noexcept(noexcept(ranges::iter_swap(x.@\exposid{current}@, y.@\exposid{current}@))); |
5995 | 5995 |
|
5996 | 5996 | private: |
5997 | | - I current = I(); // \expos |
5998 | | - iter_difference_t<I> length = 0; // \expos |
| 5997 | + I @\exposid{current}@ = I(); // \expos |
| 5998 | + iter_difference_t<I> @\exposid{length}@ = 0; // \expos |
5999 | 5999 | }; |
6000 | 6000 |
|
6001 | 6001 | template<@\libconcept{input_iterator}@ I> |
|
6021 | 6021 |
|
6022 | 6022 | \pnum |
6023 | 6023 | \effects |
6024 | | -Initializes \tcode{current} with \tcode{std::move(i)} and |
6025 | | -\tcode{length} with \tcode{n}. |
| 6024 | +Initializes \exposid{current} with \tcode{std::move(i)} and |
| 6025 | +\exposid{length} with \tcode{n}. |
6026 | 6026 | \end{itemdescr} |
6027 | 6027 |
|
6028 | 6028 | \indexlibraryctor{counted_iterator}% |
|
6035 | 6035 | \begin{itemdescr} |
6036 | 6036 | \pnum |
6037 | 6037 | \effects |
6038 | | -Initializes \tcode{current} with \tcode{x.current} and |
6039 | | -\tcode{length} with \tcode{x.length}. |
| 6038 | +Initializes \exposid{current} with \tcode{x.\exposid{current}} and |
| 6039 | +\exposid{length} with \tcode{x.\exposid{length}}. |
6040 | 6040 | \end{itemdescr} |
6041 | 6041 |
|
6042 | 6042 | \indexlibrarymember{operator=}{counted_iterator}% |
|
6049 | 6049 | \begin{itemdescr} |
6050 | 6050 | \pnum |
6051 | 6051 | \effects |
6052 | | -Assigns \tcode{x.current} to \tcode{current} and |
6053 | | -\tcode{x.length} to \tcode{length}. |
| 6052 | +Assigns \tcode{x.\exposid{current}} to \exposid{current} and |
| 6053 | +\tcode{x.\exposid{length}} to \exposid{length}. |
6054 | 6054 |
|
6055 | 6055 | \pnum |
6056 | 6056 | \returns |
|
6067 | 6067 | \begin{itemdescr} |
6068 | 6068 | \pnum |
6069 | 6069 | \effects |
6070 | | -Equivalent to: \tcode{return current;} |
| 6070 | +Equivalent to: \tcode{return \exposid{current};} |
6071 | 6071 | \end{itemdescr} |
6072 | 6072 |
|
6073 | 6073 | \indexlibrarymember{base}{counted_iterator}% |
|
6078 | 6078 | \begin{itemdescr} |
6079 | 6079 | \pnum |
6080 | 6080 | \returns |
6081 | | -\tcode{std::move(current)}. |
| 6081 | +\tcode{std::move(\exposid{current})}. |
6082 | 6082 | \end{itemdescr} |
6083 | 6083 |
|
6084 | 6084 | \indexlibrarymember{count}{counted_iterator}% |
|
6089 | 6089 | \begin{itemdescr} |
6090 | 6090 | \pnum |
6091 | 6091 | \effects |
6092 | | -Equivalent to: \tcode{return length;} |
| 6092 | +Equivalent to: \tcode{return \exposid{length};} |
6093 | 6093 | \end{itemdescr} |
6094 | 6094 |
|
6095 | 6095 | \rSec3[counted.iter.elem]{Element access} |
|
6104 | 6104 | \begin{itemdescr} |
6105 | 6105 | \pnum |
6106 | 6106 | \hardexpects |
6107 | | -\tcode{length > 0} is \tcode{true}. |
| 6107 | +\tcode{\exposid{length} > 0} is \tcode{true}. |
6108 | 6108 |
|
6109 | 6109 | \pnum |
6110 | 6110 | \effects |
6111 | | -Equivalent to: \tcode{return *current;} |
| 6111 | +Equivalent to: \tcode{return *\exposid{current};} |
6112 | 6112 | \end{itemdescr} |
6113 | 6113 |
|
6114 | 6114 | \indexlibrarymember{operator->}{counted_iterator}% |
|
6120 | 6120 | \begin{itemdescr} |
6121 | 6121 | \pnum |
6122 | 6122 | \effects |
6123 | | -Equivalent to: \tcode{return to_address(current);} |
| 6123 | +Equivalent to: \tcode{return to_address(\exposid{current});} |
6124 | 6124 | \end{itemdescr} |
6125 | 6125 |
|
6126 | 6126 | \indexlibrarymember{operator[]}{counted_iterator}% |
|
6136 | 6136 |
|
6137 | 6137 | \pnum |
6138 | 6138 | \effects |
6139 | | -Equivalent to: \tcode{return current[n];} |
| 6139 | +Equivalent to: \tcode{return \exposid{current}[n];} |
6140 | 6140 | \end{itemdescr} |
6141 | 6141 |
|
6142 | 6142 | \rSec3[counted.iter.nav]{Navigation} |
|
6149 | 6149 | \begin{itemdescr} |
6150 | 6150 | \pnum |
6151 | 6151 | \hardexpects |
6152 | | -\tcode{length > 0} is \tcode{true}. |
| 6152 | +\tcode{\exposid{length} > 0} is \tcode{true}. |
6153 | 6153 |
|
6154 | 6154 | \pnum |
6155 | 6155 | \effects |
6156 | 6156 | Equivalent to: |
6157 | 6157 | \begin{codeblock} |
6158 | | -++current; |
6159 | | ---length; |
| 6158 | +++@\exposid{current}@; |
| 6159 | +--@\exposid{length}@; |
6160 | 6160 | return *this; |
6161 | 6161 | \end{codeblock} |
6162 | 6162 | \end{itemdescr} |
|
6169 | 6169 | \begin{itemdescr} |
6170 | 6170 | \pnum |
6171 | 6171 | \hardexpects |
6172 | | -\tcode{length > 0} is \tcode{true}. |
| 6172 | +\tcode{\exposid{length} > 0} is \tcode{true}. |
6173 | 6173 |
|
6174 | 6174 | \pnum |
6175 | 6175 | \effects |
6176 | 6176 | Equivalent to: |
6177 | 6177 | \begin{codeblock} |
6178 | | ---length; |
6179 | | -try { return current++; } |
6180 | | -catch(...) { ++length; throw; } |
| 6178 | +--@\exposid{length}@; |
| 6179 | +try { return @\exposid{current}@++; } |
| 6180 | +catch(...) { ++@\exposid{length}@; throw; } |
6181 | 6181 | \end{codeblock} |
6182 | 6182 | \end{itemdescr} |
6183 | 6183 |
|
|
6209 | 6209 | \effects |
6210 | 6210 | Equivalent to: |
6211 | 6211 | \begin{codeblock} |
6212 | | ---current; |
6213 | | -++length; |
| 6212 | +--@\exposid{current}@; |
| 6213 | +++@\exposid{length}@; |
6214 | 6214 | return *this; |
6215 | 6215 | \end{codeblock} |
6216 | 6216 | \end{itemdescr} |
|
6241 | 6241 | \begin{itemdescr} |
6242 | 6242 | \pnum |
6243 | 6243 | \effects |
6244 | | -Equivalent to: \tcode{return counted_iterator(current + n, length - n);} |
| 6244 | +Equivalent to: \tcode{return counted_iterator(\exposid{current} + n, \exposid{length} - n);} |
6245 | 6245 | \end{itemdescr} |
6246 | 6246 |
|
6247 | 6247 | \indexlibrarymember{operator+}{counted_iterator}% |
|
6266 | 6266 | \begin{itemdescr} |
6267 | 6267 | \pnum |
6268 | 6268 | \hardexpects |
6269 | | -\tcode{n <= length} is \tcode{true}. |
| 6269 | +\tcode{n <= \exposid{length} is \tcode{true}}. |
6270 | 6270 |
|
6271 | 6271 | \pnum |
6272 | 6272 | \effects |
6273 | 6273 | Equivalent to: |
6274 | 6274 | \begin{codeblock} |
6275 | | -current += n; |
6276 | | -length -= n; |
| 6275 | +@\exposid{current}@ += n; |
| 6276 | +@\exposid{length}@ -= n; |
6277 | 6277 | return *this; |
6278 | 6278 | \end{codeblock} |
6279 | 6279 | \end{itemdescr} |
|
6287 | 6287 | \begin{itemdescr} |
6288 | 6288 | \pnum |
6289 | 6289 | \effects |
6290 | | -Equivalent to: \tcode{return counted_iterator(current - n, length + n);} |
| 6290 | +Equivalent to: \tcode{return counted_iterator(\exposid{current} - n, \exposid{length} + n);} |
6291 | 6291 | \end{itemdescr} |
6292 | 6292 |
|
6293 | 6293 | \indexlibrarymember{operator-}{counted_iterator}% |
|
6305 | 6305 |
|
6306 | 6306 | \pnum |
6307 | 6307 | \effects |
6308 | | -Equivalent to: \tcode{return y.length - x.length;} |
| 6308 | +Equivalent to: \tcode{return y.\exposid{length} - x.\exposid{length};} |
6309 | 6309 | \end{itemdescr} |
6310 | 6310 |
|
6311 | 6311 | \indexlibrarymember{operator-}{counted_iterator}% |
|
6318 | 6318 | \pnum |
6319 | 6319 | \effects |
6320 | 6320 | Equivalent to: |
6321 | | -\tcode{return -x.length;} |
| 6321 | +\tcode{return -x.\exposid{length};} |
6322 | 6322 | \end{itemdescr} |
6323 | 6323 |
|
6324 | 6324 | \indexlibrarymember{operator-}{counted_iterator}% |
|
6330 | 6330 | \begin{itemdescr} |
6331 | 6331 | \pnum |
6332 | 6332 | \effects |
6333 | | -Equivalent to: \tcode{return y.length;} |
| 6333 | +Equivalent to: \tcode{return y.\exposid{length};} |
6334 | 6334 | \end{itemdescr} |
6335 | 6335 |
|
6336 | 6336 | \indexlibrarymember{operator-=}{counted_iterator}% |
|
6342 | 6342 | \begin{itemdescr} |
6343 | 6343 | \pnum |
6344 | 6344 | \hardexpects |
6345 | | -\tcode{-n <= length} is \tcode{true}. |
| 6345 | +\tcode{-n <= \exposid{length} is \tcode{true}}. |
6346 | 6346 |
|
6347 | 6347 | \pnum |
6348 | 6348 | \effects |
6349 | 6349 | Equivalent to: |
6350 | 6350 | \begin{codeblock} |
6351 | | -current -= n; |
6352 | | -length += n; |
| 6351 | +@\exposid{current}@ -= n; |
| 6352 | +@\exposid{length}@ += n; |
6353 | 6353 | return *this; |
6354 | 6354 | \end{codeblock} |
6355 | 6355 | \end{itemdescr} |
|
6371 | 6371 |
|
6372 | 6372 | \pnum |
6373 | 6373 | \effects |
6374 | | -Equivalent to: \tcode{return x.length == y.length;} |
| 6374 | +Equivalent to: \tcode{return x.\exposid{length} == y.\exposid{length};} |
6375 | 6375 | \end{itemdescr} |
6376 | 6376 |
|
6377 | 6377 | \indexlibrarymember{operator==}{counted_iterator}% |
|
6383 | 6383 | \begin{itemdescr} |
6384 | 6384 | \pnum |
6385 | 6385 | \effects |
6386 | | -Equivalent to: \tcode{return x.length == 0;} |
| 6386 | +Equivalent to: \tcode{return x.\exposid{length} == 0;} |
6387 | 6387 | \end{itemdescr} |
6388 | 6388 |
|
6389 | 6389 | \indexlibrarymember{operator<=>}{counted_iterator}% |
|
6401 | 6401 |
|
6402 | 6402 | \pnum |
6403 | 6403 | \effects |
6404 | | -Equivalent to: \tcode{return y.length <=> x.length;} |
| 6404 | +Equivalent to: \tcode{return y.\exposid{length} <=> x.\exposid{length};} |
6405 | 6405 |
|
6406 | 6406 | \pnum |
6407 | 6407 | \begin{note} |
6408 | 6408 | The argument order in the \effects element is reversed |
6409 | | -because \tcode{length} counts down, not up. |
| 6409 | +because \exposid{length} counts down, not up. |
6410 | 6410 | \end{note} |
6411 | 6411 | \end{itemdescr} |
6412 | 6412 |
|
|
6416 | 6416 | \begin{itemdecl} |
6417 | 6417 | friend constexpr decltype(auto) |
6418 | 6418 | iter_move(const counted_iterator& i) |
6419 | | - noexcept(noexcept(ranges::iter_move(i.current))) |
| 6419 | + noexcept(noexcept(ranges::iter_move(i.@\exposid{current}@))) |
6420 | 6420 | requires @\libconcept{input_iterator}@<I>; |
6421 | 6421 | \end{itemdecl} |
6422 | 6422 |
|
6423 | 6423 | \begin{itemdescr} |
6424 | 6424 | \pnum |
6425 | 6425 | \hardexpects |
6426 | | -\tcode{i.length > 0} is \tcode{true}. |
| 6426 | +\tcode{i.\exposid{length} > 0} is \tcode{true}. |
6427 | 6427 |
|
6428 | 6428 | \pnum |
6429 | 6429 | \effects |
6430 | | -Equivalent to: \tcode{return ranges::iter_move(i.current);} |
| 6430 | +Equivalent to: \tcode{return ranges::iter_move(i.\exposid{current});} |
6431 | 6431 | \end{itemdescr} |
6432 | 6432 |
|
6433 | 6433 | \indexlibrarymember{iter_swap}{counted_iterator}% |
6434 | 6434 | \begin{itemdecl} |
6435 | 6435 | template<@\libconcept{indirectly_swappable}@<I> I2> |
6436 | 6436 | friend constexpr void |
6437 | 6437 | iter_swap(const counted_iterator& x, const counted_iterator<I2>& y) |
6438 | | - noexcept(noexcept(ranges::iter_swap(x.current, y.current))); |
| 6438 | + noexcept(noexcept(ranges::iter_swap(x.@\exposid{current}@, y.@\exposid{current}@))); |
6439 | 6439 | \end{itemdecl} |
6440 | 6440 |
|
6441 | 6441 | \begin{itemdescr} |
6442 | 6442 | \pnum |
6443 | 6443 | \hardexpects |
6444 | | -Both \tcode{x.length > 0} and \tcode{y.length > 0} are \tcode{true}. |
| 6444 | +Both \tcode{x.\exposid{length} > 0} and \tcode{y.\exposid{length} > 0} are \tcode{true}. |
6445 | 6445 |
|
6446 | 6446 | \pnum |
6447 | 6447 | \effects |
6448 | | -Equivalent to \tcode{ranges::iter_swap(x.current, y.current)}. |
| 6448 | +Equivalent to \tcode{ranges::iter_swap(x.\exposid{current}, y.\exposid{current})}. |
6449 | 6449 | \end{itemdescr} |
6450 | 6450 |
|
6451 | 6451 | \rSec2[unreachable.sentinel]{Unreachable sentinel} |
|
0 commit comments