Skip to content

Commit ae88bb5

Browse files
frederick-vs-jatkoeppe
authored andcommitted
[range.repeat] Change W/WArgs to T/TArgs
1 parent 405b46f commit ae88bb5

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

source/ranges.tex

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@
211211
namespace views { inline constexpr @\unspecnc@ iota = @\unspecnc@; } // freestanding
212212

213213
// \ref{range.repeat}, repeat view
214-
template<@\libconcept{move_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t>
215-
requires (is_object_v<W> && @\libconcept{same_as}@<W, remove_cv_t<W>>
214+
template<@\libconcept{move_constructible}@ T, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t>
215+
requires (is_object_v<T> && @\libconcept{same_as}@<T, remove_cv_t<T>>
216216
&& (@\exposid{is-integer-like}@<Bound> || @\libconcept{same_as}@<Bound, unreachable_sentinel_t>))
217217
class repeat_view; // freestanding
218218

@@ -3386,28 +3386,28 @@
33863386

33873387
\begin{codeblock}
33883388
namespace std::ranges {
3389-
template<@\libconcept{move_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t>
3390-
requires (is_object_v<W> && @\libconcept{same_as}@<W, remove_cv_t<W>> &&
3389+
template<@\libconcept{move_constructible}@ T, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t>
3390+
requires (is_object_v<T> && @\libconcept{same_as}@<T, remove_cv_t<T>> &&
33913391
(@\exposid{is-integer-like}@<Bound> || @\libconcept{same_as}@<Bound, unreachable_sentinel_t>))
3392-
class @\libglobal{repeat_view}@ : public view_interface<repeat_view<W, Bound>> {
3392+
class @\libglobal{repeat_view}@ : public view_interface<repeat_view<T, Bound>> {
33933393
private:
33943394
// \ref{range.repeat.iterator}, class \tcode{repeat_view::\exposid{iterator}}
33953395
struct @\exposidnc{iterator}@; // \expos
33963396

3397-
@\exposidnc{movable-box}@<W> @\exposid{value_}@; // \expos, see \ref{range.move.wrap}
3397+
@\exposidnc{movable-box}@<T> @\exposid{value_}@; // \expos, see \ref{range.move.wrap}
33983398
Bound @\exposid{bound_}@ = Bound(); // \expos
33993399

34003400
public:
3401-
repeat_view() requires @\libconcept{default_initializable}@<W> = default;
3401+
repeat_view() requires @\libconcept{default_initializable}@<T> = default;
34023402

3403-
constexpr explicit repeat_view(const W& value, Bound bound = Bound())
3404-
requires @\libconcept{copy_constructible}@<W>;
3405-
constexpr explicit repeat_view(W&& value, Bound bound = Bound());
3406-
template<class... WArgs, class... BoundArgs>
3407-
requires @\libconcept{constructible_from}@<W, WArgs...> &&
3403+
constexpr explicit repeat_view(const T& value, Bound bound = Bound())
3404+
requires @\libconcept{copy_constructible}@<T>;
3405+
constexpr explicit repeat_view(T&& value, Bound bound = Bound());
3406+
template<class... TArgs, class... BoundArgs>
3407+
requires @\libconcept{constructible_from}@<T, TArgs...> &&
34083408
@\libconcept{constructible_from}@<Bound, BoundArgs...>
34093409
constexpr explicit repeat_view(piecewise_construct_t,
3410-
tuple<WArgs...> value_args, tuple<BoundArgs...> bound_args = tuple<>{});
3410+
tuple<TArgs...> value_args, tuple<BoundArgs...> bound_args = tuple<>{});
34113411

34123412
constexpr @\exposid{iterator}@ begin() const;
34133413
constexpr @\exposid{iterator}@ end() const requires (!@\libconcept{same_as}@<Bound, unreachable_sentinel_t>);
@@ -3416,15 +3416,15 @@
34163416
constexpr auto size() const requires (!@\libconcept{same_as}@<Bound, unreachable_sentinel_t>);
34173417
};
34183418

3419-
template<class W, class Bound>
3420-
repeat_view(W, Bound) -> repeat_view<W, Bound>;
3419+
template<class T, class Bound>
3420+
repeat_view(T, Bound) -> repeat_view<T, Bound>;
34213421
}
34223422
\end{codeblock}
34233423

34243424
\indexlibraryctor{repeat_view}%
34253425
\begin{itemdecl}
3426-
constexpr explicit repeat_view(const W& value, Bound bound = Bound())
3427-
requires @\libconcept{copy_constructible}@<W>;
3426+
constexpr explicit repeat_view(const T& value, Bound bound = Bound())
3427+
requires @\libconcept{copy_constructible}@<T>;
34283428
\end{itemdecl}
34293429

34303430
\begin{itemdescr}
@@ -3441,7 +3441,7 @@
34413441

34423442
\indexlibraryctor{repeat_view}%
34433443
\begin{itemdecl}
3444-
constexpr explicit repeat_view(W&& value, Bound bound = Bound());
3444+
constexpr explicit repeat_view(T&& value, Bound bound = Bound());
34453445
\end{itemdecl}
34463446

34473447
\begin{itemdescr}
@@ -3457,17 +3457,17 @@
34573457

34583458
\indexlibraryctor{repeat_view}%
34593459
\begin{itemdecl}
3460-
template<class... WArgs, class... BoundArgs>
3461-
requires @\libconcept{constructible_from}@<W, WArgs...> &&
3460+
template<class... TArgs, class... BoundArgs>
3461+
requires @\libconcept{constructible_from}@<T, TArgs...> &&
34623462
@\libconcept{constructible_from}@<Bound, BoundArgs...>
34633463
constexpr explicit repeat_view(piecewise_construct_t,
3464-
tuple<Wargs...> value_args, tuple<BoundArgs...> bound_args = tuple<>{});
3464+
tuple<TArgs...> value_args, tuple<BoundArgs...> bound_args = tuple<>{});
34653465
\end{itemdecl}
34663466

34673467
\begin{itemdescr}
34683468
\pnum
34693469
\effects
3470-
Initializes \exposid{value_} with arguments of types \tcode{WArgs...}
3470+
Initializes \exposid{value_} with arguments of types \tcode{TArgs...}
34713471
obtained by forwarding the elements of \tcode{value_args} and
34723472
initializes \exposid{bound_} with arguments of types \tcode{BoundArgs...}
34733473
obtained by forwarding the elements of \tcode{bound_args}.
@@ -3523,29 +3523,29 @@
35233523

35243524
\begin{codeblock}
35253525
namespace std::ranges {
3526-
template<@\libconcept{move_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t>
3527-
requires (is_object_v<W> && @\libconcept{same_as}@<W, remove_cv_t<W>> &&
3526+
template<@\libconcept{move_constructible}@ T, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t>
3527+
requires (is_object_v<T> && @\libconcept{same_as}@<T, remove_cv_t<T>> &&
35283528
(@\exposid{is-integer-like}@<Bound> || @\libconcept{same_as}@<Bound, unreachable_sentinel_t>))
3529-
class repeat_view<W, Bound>::@\exposid{iterator}@ {
3529+
class repeat_view<T, Bound>::@\exposid{iterator}@ {
35303530
private:
35313531
using @\exposidnc{index-type}@ = // \expos
35323532
conditional_t<@\libconcept{same_as}@<Bound, unreachable_sentinel_t>, ptrdiff_t, Bound>;
3533-
const W* @\exposidnc{value_}@ = nullptr; // \expos
3533+
const T* @\exposidnc{value_}@ = nullptr; // \expos
35343534
@\exposidnc{index-type}@ @\exposidnc{current_}@ = @\exposidnc{index-type}@(); // \expos
35353535

3536-
constexpr explicit @\exposid{iterator}@(const W* value, @\exposid{index-type}@ b = @\exposidnc{index-type}@()); // \expos
3536+
constexpr explicit @\exposid{iterator}@(const T* value, @\exposid{index-type}@ b = @\exposidnc{index-type}@()); // \expos
35373537

35383538
public:
35393539
using iterator_concept = random_access_iterator_tag;
35403540
using iterator_category = random_access_iterator_tag;
3541-
using value_type = W;
3541+
using value_type = T;
35423542
using difference_type = conditional_t<@\exposid{is-signed-integer-like}@<@\exposid{index-type}@>,
35433543
@\exposid{index-type}@,
35443544
@\placeholdernc{IOTA-DIFF-T}@(@\exposid{index-type}@)>;
35453545

35463546
@\exposid{iterator}@() = default;
35473547

3548-
constexpr const W& operator*() const noexcept;
3548+
constexpr const T& operator*() const noexcept;
35493549

35503550
constexpr @\exposid{iterator}@& operator++();
35513551
constexpr @\exposid{iterator}@ operator++(int);
@@ -3555,7 +3555,7 @@
35553555

35563556
constexpr @\exposid{iterator}@& operator+=(difference_type n);
35573557
constexpr @\exposid{iterator}@& operator-=(difference_type n);
3558-
constexpr const W& operator[](difference_type n) const noexcept;
3558+
constexpr const T& operator[](difference_type n) const noexcept;
35593559

35603560
friend constexpr bool operator==(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y);
35613561
friend constexpr auto operator<=>(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y);
@@ -3571,7 +3571,7 @@
35713571

35723572
\indexlibraryctor{repeat_view::\exposid{iterator}}%
35733573
\begin{itemdecl}
3574-
constexpr explicit @\exposid{iterator}@(const W* value, @\exposid{index-type}@ b = @\exposid{index-type}@());
3574+
constexpr explicit @\exposid{iterator}@(const T* value, @\exposid{index-type}@ b = @\exposid{index-type}@());
35753575
\end{itemdecl}
35763576

35773577
\begin{itemdescr}
@@ -3587,7 +3587,7 @@
35873587

35883588
\indexlibrarymember{operator*}{repeat_view::\exposid{iterator}}%
35893589
\begin{itemdecl}
3590-
constexpr const W& operator*() const noexcept;
3590+
constexpr const T& operator*() const noexcept;
35913591
\end{itemdecl}
35923592

35933593
\begin{itemdescr}
@@ -3705,7 +3705,7 @@
37053705

37063706
\indexlibrarymember{operator[]}{repeat_view::\exposid{iterator}}%
37073707
\begin{itemdecl}
3708-
constexpr const W& operator[](difference_type n) const noexcept;
3708+
constexpr const T& operator[](difference_type n) const noexcept;
37093709
\end{itemdecl}
37103710

37113711
\begin{itemdescr}

0 commit comments

Comments
 (0)