Skip to content

Commit 97bd5a6

Browse files
authored
Merge 2023-02 LWG Motion 7
P2711R1 Making multi-param constructors of views explicit
2 parents a6a8896 + f84bce2 commit 97bd5a6

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

source/ranges.tex

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2684,8 +2684,8 @@
26842684
public:
26852685
iota_view() requires @\libconcept{default_initializable}@<W> = default;
26862686
constexpr explicit iota_view(W value);
2687-
constexpr iota_view(type_identity_t<W> value, type_identity_t<Bound> bound);
2688-
constexpr iota_view(@\exposid{iterator}@ first, @\seebelow@ last);
2687+
constexpr explicit iota_view(type_identity_t<W> value, type_identity_t<Bound> bound);
2688+
constexpr explicit iota_view(@\exposid{iterator}@ first, @\seebelow@ last);
26892689

26902690
constexpr @\exposid{iterator}@ begin() const;
26912691
constexpr auto end() const;
@@ -2818,7 +2818,7 @@
28182818

28192819
\indexlibraryctor{iota_view}%
28202820
\begin{itemdecl}
2821-
constexpr iota_view(type_identity_t<W> value, type_identity_t<Bound> bound);
2821+
constexpr explicit iota_view(type_identity_t<W> value, type_identity_t<Bound> bound);
28222822
\end{itemdecl}
28232823

28242824
\begin{itemdescr}
@@ -2837,7 +2837,7 @@
28372837

28382838
\indexlibraryctor{iota_view}%
28392839
\begin{itemdecl}
2840-
constexpr iota_view(@\exposid{iterator}@ first, @\seebelow@ last);
2840+
constexpr explicit iota_view(@\exposid{iterator}@ first, @\seebelow@ last);
28412841
\end{itemdecl}
28422842

28432843
\begin{itemdescr}
@@ -4595,7 +4595,7 @@
45954595

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

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

46194619
\indexlibraryctor{filter_view}%
46204620
\begin{itemdecl}
4621-
constexpr filter_view(V base, Pred pred);
4621+
constexpr explicit filter_view(V base, Pred pred);
46224622
\end{itemdecl}
46234623

46244624
\begin{itemdescr}
@@ -5022,7 +5022,7 @@
50225022

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

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

50545054
\indexlibraryctor{transform_view}%
50555055
\begin{itemdecl}
5056-
constexpr transform_view(V base, F fun);
5056+
constexpr explicit transform_view(V base, F fun);
50575057
\end{itemdecl}
50585058

50595059
\begin{itemdescr}
@@ -5760,7 +5760,7 @@
57605760

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

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

58455845
\indexlibraryctor{take_view}%
58465846
\begin{itemdecl}
5847-
constexpr take_view(V base, range_difference_t<V> count);
5847+
constexpr explicit take_view(V base, range_difference_t<V> count);
58485848
\end{itemdecl}
58495849

58505850
\begin{itemdescr}
@@ -5991,7 +5991,7 @@
59915991

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

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

60236023
\indexlibraryctor{take_while_view}%
60246024
\begin{itemdecl}
6025-
constexpr take_while_view(V base, Pred pred);
6025+
constexpr explicit take_while_view(V base, Pred pred);
60266026
\end{itemdecl}
60276027

60286028
\begin{itemdescr}
@@ -6215,7 +6215,7 @@
62156215
class drop_view : public view_interface<drop_view<V>> {
62166216
public:
62176217
drop_view() requires @\libconcept{default_initializable}@<V> = default;
6218-
constexpr drop_view(V base, range_difference_t<V> count);
6218+
constexpr explicit drop_view(V base, range_difference_t<V> count);
62196219

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

62576257
\indexlibraryctor{drop_view}%
62586258
\begin{itemdecl}
6259-
constexpr drop_view(V base, range_difference_t<V> count);
6259+
constexpr explicit drop_view(V base, range_difference_t<V> count);
62606260
\end{itemdecl}
62616261

62626262
\begin{itemdescr}
@@ -6340,7 +6340,7 @@
63406340
class drop_while_view : public view_interface<drop_while_view<V, Pred>> {
63416341
public:
63426342
drop_while_view() requires @\libconcept{default_initializable}@<V> && @\libconcept{default_initializable}@<Pred> = default;
6343-
constexpr drop_while_view(V base, Pred pred);
6343+
constexpr explicit drop_while_view(V base, Pred pred);
63446344

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

63646364
\indexlibraryctor{drop_while_view}%
63656365
\begin{itemdecl}
6366-
constexpr drop_while_view(V base, Pred pred);
6366+
constexpr explicit drop_while_view(V base, Pred pred);
63676367
\end{itemdecl}
63686368

63696369
\begin{itemdescr}
@@ -7012,12 +7012,12 @@
70127012
join_with_view()
70137013
requires @\libconcept{default_initializable}@<V> && @\libconcept{default_initializable}@<Pattern> = default;
70147014

7015-
constexpr join_with_view(V base, Pattern pattern);
7015+
constexpr explicit join_with_view(V base, Pattern pattern);
70167016

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

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

70747074
\begin{itemdecl}
7075-
constexpr join_with_view(V base, Pattern pattern);
7075+
constexpr explicit join_with_view(V base, Pattern pattern);
70767076
\end{itemdecl}
70777077

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

70927092
\begin{itemdescr}
@@ -7630,12 +7630,12 @@
76307630
public:
76317631
lazy_split_view()
76327632
requires @\libconcept{default_initializable}@<V> && @\libconcept{default_initializable}@<Pattern> = default;
7633-
constexpr lazy_split_view(V base, Pattern pattern);
7633+
constexpr explicit lazy_split_view(V base, Pattern pattern);
76347634

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

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

76797679
\indexlibraryctor{lazy_split_view}%
76807680
\begin{itemdecl}
7681-
constexpr lazy_split_view(V base, Pattern pattern);
7681+
constexpr explicit lazy_split_view(V base, Pattern pattern);
76827682
\end{itemdecl}
76837683

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

76997699
\begin{itemdescr}
@@ -8174,12 +8174,12 @@
81748174
public:
81758175
split_view()
81768176
requires @\libconcept{default_initializable}@<V> && @\libconcept{default_initializable}@<Pattern> = default;
8177-
constexpr split_view(V base, Pattern pattern);
8177+
constexpr explicit split_view(V base, Pattern pattern);
81788178

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

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

82098209
\begin{itemdecl}
8210-
constexpr split_view(V base, Pattern pattern);
8210+
constexpr explicit split_view(V base, Pattern pattern);
82118211
\end{itemdecl}
82128212

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

82288228
\begin{itemdescr}

0 commit comments

Comments
 (0)