Skip to content

Commit d5aea28

Browse files
jensmaurertkoeppe
authored andcommitted
[range.repeat.view] Apply modifications from P2494R2
1 parent 1df7957 commit d5aea28

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

source/ranges.tex

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
namespace views { inline constexpr @\unspecnc@ iota = @\unspecnc@; } // freestanding
191191

192192
// \ref{range.repeat}, repeat view
193-
template<@\libconcept{copy_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t>
193+
template<@\libconcept{move_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t>
194194
requires (is_object_v<W> && @\libconcept{same_as}@<W, remove_cv_t<W>>
195195
&& (@\exposid{is-integer-like}@<Bound> || @\libconcept{same_as}@<Bound, unreachable_sentinel_t>))
196196
class repeat_view;
@@ -3365,21 +3365,22 @@
33653365

33663366
\begin{codeblock}
33673367
namespace std::ranges {
3368-
template<@\libconcept{copy_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t>
3368+
template<@\libconcept{move_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t>
33693369
requires (is_object_v<W> && @\libconcept{same_as}@<W, remove_cv_t<W>> &&
33703370
(@\exposid{is-integer-like}@<Bound> || @\libconcept{same_as}@<Bound, unreachable_sentinel_t>))
33713371
class @\libglobal{repeat_view}@ : public view_interface<repeat_view<W, Bound>> {
33723372
private:
33733373
// \ref{range.repeat.iterator}, class \tcode{range_view::\exposid{iterator}}
33743374
struct @\exposid{iterator}@; // \expos
33753375

3376-
@\exposid{copyable-box}@<W> @\exposid{value_}@ = W(); // \expos, see \ref{range.copy.wrap}
3376+
@\exposid{movable-box}@<W> @\exposid{value_}@ = W(); // \expos, see \ref{range.move.wrap}
33773377
Bound @\exposid{bound_}@ = Bound(); // \expos
33783378

33793379
public:
33803380
repeat_view() requires @\libconcept{default_initializable}@<W> = default;
33813381

3382-
constexpr explicit repeat_view(const W& value, Bound bound = Bound());
3382+
constexpr explicit repeat_view(const W& value, Bound bound = Bound())
3383+
requires @\libconcept{copy_constructible}@<W>;
33833384
constexpr explicit repeat_view(W&& value, Bound bound = Bound());
33843385
template<class... WArgs, class... BoundArgs>
33853386
requires @\libconcept{constructible_from}@<W, WArgs...> &&
@@ -3500,7 +3501,7 @@
35003501

35013502
\begin{codeblock}
35023503
namespace std::ranges {
3503-
template<@\libconcept{copy_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t>
3504+
template<@\libconcept{move_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t>
35043505
requires (is_object_v<W> && @\libconcept{same_as}@<W, remove_cv_t<W>> &&
35053506
(@\exposid{is-integer-like}@<Bound> || @\libconcept{same_as}@<Bound, unreachable_sentinel_t>))
35063507
class repeat_view<W, Bound>::@\exposid{iterator}@ {

0 commit comments

Comments
 (0)