Skip to content

Commit 279c729

Browse files
committed
[range.repeat.view] Apply modifications from P2494R2
1 parent ce979ad commit 279c729

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
@@ -183,7 +183,7 @@
183183
namespace views { inline constexpr @\unspec@ iota = @\unspec@; }
184184

185185
// \ref{range.repeat}, repeat view
186-
template<@\libconcept{copy_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t>
186+
template<@\libconcept{move_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t>
187187
requires (is_object_v<W> && @\libconcept{same_as}@<W, remove_cv_t<W>>
188188
&& (@\exposid{is-integer-like}@<Bound> || @\libconcept{same_as}@<Bound, unreachable_sentinel_t>))
189189
class repeat_view;
@@ -3240,22 +3240,23 @@
32403240

32413241
\begin{codeblock}
32423242
namespace std::ranges {
3243-
template<@\libconcept{copy_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t>
3243+
template<@\libconcept{move_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t>
32443244
requires (is_object_v<W> && @\libconcept{same_as}@<W, remove_cv_t<W>>
32453245
&& (@\exposid{is-integer-like}@<Bound> || @\libconcept{same_as}@<Bound, unreachable_sentinel_t>))
32463246
class @\libglobal{repeat_view}@ : public view_interface<repeat_view<W, Bound>> {
32473247
private:
32483248
// \ref{range.repeat.iterator}, class \tcode{range_view::\exposid{iterator}}
32493249
struct @\exposid{iterator}@; // \expos
32503250

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

32543254
public:
32553255
repeat_view() requires @\libconcept{default_initializable}@<W> = default;
32563256

3257-
constexpr explicit repeat_view(const W& value, Bound bound = Bound());
3258-
constexpr explicit repeat_view(W&& value, Bound bound = Bound());
3257+
constexpr explicit repeat_view(const W& value, Bound bound = Bound())
3258+
requires @\libconcept{copy_constructible}@<W>;
3259+
constexpr explicit repeat_view(W && value, Bound bound = Bound());
32593260
template<class... WArgs, class... BoundArgs>
32603261
requires @\libconcept{constructible_from}@<W, WArgs...> &&
32613262
@\libconcept{constructible_from}@<Bound, BoundArgs...>

0 commit comments

Comments
 (0)