Skip to content

[LWG 7] P2711R1 Making multi-param constructors of views explicit #6136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions source/ranges.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2684,8 +2684,8 @@
public:
iota_view() requires @\libconcept{default_initializable}@<W> = default;
constexpr explicit iota_view(W value);
constexpr iota_view(type_identity_t<W> value, type_identity_t<Bound> bound);
constexpr iota_view(@\exposid{iterator}@ first, @\seebelow@ last);
constexpr explicit iota_view(type_identity_t<W> value, type_identity_t<Bound> bound);
constexpr explicit iota_view(@\exposid{iterator}@ first, @\seebelow@ last);

constexpr @\exposid{iterator}@ begin() const;
constexpr auto end() const;
Expand Down Expand Up @@ -2818,7 +2818,7 @@

\indexlibraryctor{iota_view}%
\begin{itemdecl}
constexpr iota_view(type_identity_t<W> value, type_identity_t<Bound> bound);
constexpr explicit iota_view(type_identity_t<W> value, type_identity_t<Bound> bound);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -2837,7 +2837,7 @@

\indexlibraryctor{iota_view}%
\begin{itemdecl}
constexpr iota_view(@\exposid{iterator}@ first, @\seebelow@ last);
constexpr explicit iota_view(@\exposid{iterator}@ first, @\seebelow@ last);
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -4595,7 +4595,7 @@

public:
filter_view() requires @\libconcept{default_initializable}@<V> && @\libconcept{default_initializable}@<Pred> = default;
constexpr filter_view(V base, Pred pred);
constexpr explicit filter_view(V base, Pred pred);

constexpr V base() const & requires @\libconcept{copy_constructible}@<V> { return @\exposid{base_}@; }
constexpr V base() && { return std::move(@\exposid{base_}@); }
Expand All @@ -4618,7 +4618,7 @@

\indexlibraryctor{filter_view}%
\begin{itemdecl}
constexpr filter_view(V base, Pred pred);
constexpr explicit filter_view(V base, Pred pred);
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -5022,7 +5022,7 @@

public:
transform_view() requires @\libconcept{default_initializable}@<V> && @\libconcept{default_initializable}@<F> = default;
constexpr transform_view(V base, F fun);
constexpr explicit transform_view(V base, F fun);

constexpr V base() const & requires @\libconcept{copy_constructible}@<V> { return @\exposid{base_}@; }
constexpr V base() && { return std::move(@\exposid{base_}@); }
Expand Down Expand Up @@ -5053,7 +5053,7 @@

\indexlibraryctor{transform_view}%
\begin{itemdecl}
constexpr transform_view(V base, F fun);
constexpr explicit transform_view(V base, F fun);
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -5760,7 +5760,7 @@

public:
take_view() requires @\libconcept{default_initializable}@<V> = default;
constexpr take_view(V base, range_difference_t<V> count);
constexpr explicit take_view(V base, range_difference_t<V> count);

constexpr V base() const & requires @\libconcept{copy_constructible}@<V> { return @\exposid{base_}@; }
constexpr V base() && { return std::move(@\exposid{base_}@); }
Expand Down Expand Up @@ -5844,7 +5844,7 @@

\indexlibraryctor{take_view}%
\begin{itemdecl}
constexpr take_view(V base, range_difference_t<V> count);
constexpr explicit take_view(V base, range_difference_t<V> count);
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -5991,7 +5991,7 @@

public:
take_while_view() requires @\libconcept{default_initializable}@<V> && @\libconcept{default_initializable}@<Pred> = default;
constexpr take_while_view(V base, Pred pred);
constexpr explicit take_while_view(V base, Pred pred);

constexpr V base() const & requires @\libconcept{copy_constructible}@<V> { return @\exposid{base_}@; }
constexpr V base() && { return std::move(@\exposid{base_}@); }
Expand Down Expand Up @@ -6022,7 +6022,7 @@

\indexlibraryctor{take_while_view}%
\begin{itemdecl}
constexpr take_while_view(V base, Pred pred);
constexpr explicit take_while_view(V base, Pred pred);
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -6215,7 +6215,7 @@
class drop_view : public view_interface<drop_view<V>> {
public:
drop_view() requires @\libconcept{default_initializable}@<V> = default;
constexpr drop_view(V base, range_difference_t<V> count);
constexpr explicit drop_view(V base, range_difference_t<V> count);

constexpr V base() const & requires @\libconcept{copy_constructible}@<V> { return @\exposid{base_}@; }
constexpr V base() && { return std::move(@\exposid{base_}@); }
Expand Down Expand Up @@ -6256,7 +6256,7 @@

\indexlibraryctor{drop_view}%
\begin{itemdecl}
constexpr drop_view(V base, range_difference_t<V> count);
constexpr explicit drop_view(V base, range_difference_t<V> count);
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -6340,7 +6340,7 @@
class drop_while_view : public view_interface<drop_while_view<V, Pred>> {
public:
drop_while_view() requires @\libconcept{default_initializable}@<V> && @\libconcept{default_initializable}@<Pred> = default;
constexpr drop_while_view(V base, Pred pred);
constexpr explicit drop_while_view(V base, Pred pred);

constexpr V base() const & requires @\libconcept{copy_constructible}@<V> { return @\exposid{base_}@; }
constexpr V base() && { return std::move(@\exposid{base_}@); }
Expand All @@ -6363,7 +6363,7 @@

\indexlibraryctor{drop_while_view}%
\begin{itemdecl}
constexpr drop_while_view(V base, Pred pred);
constexpr explicit drop_while_view(V base, Pred pred);
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -7012,12 +7012,12 @@
join_with_view()
requires @\libconcept{default_initializable}@<V> && @\libconcept{default_initializable}@<Pattern> = default;

constexpr join_with_view(V base, Pattern pattern);
constexpr explicit join_with_view(V base, Pattern pattern);

template<@\libconcept{input_range}@ R>
requires @\libconcept{constructible_from}@<V, views::all_t<R>> &&
@\libconcept{constructible_from}@<Pattern, single_view<range_value_t<@\exposid{InnerRng}@>>>
constexpr join_with_view(R&& r, range_value_t<@\exposid{InnerRng}@> e);
constexpr explicit join_with_view(R&& r, range_value_t<@\exposid{InnerRng}@> e);

constexpr V base() const & requires @\libconcept{copy_constructible}@<V> { return @\exposid{base_}@; }
constexpr V base() && { return std::move(@\exposid{base_}@); }
Expand Down Expand Up @@ -7072,7 +7072,7 @@
\end{codeblock}

\begin{itemdecl}
constexpr join_with_view(V base, Pattern pattern);
constexpr explicit join_with_view(V base, Pattern pattern);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -7086,7 +7086,7 @@
template<@\libconcept{input_range}@ R>
requires @\libconcept{constructible_from}@<V, views::all_t<R>> &&
@\libconcept{constructible_from}@<Pattern, single_view<range_value_t<@\exposid{InnerRng}@>>>
constexpr join_with_view(R&& r, range_value_t<@\exposid{InnerRng}@> e);
constexpr explicit join_with_view(R&& r, range_value_t<@\exposid{InnerRng}@> e);
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -7630,12 +7630,12 @@
public:
lazy_split_view()
requires @\libconcept{default_initializable}@<V> && @\libconcept{default_initializable}@<Pattern> = default;
constexpr lazy_split_view(V base, Pattern pattern);
constexpr explicit lazy_split_view(V base, Pattern pattern);

template<@\libconcept{input_range}@ R>
requires @\libconcept{constructible_from}@<V, views::all_t<R>> &&
@\libconcept{constructible_from}@<Pattern, single_view<range_value_t<R>>>
constexpr lazy_split_view(R&& r, range_value_t<R> e);
constexpr explicit lazy_split_view(R&& r, range_value_t<R> e);

constexpr V base() const & requires @\libconcept{copy_constructible}@<V> { return @\exposid{base_}@; }
constexpr V base() && { return std::move(@\exposid{base_}@); }
Expand Down Expand Up @@ -7678,7 +7678,7 @@

\indexlibraryctor{lazy_split_view}%
\begin{itemdecl}
constexpr lazy_split_view(V base, Pattern pattern);
constexpr explicit lazy_split_view(V base, Pattern pattern);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -7693,7 +7693,7 @@
template<@\libconcept{input_range}@ R>
requires @\libconcept{constructible_from}@<V, views::all_t<R>> &&
@\libconcept{constructible_from}@<Pattern, single_view<range_value_t<R>>>
constexpr lazy_split_view(R&& r, range_value_t<R> e);
constexpr explicit lazy_split_view(R&& r, range_value_t<R> e);
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -8174,12 +8174,12 @@
public:
split_view()
requires @\libconcept{default_initializable}@<V> && @\libconcept{default_initializable}@<Pattern> = default;
constexpr split_view(V base, Pattern pattern);
constexpr explicit split_view(V base, Pattern pattern);

template<@\libconcept{forward_range}@ R>
requires @\libconcept{constructible_from}@<V, views::all_t<R>> &&
@\libconcept{constructible_from}@<Pattern, single_view<range_value_t<R>>>
constexpr split_view(R&& r, range_value_t<R> e);
constexpr explicit split_view(R&& r, range_value_t<R> e);

constexpr V base() const & requires @\libconcept{copy_constructible}@<V> { return @\exposid{base_}@; }
constexpr V base() && { return std::move(@\exposid{base_}@); }
Expand Down Expand Up @@ -8207,7 +8207,7 @@
\end{codeblock}

\begin{itemdecl}
constexpr split_view(V base, Pattern pattern);
constexpr explicit split_view(V base, Pattern pattern);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -8222,7 +8222,7 @@
template<@\libconcept{forward_range}@ R>
requires @\libconcept{constructible_from}@<V, views::all_t<R>> &&
@\libconcept{constructible_from}@<Pattern, single_view<range_value_t<R>>>
constexpr split_view(R&& r, range_value_t<R> e);
constexpr explicit split_view(R&& r, range_value_t<R> e);
\end{itemdecl}

\begin{itemdescr}
Expand Down