Skip to content

Commit

Permalink
[reverse.iterators] Use the public accessor function,
Browse files Browse the repository at this point in the history
not the exposition-only member 'current', from non-member functions.
  • Loading branch information
jensmaurer committed Dec 19, 2018
1 parent e7c5655 commit a3eb5d7
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions source/iterators.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3305,12 +3305,12 @@
\begin{itemdescr}
\pnum
\constraints
The expression \tcode{x.current == y.current} shall be valid and
The expression \tcode{x.base() == y.base()} shall be valid and
convertible to \tcode{bool}.

\pnum
\returns
\tcode{x.current == y.current}.
\tcode{x.base() == y.base()}.
\end{itemdescr}

\indexlibrarymember{operator"!=}{reverse_iterator}%
Expand All @@ -3324,12 +3324,12 @@
\begin{itemdescr}
\pnum
\constraints
The expression \tcode{x.current != y.current} shall be valid and
The expression \tcode{x.base() != y.base()} shall be valid and
convertible to \tcode{bool}.

\pnum
\returns
\tcode{x.current != y.current}.
\tcode{x.base() != y.base()}.
\end{itemdescr}

\indexlibrarymember{operator<}{reverse_iterator}%
Expand All @@ -3343,12 +3343,12 @@
\begin{itemdescr}
\pnum
\constraints
The expression \tcode{x.current > y.current} shall be valid and
The expression \tcode{x.base() > y.base()} shall be valid and
convertible to \tcode{bool}.

\pnum
\returns
\tcode{x.current > y.current}.
\tcode{x.base() > y.base()}.
\end{itemdescr}

\indexlibrarymember{operator>}{reverse_iterator}%
Expand All @@ -3362,12 +3362,12 @@
\begin{itemdescr}
\pnum
\constraints
The expression \tcode{x.current < y.current} shall be valid and
The expression \tcode{x.base() < y.base()} shall be valid and
convertible to \tcode{bool}.

\pnum
\returns
\tcode{x.current < y.current}.
\tcode{x.base() < y.base()}.
\end{itemdescr}

\indexlibrarymember{operator<=}{reverse_iterator}%
Expand All @@ -3381,12 +3381,12 @@
\begin{itemdescr}
\pnum
\constraints
The expression \tcode{x.current >= y.current} shall be valid and
The expression \tcode{x.base() >= y.base()} shall be valid and
convertible to \tcode{bool}.

\pnum
\returns
\tcode{x.current >= y.current}.
\tcode{x.base() >= y.base()}.
\end{itemdescr}

\indexlibrarymember{operator>=}{reverse_iterator}%
Expand All @@ -3400,12 +3400,12 @@
\begin{itemdescr}
\pnum
\constraints
The expression \tcode{x.current <= y.current} shall be valid and
The expression \tcode{x.base() <= y.base()} shall be valid and
convertible to \tcode{bool}.

\pnum
\returns
\tcode{x.current <= y.current}.
\tcode{x.base() <= y.base()}.
\end{itemdescr}

\rSec3[reverse.iter.nonmember]{Non-member functions}
Expand All @@ -3421,7 +3421,7 @@
\begin{itemdescr}
\pnum
\returns
\tcode{y.current - x.current}.
\tcode{y.base() - x.base()}.
\end{itemdescr}

\indexlibrarymember{operator+}{reverse_iterator}%
Expand All @@ -3435,7 +3435,7 @@
\begin{itemdescr}
\pnum
\returns
\tcode{reverse_iterator<Iterator>(x.current - n)}.
\tcode{reverse_iterator<Iterator>(x.base() - n)}.
\end{itemdescr}

\indexlibrarymember{iter_move}{reverse_iterator}%
Expand All @@ -3448,7 +3448,7 @@
\pnum
\effects Equivalent to:
\begin{codeblock}
auto tmp = i.current;
auto tmp = i.base();
return ranges::iter_move(--tmp);
\end{codeblock}

Expand All @@ -3472,8 +3472,8 @@
\pnum
\effects Equivalent to:
\begin{codeblock}
auto xtmp = x.current;
auto ytmp = y.current;
auto xtmp = x.base();
auto ytmp = y.base();
ranges::iter_swap(--xtmp, --ytmp);
\end{codeblock}

Expand Down Expand Up @@ -3985,11 +3985,11 @@
operator-(const move_iterator& x, const move_sentinel<S>& y);
friend constexpr iter_rvalue_reference_t<Iterator>
iter_move(const move_iterator& i)
noexcept(noexcept(ranges::iter_move(i.current)));
noexcept(noexcept(ranges::iter_move(i.base())));
template<IndirectlySwappable<Iterator> Iterator2>
friend constexpr void
iter_swap(const move_iterator& x, const move_iterator<Iterator2>& y)
noexcept(noexcept(ranges::iter_swap(x.current, y.current)));
noexcept(noexcept(ranges::iter_swap(x.base(), y.base())));

private:
Iterator current; // \expos
Expand Down

0 comments on commit a3eb5d7

Please sign in to comment.