|
1670 | 1670 | Equivalent to:
|
1671 | 1671 | \begin{itemize}
|
1672 | 1672 | \item If \exposid{StoreSize} is \tcode{true},
|
1673 |
| -\tcode{subrange\{r, ranges::size(r)\}}. |
1674 |
| -\item Otherwise, \tcode{subrange\{ranges::begin(r), ranges::end(r)\}}. |
| 1673 | +\tcode{subrange(r, ranges::size(r))}. |
| 1674 | +\item Otherwise, \tcode{subrange(ranges::begin(r), ranges::end(r))}. |
1675 | 1675 | \end{itemize}
|
1676 | 1676 | \end{itemdescr}
|
1677 | 1677 |
|
|
1963 | 1963 | customization point object\iref{customization.point.object}.
|
1964 | 1964 | Given a subexpression \tcode{E}, the expression
|
1965 | 1965 | \tcode{views::single(E)} is expression-equivalent to
|
1966 |
| -\tcode{single_view\{E\}}. |
| 1966 | +\tcode{single_view<decay_t<decltype((E))>>(E)}. |
1967 | 1967 |
|
1968 | 1968 | \pnum
|
1969 | 1969 | \begin{example}
|
|
2000 | 2000 | constexpr T* data() noexcept;
|
2001 | 2001 | constexpr const T* data() const noexcept;
|
2002 | 2002 | };
|
| 2003 | + |
| 2004 | + template<class T> |
| 2005 | + single_view(T) -> single_view<T>; |
2003 | 2006 | }
|
2004 | 2007 | \end{codeblock}
|
2005 | 2008 |
|
|
2101 | 2104 | Given subexpressions \tcode{E} and \tcode{F}, the expressions
|
2102 | 2105 | \tcode{views::iota(E)} and \tcode{views::iota(E, F)}
|
2103 | 2106 | are expression-equivalent to
|
2104 |
| -\tcode{iota_view\{E\}} and \tcode{iota_view\{E, F\}}, respectively. |
| 2107 | +\tcode{iota_view(E)} and \tcode{iota_view(E, F)}, respectively. |
2105 | 2108 |
|
2106 | 2109 | \pnum
|
2107 | 2110 | \begin{example}
|
|
3344 | 3347 | range adaptor object\iref{range.adaptor.object}.
|
3345 | 3348 | Given subexpressions \tcode{E} and \tcode{P},
|
3346 | 3349 | the expression \tcode{views::filter(E, P)} is expression-equivalent to
|
3347 |
| -\tcode{filter_view\{E, P\}}. |
| 3350 | +\tcode{filter_view(E, P)}. |
3348 | 3351 |
|
3349 | 3352 | \pnum
|
3350 | 3353 | \begin{example}
|
|
3765 | 3768 | range adaptor object\iref{range.adaptor.object}.
|
3766 | 3769 | Given subexpressions \tcode{E} and \tcode{F}, the expression
|
3767 | 3770 | \tcode{views::transform(E, F)} is expression-equivalent to
|
3768 |
| -\tcode{transform_view\{E, F\}}. |
| 3771 | +\tcode{transform_view(E, F)}. |
3769 | 3772 |
|
3770 | 3773 | \pnum
|
3771 | 3774 | \begin{example}
|
|
4459 | 4462 | \item
|
4460 | 4463 | If \tcode{T} is a specialization
|
4461 | 4464 | of \tcode{ranges::empty_view}\iref{range.empty.view},
|
4462 |
| -then \tcode{((void) F, \placeholdernc{decay-copy}(E))}. |
| 4465 | +then \tcode{((void) F, \placeholdernc{decay-copy}(E))}, |
| 4466 | +except that the evaluations of \tcode{E} and \tcode{F} |
| 4467 | +are indeterminately sequenced. |
4463 | 4468 |
|
4464 | 4469 | \item
|
4465 | 4470 | Otherwise, if \tcode{T} models
|
|
4471 | 4476 | \item a specialization of \tcode{ranges::iota_view}\iref{range.iota.view}, or
|
4472 | 4477 | \item a specialization of \tcode{ranges::subrange}\iref{range.subrange},
|
4473 | 4478 | \end{itemize}
|
4474 |
| -then \tcode{T\{ranges::begin(E), ranges::begin(E) + min<D>(ranges::size(E), F)\}}, |
| 4479 | +then \tcode{T(ranges::begin(E), ranges::begin(E) + min<D>(ranges::size(E), F))}, |
4475 | 4480 | except that \tcode{E} is evaluated only once.
|
4476 | 4481 |
|
4477 | 4482 | \item
|
4478 |
| -Otherwise, \tcode{ranges::take_view\{E, F\}}. |
| 4483 | +Otherwise, \tcode{ranges::take_view(E, F)}. |
4479 | 4484 | \end{itemize}
|
4480 | 4485 |
|
4481 | 4486 | \pnum
|
|
4517 | 4522 | return ranges::begin(@\exposid{base_}@);
|
4518 | 4523 | else {
|
4519 | 4524 | auto sz = size();
|
4520 |
| - return counted_iterator{ranges::begin(@\exposid{base_}@), sz}; |
| 4525 | + return counted_iterator(ranges::begin(@\exposid{base_}@), sz); |
4521 | 4526 | }
|
4522 | 4527 | } else
|
4523 |
| - return counted_iterator{ranges::begin(@\exposid{base_}@), @\exposid{count_}@}; |
| 4528 | + return counted_iterator(ranges::begin(@\exposid{base_}@), @\exposid{count_}@); |
4524 | 4529 | }
|
4525 | 4530 |
|
4526 | 4531 | constexpr auto begin() const requires @\libconcept{range}@<const V> {
|
|
4529 | 4534 | return ranges::begin(@\exposid{base_}@);
|
4530 | 4535 | else {
|
4531 | 4536 | auto sz = size();
|
4532 |
| - return counted_iterator{ranges::begin(@\exposid{base_}@), sz}; |
| 4537 | + return counted_iterator(ranges::begin(@\exposid{base_}@), sz); |
4533 | 4538 | }
|
4534 | 4539 | } else
|
4535 |
| - return counted_iterator{ranges::begin(@\exposid{base_}@), @\exposid{count_}@}; |
| 4540 | + return counted_iterator(ranges::begin(@\exposid{base_}@), @\exposid{count_}@); |
4536 | 4541 | }
|
4537 | 4542 |
|
4538 | 4543 | constexpr auto end() requires (!@\exposconcept{simple-view}@<V>) {
|
|
4680 | 4685 | a range adaptor object\iref{range.adaptor.object}.
|
4681 | 4686 | Given subexpressions \tcode{E} and \tcode{F},
|
4682 | 4687 | the expression \tcode{views::take_while(E, F)}
|
4683 |
| -is expression-equivalent to \tcode{take_while_view\{E, F\}}. |
| 4688 | +is expression-equivalent to \tcode{take_while_view(E, F)}. |
4684 | 4689 |
|
4685 | 4690 | \pnum
|
4686 | 4691 | \begin{example}
|
|
4868 | 4873 | \item
|
4869 | 4874 | If \tcode{T} is a specialization of
|
4870 | 4875 | \tcode{ranges::empty_view}\iref{range.empty.view},
|
4871 |
| -then \tcode{((void) F, \placeholdernc{decay-copy}(E))}. |
| 4876 | +then \tcode{((void) F, \placeholdernc{decay-copy}(E))}, |
| 4877 | +except that the evaluations of \tcode{E} and \tcode{F} |
| 4878 | +are indeterminately sequenced. |
4872 | 4879 |
|
4873 | 4880 | \item
|
4874 | 4881 | Otherwise, if \tcode{T} models
|
|
4880 | 4887 | \item a specialization of \tcode{ranges::iota_view}\iref{range.iota.view}, or
|
4881 | 4888 | \item a specialization of \tcode{ranges::subrange}\iref{range.subrange},
|
4882 | 4889 | \end{itemize}
|
4883 |
| -then \tcode{T\{ranges::begin(E) + min<D>(ranges::size(E), F), ranges::end(E)\}}, |
| 4890 | +then \tcode{T(ranges::begin(E) + min<D>(ranges::size(E), F), ranges::end(E))}, |
4884 | 4891 | except that \tcode{E} is evaluated only once.
|
4885 | 4892 |
|
4886 | 4893 | \item
|
4887 |
| -Otherwise, \tcode{ranges::drop_view\{E, F\}}. |
| 4894 | +Otherwise, \tcode{ranges::drop_view(E, F)}. |
4888 | 4895 | \end{itemize}
|
4889 | 4896 |
|
4890 | 4897 | \pnum
|
|
5013 | 5020 | denotes a range adaptor object\iref{range.adaptor.object}.
|
5014 | 5021 | Given subexpressions \tcode{E} and \tcode{F},
|
5015 | 5022 | the expression \tcode{views::drop_while(E, F)}
|
5016 |
| -is expression-equivalent to \tcode{drop_while_view\{E, F\}}. |
| 5023 | +is expression-equivalent to \tcode{drop_while_view(E, F)}. |
5017 | 5024 |
|
5018 | 5025 | \pnum
|
5019 | 5026 | \begin{example}
|
|
5613 | 5620 | range adaptor object\iref{range.adaptor.object}.
|
5614 | 5621 | Given subexpressions \tcode{E} and \tcode{F},
|
5615 | 5622 | the expression \tcode{views::lazy_split(E, F)} is expression-equivalent to
|
5616 |
| -\tcode{lazy_split_view\{E, F\}}. |
| 5623 | +\tcode{lazy_split_view(E, F)}. |
5617 | 5624 |
|
5618 | 5625 | \pnum
|
5619 | 5626 | \begin{example}
|
|
5730 | 5737 | \pnum
|
5731 | 5738 | \effects
|
5732 | 5739 | Initializes \exposid{base_} with \tcode{views::all(std::forward<R>(r))}, and
|
5733 |
| -\exposid{pattern_} with \tcode{single_view\{\brk{}std::move(e)\}}. |
| 5740 | +\exposid{pattern_} with \tcode{views::\linebreak single(std::move(e))}. |
5734 | 5741 | \end{itemdescr}
|
5735 | 5742 |
|
5736 | 5743 | \rSec3[range.lazy.split.outer]{Class template \tcode{lazy_split_view::\exposid{outer-iterator}}}
|
|
6238 | 6245 | \exposid{pattern_} with \tcode{std::move(pattern)}.
|
6239 | 6246 | \end{itemdescr}
|
6240 | 6247 |
|
| 6248 | +\indexlibraryctor{split_view}% |
6241 | 6249 | \begin{itemdecl}
|
6242 | 6250 | template<@\libconcept{forward_range}@ R>
|
6243 | 6251 | requires @\libconcept{constructible_from}@<V, views::all_t<R>> &&
|
|
6249 | 6257 | \pnum
|
6250 | 6258 | \effects
|
6251 | 6259 | Initializes \exposid{base_} with \tcode{views::all(std::forward<R>(r))}, and
|
6252 |
| -\exposid{pattern_} with \tcode{single_view\{std::move(e)\}}. |
| 6260 | +\exposid{pattern_} with \tcode{views::\linebreak single(std::move(e))}. |
6253 | 6261 | \end{itemdescr}
|
6254 | 6262 |
|
6255 | 6263 | \begin{itemdecl}
|
|
6475 | 6483 | \begin{itemize}
|
6476 | 6484 | \item
|
6477 | 6485 | If \tcode{T} models \libconcept{contiguous_iterator},
|
6478 |
| -then \tcode{span\{to_address(E), static_cast<D>(F)\}}. |
| 6486 | +then \tcode{span(to_address(E), static_cast<D>(F))}. |
6479 | 6487 |
|
6480 | 6488 | \item
|
6481 | 6489 | Otherwise, if \tcode{T} models \libconcept{random_access_iterator},
|
6482 |
| -then \tcode{subrange\{E, E + static_cast<D>(F)\}}, |
| 6490 | +then \tcode{subrange(E, E + static_cast<D>(F))}, |
6483 | 6491 | except that \tcode{E} is evaluated only once.
|
6484 | 6492 |
|
6485 | 6493 | \item
|
6486 | 6494 | Otherwise,
|
6487 |
| -\tcode{subrange\{counted_iterator\{E, F\}, default_sentinel\}}. |
| 6495 | +\tcode{subrange(counted_iterator(E, F), default_sentinel)}. |
6488 | 6496 | \end{itemize}
|
6489 | 6497 |
|
6490 | 6498 | \rSec2[range.common]{Common view}
|
|
0 commit comments