Skip to content

P1871R1 Concept traits should be named after concepts #3452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions source/iterators.tex
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@

// \ref{iterator.concept.sizedsentinel}, concept \libconcept{sized_sentinel_for}
template<class S, class I>
inline constexpr bool disable_sized_sentinel = false;
inline constexpr bool disable_sized_sentinel_for = false;

template<class S, class I>
concept sized_sentinel_for = @\seebelow@;
Expand Down Expand Up @@ -315,8 +315,8 @@

template<class Iterator1, class Iterator2>
requires (!sized_sentinel_for<Iterator1, Iterator2>)
inline constexpr bool disable_sized_sentinel<reverse_iterator<Iterator1>,
reverse_iterator<Iterator2>> = true;
inline constexpr bool disable_sized_sentinel_for<reverse_iterator<Iterator1>,
reverse_iterator<Iterator2>> = true;

// \ref{insert.iterators}, insert iterators
template<class Container> class back_insert_iterator;
Expand Down Expand Up @@ -1554,7 +1554,7 @@
template<class S, class I>
concept @\deflibconcept{sized_sentinel_for}@ =
sentinel_for<S, I> &&
!disable_sized_sentinel<remove_cv_t<S>, remove_cv_t<I>> &&
!disable_sized_sentinel_for<remove_cv_t<S>, remove_cv_t<I>> &&
requires(const I& i, const S& s) {
{ s - i } -> same_as<iter_difference_t<I>>;
{ i - s } -> same_as<iter_difference_t<I>>;
Expand All @@ -1577,17 +1577,17 @@
\end{itemize}
\end{itemdescr}

\indexlibraryglobal{disable_sized_sentinel}%
\indexlibraryglobal{disable_sized_sentinel_for}%
\begin{itemdecl}
template<class S, class I>
inline constexpr bool disable_sized_sentinel = false;
inline constexpr bool disable_sized_sentinel_for = false;
\end{itemdecl}

\begin{itemdescr}
\pnum
\remarks
Pursuant to \ref{namespace.std},
users may specialize \tcode{disable_sized_sentinel}
users may specialize \tcode{disable_sized_sentinel_for}
for cv-unqualified non-array object types \tcode{S} and \tcode{I}
if \tcode{S} and/or \tcode{I} is a program-defined type.
Such specializations shall
Expand All @@ -1596,7 +1596,7 @@

\pnum
\begin{note}
\tcode{disable_sized_sentinel} allows use of sentinels and iterators with
\tcode{disable_sized_sentinel_for} allows use of sentinels and iterators with
the library that satisfy but do not in fact model \libconcept{sized_sentinel_for}.
\end{note}

Expand Down