Skip to content

Commit 7e862f0

Browse files
committed
[range.transform.sentinel] Reinstate transform_view::sentinel::operator-
overloads, accidentally removed during application of P1614R2.
1 parent 4152579 commit 7e862f0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

source/ranges.tex

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3468,6 +3468,30 @@
34683468
\effects Equivalent to: \tcode{return x.current_ == y.end_;}
34693469
\end{itemdescr}
34703470

3471+
\indexlibrary{\idxcode{operator-}!\idxcode{transform_view::sentinel}}%
3472+
\begin{itemdecl}
3473+
friend constexpr iter_difference_t<iterator_t<Base>>
3474+
operator-(const iterator<Const>& x, const sentinel& y)
3475+
requires SizedSentinel<sentinel_t<Base>, iterator_t<Base>>;
3476+
\end{itemdecl}
3477+
3478+
\begin{itemdescr}
3479+
\pnum
3480+
\effects Equivalent to: \tcode{return x.current_ - y.end_;}
3481+
\end{itemdescr}
3482+
3483+
\indexlibrary{\idxcode{operator-}!\idxcode{transform_view::sentinel}}%
3484+
\begin{itemdecl}
3485+
friend constexpr iter_difference_t<iterator_t<Base>>
3486+
operator-(const sentinel& y, const iterator<Const>& x)
3487+
requires SizedSentinel<sentinel_t<Base>, iterator_t<Base>>;
3488+
\end{itemdecl}
3489+
3490+
\begin{itemdescr}
3491+
\pnum
3492+
\effects Equivalent to: \tcode{return x.end_ - y.current_;}
3493+
\end{itemdescr}
3494+
34713495
\rSec3[range.transform.adaptor]{\tcode{view::transform}}
34723496

34733497
\pnum

0 commit comments

Comments
 (0)