From 1cf04f8fb8ea0f9125e12edaabe80e7eecbf5855 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Thu, 25 Jul 2019 08:45:21 -0700 Subject: [PATCH 01/84] Fix inconsistencies in the Latex used for concept names throughout the library. --- source/algorithms.tex | 2 +- source/concepts.tex | 6 +-- source/iterators.tex | 108 +++++++++++++++++++++--------------------- source/ranges.tex | 40 ++++++++-------- source/utilities.tex | 6 +-- 5 files changed, 81 insertions(+), 81 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 8ddca61117..676c67060e 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -3749,7 +3749,7 @@ \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} for the overloads in namespace \tcode{std}, or \item - pairwise model \tcode{SizedSentinel}\iref{iterator.concept.sizedsentinel} + pairwise model \libconcept{SizedSentinel}\iref{iterator.concept.sizedsentinel} for the overloads in namespace \tcode{ranges}, \end{itemize} and \tcode{last1 - first1 != last2 - first2}, diff --git a/source/concepts.tex b/source/concepts.tex index e53055af7a..df0e72c938 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -565,7 +565,7 @@ is that \tcode{t1} equals \tcode{u2} and \tcode{u1} equals \tcode{t2}. \item If \tcode{T} and \tcode{U} are different types that model - \libconcept{CommonReference}, + \tcode{\libconcept{CommonReference}}, the result of the operation is that \tcode{C(t1)} equals \tcode{C(u2)} and @@ -609,8 +609,8 @@ \item Otherwise, if \tcode{E1} and \tcode{E2} are lvalues of the - same type \tcode{T} that models \libconcept{MoveConstructible} and - \libconcept{Assignable}, + same type \tcode{T} that models \tcode{\libconcept{MoveConstructible}} and + \tcode{\libconcept{Assignable}}, \tcode{S} is an expression that exchanges the denoted values. \tcode{S} is a constant expression if \begin{itemize} diff --git a/source/iterators.tex b/source/iterators.tex index 4643722faa..e362bdf70f 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -81,7 +81,7 @@ = decltype(ranges::iter_move(declval())); // \ref{iterator.concepts}, iterator concepts - // \ref{iterator.concept.readable}, concept \tcode{Readable} + // \ref{iterator.concept.readable}, concept \libconcept{Readable} template concept Readable = @\seebelow@; @@ -89,54 +89,54 @@ using iter_common_reference_t = common_reference_t, iter_value_t&>; - // \ref{iterator.concept.writable}, concept \tcode{Writable} + // \ref{iterator.concept.writable}, concept \libconcept{Writable} template concept Writable = @\seebelow@; - // \ref{iterator.concept.winc}, concept \tcode{WeaklyIncrementable} + // \ref{iterator.concept.winc}, concept \libconcept{WeaklyIncrementable} template concept WeaklyIncrementable = @\seebelow@; - // \ref{iterator.concept.inc}, concept \tcode{Incrementable} + // \ref{iterator.concept.inc}, concept \libconcept{Incrementable} template concept Incrementable = @\seebelow@; - // \ref{iterator.concept.iterator}, concept \tcode{Iterator} + // \ref{iterator.concept.iterator}, concept \libconcept{Iterator} template concept Iterator = @\seebelow@; - // \ref{iterator.concept.sentinel}, concept \tcode{Sentinel} + // \ref{iterator.concept.sentinel}, concept \libconcept{Sentinel} template concept Sentinel = @\seebelow@; - // \ref{iterator.concept.sizedsentinel}, concept \tcode{SizedSentinel} + // \ref{iterator.concept.sizedsentinel}, concept \libconcept{SizedSentinel} template inline constexpr bool disable_sized_sentinel = false; template concept SizedSentinel = @\seebelow@; - // \ref{iterator.concept.input}, concept \tcode{InputIterator} + // \ref{iterator.concept.input}, concept \libconcept{InputIterator} template concept InputIterator = @\seebelow@; - // \ref{iterator.concept.output}, concept \tcode{OutputIterator} + // \ref{iterator.concept.output}, concept \libconcept{OutputIterator} template concept OutputIterator = @\seebelow@; - // \ref{iterator.concept.forward}, concept \tcode{ForwardIterator} + // \ref{iterator.concept.forward}, concept \libconcept{ForwardIterator} template concept ForwardIterator = @\seebelow@; - // \ref{iterator.concept.bidir}, concept \tcode{BidirectionalIterator} + // \ref{iterator.concept.bidir}, concept \libconcept{BidirectionalIterator} template concept BidirectionalIterator = @\seebelow@; - // \ref{iterator.concept.random.access}, concept \tcode{RandomAccessIterator} + // \ref{iterator.concept.random.access}, concept \libconcept{RandomAccessIterator} template concept RandomAccessIterator = @\seebelow@; - // \ref{iterator.concept.contiguous}, concept \tcode{ContiguousIterator} + // \ref{iterator.concept.contiguous}, concept \libconcept{ContiguousIterator} template concept ContiguousIterator = @\seebelow@; @@ -169,38 +169,38 @@ struct incrementable_traits>; // \ref{alg.req}, common algorithm requirements - // \ref{alg.req.ind.move}, concept \tcode{IndirectlyMovable} + // \ref{alg.req.ind.move}, concept \libconcept{IndirectlyMovable} template concept IndirectlyMovable = @\seebelow@; template concept IndirectlyMovableStorable = @\seebelow@; - // \ref{alg.req.ind.copy}, concept \tcode{IndirectlyCopyable} + // \ref{alg.req.ind.copy}, concept \libconcept{IndirectlyCopyable} template concept IndirectlyCopyable = @\seebelow@; template concept IndirectlyCopyableStorable = @\seebelow@; - // \ref{alg.req.ind.swap}, concept \tcode{IndirectlySwappable} + // \ref{alg.req.ind.swap}, concept \libconcept{IndirectlySwappable} template concept IndirectlySwappable = @\seebelow@; - // \ref{alg.req.ind.cmp}, concept \tcode{IndirectlyComparable} + // \ref{alg.req.ind.cmp}, concept \libconcept{IndirectlyComparable} template concept IndirectlyComparable = @\seebelow@; - // \ref{alg.req.permutable}, concept \tcode{Permutable} + // \ref{alg.req.permutable}, concept \libconcept{Permutable} template concept Permutable = @\seebelow@; - // \ref{alg.req.mergeable}, concept \tcode{Mergeable} + // \ref{alg.req.mergeable}, concept \libconcept{Mergeable} template concept Mergeable = @\seebelow@; - // \ref{alg.req.sortable}, concept \tcode{Sortable} + // \ref{alg.req.sortable}, concept \libconcept{Sortable} template concept Sortable = @\seebelow@; @@ -668,7 +668,7 @@ it is often necessary to determine the difference type that corresponds to a particular incrementable type. Accordingly, it is required that if \tcode{WI} is the name of a type that models the -\tcode{WeaklyIncrementable} concept\iref{iterator.concept.winc}, +\libconcept{WeaklyIncrementable} concept\iref{iterator.concept.winc}, the type \begin{codeblock} iter_difference_t @@ -730,7 +730,7 @@ To implement algorithms only in terms of readable types, it is often necessary to determine the value type that corresponds to a particular readable type. Accordingly, it is required that if \tcode{R} is the name of a type that -models the \tcode{Readable} concept\iref{iterator.concept.readable}, +models the \libconcept{Readable} concept\iref{iterator.concept.readable}, the type \begin{codeblock} iter_value_t @@ -1125,7 +1125,7 @@ then \tcode{ranges::swap(*E1, *E2)}. \item Otherwise, if the types \tcode{T1} and \tcode{T2} of \tcode{E1} and -\tcode{E2} model \tcode{IndirectlyMovableStorable} and +\tcode{E2} model \tcode{\libconcept{IndirectlyMovableStorable}} and \tcode{IndirectlyMovableStorable}, then \tcode{(void)(*E1 = \placeholdernc{iter-exchange-move}(E2, E1))}, except that \tcode{E1} is evaluated only once. @@ -1216,10 +1216,10 @@ exposition-only \placeholder{dereferenceable} concept\iref{iterator.synopsis}. \end{note} -\rSec3[iterator.concept.writable]{Concept \tcode{Writable}} +\rSec3[iterator.concept.writable]{Concept \libconcept{Writable}} \pnum -The \tcode{Writable} concept specifies the requirements for writing a value +The \libconcept{Writable} concept specifies the requirements for writing a value into an iterator's referenced object. \indexlibrary{\idxcode{Writable}}% @@ -1239,7 +1239,7 @@ \pnum Let \tcode{E} be an an expression such that \tcode{decltype((E))} is \tcode{T}, and let \tcode{o} be a dereferenceable object of type \tcode{Out}. -\tcode{Out} and \tcode{T} model \tcode{Writable} only if +\tcode{Out} and \tcode{T} model \tcode{\libconcept{Writable}} only if \begin{itemize} \item If \tcode{Out} and \tcode{T} model @@ -1267,13 +1267,13 @@ iterators with prvalue non-proxy reference types that permit rvalue assignment but do not also permit \tcode{const} rvalue assignment. Consequently, an iterator type \tcode{I} that returns \tcode{std::string} -by value does not model \libconcept{Writable}. +by value does not model \tcode{\libconcept{Writable}}. \end{note} -\rSec3[iterator.concept.winc]{Concept \tcode{WeaklyIncrementable}} +\rSec3[iterator.concept.winc]{Concept \libconcept{WeaklyIncrementable}} \pnum -The \tcode{WeaklyIncrementable} concept specifies the requirements on +The \libconcept{WeaklyIncrementable} concept specifies the requirements on types that can be incremented with the pre- and post-increment operators. The increment operations are not required to be equality-preserving, nor is the type required to be \libconcept{EqualityComparable}. @@ -1424,10 +1424,10 @@ template. \end{note} -\rSec3[iterator.concept.inc]{Concept \tcode{Incrementable}} +\rSec3[iterator.concept.inc]{Concept \libconcept{Incrementable}} \pnum -The \tcode{Incrementable} concept specifies requirements on types that can be incremented with the pre- +The \libconcept{Incrementable} concept specifies requirements on types that can be incremented with the pre- and post-increment operators. The increment operations are required to be equality-preserving, and the type is required to be \libconcept{EqualityComparable}. \begin{note} @@ -1466,7 +1466,7 @@ algorithms with types that model \libconcept{Increment\-able}. \end{note} -\rSec3[iterator.concept.iterator]{Concept \tcode{Iterator}} +\rSec3[iterator.concept.iterator]{Concept \libconcept{Iterator}} \pnum The \libconcept{Iterator} concept forms the basis @@ -1494,7 +1494,7 @@ the \libconcept{Iterator} concept does not require copyability. \end{note} -\rSec3[iterator.concept.sentinel]{Concept \tcode{Sentinel}} +\rSec3[iterator.concept.sentinel]{Concept \libconcept{Sentinel}} \pnum The \libconcept{Sentinel} concept specifies the relationship @@ -1514,7 +1514,7 @@ \pnum Let \tcode{s} and \tcode{i} be values of type \tcode{S} and \tcode{I} such that \range{i}{s} denotes a range. Types -\tcode{S} and \tcode{I} model \tcode{Sentinel} only if +\tcode{S} and \tcode{I} model \tcode{\libconcept{Sentinel}} only if \begin{itemize} \item \tcode{i == s} is well-defined. @@ -1532,7 +1532,7 @@ to \tcode{i}. Consequently, \tcode{i == s} is no longer required to be well-defined. -\rSec3[iterator.concept.sizedsentinel]{Concept \tcode{SizedSentinel}} +\rSec3[iterator.concept.sizedsentinel]{Concept \libconcept{SizedSentinel}} \pnum The \libconcept{SizedSentinel} concept specifies @@ -1559,7 +1559,7 @@ a sentinel of type \tcode{S} such that \range{i}{s} denotes a range. Let $N$ be the smallest number of applications of \tcode{++i} necessary to make \tcode{bool(i == s)} be \tcode{true}. -\tcode{S} and \tcode{I} model \tcode{SizedSentinel} only if +\tcode{S} and \tcode{I} model \tcode{\libconcept{SizedSentinel}} only if \begin{itemize} \item If $N$ is representable by \tcode{iter_difference_t}, @@ -1601,12 +1601,12 @@ \end{example} \end{itemdescr} -\rSec3[iterator.concept.input]{Concept \tcode{InputIterator}} +\rSec3[iterator.concept.input]{Concept \libconcept{InputIterator}} \pnum -The \tcode{InputIterator} concept defines requirements for a type +The \libconcept{InputIterator} concept defines requirements for a type whose referenced values can be read (from the requirement for -\tcode{Readable}\iref{iterator.concept.readable}) and which can be both pre- and +\libconcept{Readable}\iref{iterator.concept.readable}) and which can be both pre- and post-incremented. \begin{note} Unlike the \oldconcept{InputIterator} requirements\iref{input.iterators}, @@ -1624,12 +1624,12 @@ DerivedFrom<@\placeholdernc{ITER_CONCEPT}@(I), input_iterator_tag>; \end{codeblock} -\rSec3[iterator.concept.output]{Concept \tcode{OutputIterator}} +\rSec3[iterator.concept.output]{Concept \libconcept{OutputIterator}} \pnum -The \tcode{OutputIterator} concept defines requirements for a type that +The \libconcept{OutputIterator} concept defines requirements for a type that can be used to write values (from the requirement for -\tcode{Writable}\iref{iterator.concept.writable}) and which can be both pre- and post-incremented. +\libconcept{Writable}\iref{iterator.concept.writable}) and which can be both pre- and post-incremented. \begin{note} Output iterators are not required to model \libconcept{EqualityComparable}. \end{note} @@ -1647,7 +1647,7 @@ \pnum Let \tcode{E} be an expression such that \tcode{decltype((E))} is \tcode{T}, and let \tcode{i} be a -dereferenceable object of type \tcode{I}. \tcode{I} and \tcode{T} model \tcode{OutputIterator} only if +dereferenceable object of type \tcode{I}. \tcode{I} and \tcode{T} model \tcode{\libconcept{OutputIterator}} only if \tcode{*i++ = E;} has effects equivalent to: \begin{codeblock} *i = E; @@ -1660,7 +1660,7 @@ They should be single-pass algorithms. \end{note} -\rSec3[iterator.concept.forward]{Concept \tcode{ForwardIterator}} +\rSec3[iterator.concept.forward]{Concept \libconcept{ForwardIterator}} \pnum The \libconcept{ForwardIterator} concept adds @@ -2460,7 +2460,7 @@ \pnum Let \tcode{i} be a dereferenceable value of type \tcode{In}. -\tcode{In} and \tcode{Out} model \tcode{IndirectlyMovableStorable} +\tcode{In} and \tcode{Out} model \tcode{\libconcept{IndirectlyMovableStorable}} only if after the initialization of the object \tcode{obj} in \begin{codeblock} iter_value_t obj(ranges::iter_move(i)); @@ -2505,7 +2505,7 @@ \pnum Let \tcode{i} be a dereferenceable value of type \tcode{In}. -\tcode{In} and \tcode{Out} model \tcode{IndirectlyCopyableStorable} +\tcode{In} and \tcode{Out} model \tcode{\libconcept{IndirectlyCopyableStorable}} only if after the initialization of the object \tcode{obj} in \begin{codeblock} iter_value_t obj(*i); @@ -2873,9 +2873,9 @@ \pnum \effects \begin{itemize} -\item If \tcode{I} and \tcode{S} model \tcode{Assignable}, +\item If \tcode{I} and \tcode{S} model \tcode{\libconcept{Assignable}}, equivalent to \tcode{i = std::move(bound)}. -\item Otherwise, if \tcode{S} and \tcode{I} model \tcode{SizedSentinel}, +\item Otherwise, if \tcode{S} and \tcode{I} model \tcode{\libconcept{SizedSentinel}}, equivalent to \tcode{ranges::advance(i, bound - i)}. \item Otherwise, while \tcode{bool(i != bound)} is \tcode{true}, increments \tcode{i}. @@ -2895,12 +2895,12 @@ If \tcode{n == 0}, \range{i}{bound} or \range{bound}{i} denotes a range. If \tcode{n < 0}, \range{bound}{i} denotes a range, \tcode{I} models \libconcept{BidirectionalIterator}, and -\tcode{I} and \tcode{S} model \tcode{Same}. +\tcode{I} and \tcode{S} model \tcode{\libconcept{Same}}. \pnum \effects \begin{itemize} -\item If \tcode{S} and \tcode{I} model \tcode{SizedSentinel}: +\item If \tcode{S} and \tcode{I} model \tcode{\libconcept{SizedSentinel}}: \begin{itemize} \item If \brk{}$|\tcode{n}| \ge |\tcode{bound - i}|$, equivalent to \tcode{ranges::advance(i, bound)}. @@ -2940,7 +2940,7 @@ \pnum \effects -If \tcode{S} and \tcode{I} model \tcode{SizedSentinel}, +If \tcode{S} and \tcode{I} model \tcode{\libconcept{SizedSentinel}}, returns \tcode{(last - first)}; otherwise, returns the number of increments needed to get from \tcode{first} @@ -3120,7 +3120,7 @@ \tcode{random_access_iterator_tag} if the type \tcode{iterator_traits<\brk{}Iterator>::iterator_category} models -\libconcept{DerivedFrom}, and +\tcode{\libconcept{DerivedFrom}}, and \item \tcode{iterator_traits<\brk{}Iterator>::iterator_category} otherwise. \end{itemize} @@ -4116,7 +4116,7 @@ \tcode{random_access_iterator_tag} if the type \tcode{iterator_traits<\brk{}Iterator>::iterator_category} models -\libconcept{DerivedFrom<\tcode{random_access_iterator_tag}>}, and +\tcode{\libconcept{DerivedFrom}}, and \item \tcode{iterator_traits<\brk{}Iterator>::iterator_category} otherwise. \end{itemize} @@ -4528,7 +4528,7 @@ \pnum Class template \tcode{move_sentinel} is a sentinel adaptor useful for denoting ranges together with \tcode{move_iterator}. When an input iterator type -\tcode{I} and sentinel type \tcode{S} model \tcode{Sentinel}, +\tcode{I} and sentinel type \tcode{S} model \tcode{\libconcept{Sentinel}}, \tcode{move_sentinel} and \tcode{move_iterator} model \tcode{Sentinel, move_iterator{>}} as well. diff --git a/source/ranges.tex b/source/ranges.tex index a5d58c326d..7f1bf736fa 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -387,7 +387,7 @@ Whenever \tcode{ranges::end(E)} is a valid expression, the types \tcode{S} and \tcode{I} of \tcode{ranges::end(E)} and \tcode{ranges::begin(E)} -model \libconcept{Sentinel}. +model \tcode{\libconcept{Sentinel}}. \end{note} \rSec2[range.access.cbegin]{\tcode{ranges::cbegin}} @@ -424,7 +424,7 @@ Whenever \tcode{ranges::cend(E)} is a valid expression, the types \tcode{S} and \tcode{I} of \tcode{ranges::cend(E)} and \tcode{ranges::cbegin(E)} -model \libconcept{Sentinel}. +model \tcode{\libconcept{Sentinel}}. \end{note} \rSec2[range.access.rbegin]{\tcode{ranges::rbegin}} @@ -497,7 +497,7 @@ Otherwise, \tcode{make_reverse_iterator(ranges::begin(E))} if both \tcode{ranges::begin(E)} and \tcode{ranges::\brk{}end(E)} are valid expressions of the same type \tcode{I} which models - \tcode{BidirectionalIterator}\iref{iterator.concept.bidir}. + \libconcept{BidirectionalIterator}\iref{iterator.concept.bidir}. \item Otherwise, \tcode{ranges::rend(E)} is ill-formed. @@ -512,7 +512,7 @@ Whenever \tcode{ranges::rend(E)} is a valid expression, the types \tcode{S} and \tcode{I} of \tcode{ranges::rend(E)} and \tcode{ranges::rbegin(E)} -model \libconcept{Sentinel}. +model \tcode{\libconcept{Sentinel}}. \end{note} \rSec2[range.access.crbegin]{\tcode{ranges::crbegin}} @@ -550,7 +550,7 @@ Whenever \tcode{ranges::crend(E)} is a valid expression, the types \tcode{S} and \tcode{I} of \tcode{ranges::crend(E)} and \tcode{ranges::crbegin(E)} -model \libconcept{Sentinel}. +model \tcode{\libconcept{Sentinel}}. \end{note} \rSec2[range.prim.size]{\tcode{ranges::size}} @@ -592,9 +592,9 @@ Otherwise, \tcode{\placeholdernc{make-unsigned-like}(ranges::end(E) - ranges::begin(E))}\iref{range.subrange} if it is a valid expression and the types \tcode{I} and \tcode{S} of \tcode{ranges::begin(E)} and - \tcode{ranges::end(E)} (respectively) model both\hfill\break %avoid overfull - \tcode{SizedSentinel}\iref{iterator.concept.sizedsentinel} and - \tcode{Forward\-Iterator}. + \tcode{ranges::end(E)} (respectively) model both + \tcode{\libconcept{SizedSentinel}}\iref{iterator.concept.sizedsentinel} and + \tcode{\libconcept{ForwardIterator}}. However, \tcode{E} is evaluated only once. \item @@ -706,7 +706,7 @@ whose type models \libconcept{Iterator}\iref{iterator.concept.iterator}. Calling \tcode{ranges::end} on a range returns an object whose type \tcode{S}, together with the type \tcode{I} of the object returned by \tcode{ranges::begin}, -models \libconcept{Sentinel}. +models \tcode{\libconcept{Sentinel}}. The library formalizes the interfaces, semantics, and complexity of ranges to enable algorithms and range adaptors that work efficiently on different types of sequences. @@ -718,7 +718,7 @@ The \libconcept{SizedRange} concept refines \libconcept{Range} with the requirement that the number of elements in the range can be determined in constant time using the \tcode{ranges::size} function. -The \tcode{View} concept specifies requirements on a \libconcept{Range} type +The \libconcept{View} concept specifies requirements on a \libconcept{Range} type with constant-time copy and assign operations. \pnum @@ -872,7 +872,7 @@ \begin{note} The complexity requirement for the evaluation of \tcode{ranges::size} is non-amortized, unlike the case for the complexity of the evaluations of -\tcode{ranges::begin} and \tcode{ranges::end} in the \tcode{Range} concept. +\tcode{ranges::begin} and \tcode{ranges::end} in the \libconcept{Range} concept. \end{note} \end{itemdescr} @@ -911,7 +911,7 @@ \begin{itemdescr} % FIXME: This should explicitly say when View is modeled. \pnum -The \tcode{View} concept specifies the requirements of a \libconcept{Range} type +The \libconcept{View} concept specifies the requirements of a \libconcept{Range} type that has constant time copy, move, and assignment operators; that is, the cost of these operations is not proportional to the number of elements in the \tcode{View}. @@ -983,11 +983,11 @@ \rSec2[range.refinements]{Other range refinements} \pnum -The \tcode{OutputRange} concept specifies requirements of a +The \libconcept{OutputRange} concept specifies requirements of a \libconcept{Range} type for which \tcode{ranges::begin} returns -a model of \tcode{OutputIterator}\iref{iterator.concept.output}. -\tcode{InputRange}, \tcode{ForwardRange}, \tcode{BidirectionalRange}, -and \tcode{RandomAccessRange} are defined similarly. +a model of \libconcept{OutputIterator}\iref{iterator.concept.output}. +\libconcept{InputRange}, \libconcept{ForwardRange}, \libconcept{BidirectionalRange}, +and \libconcept{RandomAccessRange} are defined similarly. \indexlibrary{\idxcode{OutputRange}}% \indexlibrary{\idxcode{InputRange}}% @@ -1032,11 +1032,11 @@ \end{itemdecl} \pnum -The \tcode{CommonRange} concept specifies requirements of +The \libconcept{CommonRange} concept specifies requirements of a \libconcept{Range} type for which \tcode{ranges::begin} and \tcode{ranges::end} return objects of the same type. \begin{example} -The standard containers\iref{containers} model \tcode{CommonRange}. +The standard containers\iref{containers} model \libconcept{CommonRange}. \end{example} \indexlibrary{\idxcode{CommonRange}}% @@ -1163,7 +1163,7 @@ incomplete type. Before any member of the resulting specialization of \tcode{view_interface} other than special member functions is referenced, \tcode{D} shall be complete, and -model both \libconcept{DerivedFrom>} and \libconcept{View}. +model both \tcode{\libconcept{DerivedFrom}>} and \libconcept{View}. \rSec3[view.interface.members]{Members} @@ -5252,7 +5252,7 @@ \begin{itemize} \item If \tcode{T} models \libconcept{Iterator} and - \tcode{decltype((F))} models \libconcept{ConvertibleTo>}, + \tcode{decltype((F))} models \tcode{\libconcept{ConvertibleTo}>}, \begin{itemize} \item \tcode{subrange\{E, E + static_cast>(F)\}} if \tcode{T} models \libconcept{RandomAccessItera\-tor}. diff --git a/source/utilities.tex b/source/utilities.tex index ab39c0a254..332c4de8be 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -7940,7 +7940,7 @@ \pnum \begin{note} -This concept allows some \tcode{InputIterator}\iref{iterator.concept.input} +This concept allows some \libconcept{InputIterator}\iref{iterator.concept.input} operations to throw exceptions. \end{note} \end{itemdescr} @@ -7959,7 +7959,7 @@ \pnum \begin{note} -This concept allows some \tcode{Sentinel}\iref{iterator.concept.sentinel} +This concept allows some \libconcept{Sentinel}\iref{iterator.concept.sentinel} operations to throw exceptions. \end{note} \end{itemdescr} @@ -7990,7 +7990,7 @@ \begin{itemdescr} \pnum \begin{note} -This concept allows some \tcode{ForwardIterator}\iref{iterator.concept.forward} +This concept allows some \libconcept{ForwardIterator}\iref{iterator.concept.forward} operations to throw exceptions. \end{note} \end{itemdescr} From 0d0133db5580dc97e1a43fb42ce05f49384030d3 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:06:44 -0700 Subject: [PATCH 02/84] [ranges] [iterators] Remove hyphenation hints from concept names to make them easier to find. --- source/iterators.tex | 24 ++++++++++++------------ source/ranges.tex | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/source/iterators.tex b/source/iterators.tex index e362bdf70f..7590fc5660 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -513,13 +513,13 @@ \pnum The six categories of iterators correspond to the iterator concepts -\libconcept{Input\-Iterator}\iref{iterator.concept.input}, -\libconcept{Output\-Iterator}\iref{iterator.concept.output}, -\libconcept{Forward\-Iterator}\iref{iterator.concept.forward}, -\libconcept{Bidirectional\-Iterator}\iref{iterator.concept.bidir} -\libconcept{RandomAccess\-Iterator}\iref{iterator.concept.random.access}, +\libconcept{InputIterator}\iref{iterator.concept.input}, +\libconcept{OutputIterator}\iref{iterator.concept.output}, +\libconcept{ForwardIterator}\iref{iterator.concept.forward}, +\libconcept{BidirectionalIterator}\iref{iterator.concept.bidir} +\libconcept{RandomAccessIterator}\iref{iterator.concept.random.access}, and -\libconcept{Contiguous\-Iterator}\iref{iterator.concept.contiguous}, +\libconcept{ContiguousIterator}\iref{iterator.concept.contiguous}, respectively. The generic term \defn{iterator} refers to any type that models the \libconcept{Iterator} concept\iref{iterator.concept.iterator}. @@ -1463,7 +1463,7 @@ \tcode{++a} equals \tcode{++b} (which is not true for weakly incrementable types) allows the use of multi-pass one-directional -algorithms with types that model \libconcept{Increment\-able}. +algorithms with types that model \libconcept{Incrementable}. \end{note} \rSec3[iterator.concept.iterator]{Concept \libconcept{Iterator}} @@ -2409,11 +2409,11 @@ There are three relational concepts that specify how element values are transferred between \libconcept{Readable} and \libconcept{Writable} types: -\libconcept{Indirectly\-Movable}, -\libconcept{Indir\-ect\-ly\-Copy\-able}, and -\libconcept{Indirectly\-Swappable}. +\libconcept{IndirectlyMovable}, +\libconcept{IndirectlyCopyable}, and +\libconcept{IndirectlySwappable}. There are three relational concepts for rearrangements: -\libconcept{Permut\-able}, +\libconcept{Permutable}, \libconcept{Mergeable}, and \libconcept{Sortable}. There is one relational concept for comparing values from different sequences: @@ -4135,7 +4135,7 @@ template parameter shall either meet the \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} or model -\libconcept{RandomAccess\-Iterator}\iref{iterator.concept.random.access}. +\libconcept{RandomAccessIterator}\iref{iterator.concept.random.access}. \rSec3[move.iter.cons]{Construction and assignment} diff --git a/source/ranges.tex b/source/ranges.tex index 7f1bf736fa..1cd49d5e94 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -3318,7 +3318,7 @@ \pnum Let \tcode{C} denote the type \tcode{iterator_traits>::iterator_category}. -If \tcode{C} models \tcode{\libconcept{Derived\-From}}, +If \tcode{C} models \tcode{\libconcept{DerivedFrom}}, then \tcode{iterator_category} denotes \tcode{random_access_iterator_tag}; otherwise, \tcode{iterator_category} denotes \tcode{C}. @@ -5255,7 +5255,7 @@ \tcode{decltype((F))} models \tcode{\libconcept{ConvertibleTo}>}, \begin{itemize} \item \tcode{subrange\{E, E + static_cast>(F)\}} - if \tcode{T} models \libconcept{RandomAccessItera\-tor}. + if \tcode{T} models \libconcept{RandomAccessIterator}. \item Otherwise, \tcode{subrange\{counted_iterator\{E, F\}, default_sentinel\}}. \end{itemize} From 500f405fd0da15b7c75cdf1e17a68baca1f89f12 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 14:24:13 -0700 Subject: [PATCH 03/84] [ranges] Rename namespace 'view' to namespace 'views'. --- source/ranges.tex | 166 +++++++++++++++++++++++----------------------- 1 file changed, 83 insertions(+), 83 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 1cd49d5e94..2f7382da39 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -131,7 +131,7 @@ requires is_object_v class empty_view; - namespace view { + namespace views { template inline constexpr empty_view empty{}; } @@ -141,20 +141,20 @@ requires is_object_v class single_view; - namespace view { inline constexpr @\unspec@ single = @\unspec@; } + namespace views { inline constexpr @\unspec@ single = @\unspec@; } // \ref{range.iota}, iota view template requires @\placeholder{weakly-equality-comparable-with}@ class iota_view; - namespace view { inline constexpr @\unspec@ iota = @\unspec@; } + namespace views { inline constexpr @\unspec@ iota = @\unspec@; } // \ref{range.all}, all view - namespace view { inline constexpr @\unspec@ all = @\unspec@; } + namespace views { inline constexpr @\unspec@ all = @\unspec@; } template - using all_view = decltype(view::all(declval())); + using all_view = decltype(views::all(declval())); template requires is_object_v @@ -165,7 +165,7 @@ requires View && is_object_v class filter_view; - namespace view { inline constexpr @\unspec@ filter = @\unspec@; } + namespace views { inline constexpr @\unspec@ filter = @\unspec@; } // \ref{range.transform}, transform view template @@ -173,12 +173,12 @@ RegularInvocable> class transform_view; - namespace view { inline constexpr @\unspec@ transform = @\unspec@; } + namespace views { inline constexpr @\unspec@ transform = @\unspec@; } // \ref{range.take}, take view template class take_view; - namespace view { inline constexpr @\unspec@ take = @\unspec@; } + namespace views { inline constexpr @\unspec@ take = @\unspec@; } // \ref{range.take.while}, take while view template @@ -186,13 +186,13 @@ IndirectUnaryPredicate> class take_while_view; - namespace view { inline constexpr @\unspec@ take_while = @\unspec@; } + namespace views { inline constexpr @\unspec@ take_while = @\unspec@; } // \ref{range.drop}, drop view template class drop_view; - namespace view { inline constexpr @\unspec@ drop = @\unspec@; } + namespace views { inline constexpr @\unspec@ drop = @\unspec@; } // \ref{range.drop.while}, drop while view template @@ -200,7 +200,7 @@ IndirectUnaryPredicate> class drop_while_view; - namespace view { inline constexpr @\unspec@ drop_while = @\unspec@; } + namespace views { inline constexpr @\unspec@ drop_while = @\unspec@; } // \ref{range.join}, join view template @@ -209,7 +209,7 @@ View>) class join_view; - namespace view { inline constexpr @\unspec@ join = @\unspec@; } + namespace views { inline constexpr @\unspec@ join = @\unspec@; } // \ref{range.split}, split view template @@ -221,24 +221,24 @@ (ForwardRange || @\placeholder{tiny-range}@) class split_view; - namespace view { inline constexpr @\unspec@ split = @\unspec@; } + namespace views { inline constexpr @\unspec@ split = @\unspec@; } // \ref{range.counted}, counted view - namespace view { inline constexpr @\unspec@ counted = @\unspec@; } + namespace views { inline constexpr @\unspec@ counted = @\unspec@; } // \ref{range.common}, common view template requires (!CommonRange) class common_view; - namespace view { inline constexpr @\unspec@ common = @\unspec@; } + namespace views { inline constexpr @\unspec@ common = @\unspec@; } // \ref{range.reverse}, reverse view template requires BidirectionalRange class reverse_view; - namespace view { inline constexpr @\unspec@ reverse = @\unspec@; } + namespace views { inline constexpr @\unspec@ reverse = @\unspec@; } // \ref{range.istream}, istream view template> @@ -257,7 +257,7 @@ template using values_view = elements_view, 1>; - namespace view { + namespace views { template inline constexpr @\unspec@ elements = @\unspec@ ; inline constexpr @\unspec@ keys = @\unspec@ ; @@ -266,7 +266,7 @@ } namespace std { - namespace view = ranges::view; + namespace views = ranges::views; template struct tuple_size> @@ -1580,7 +1580,7 @@ which are utilities to create a \libconcept{View}. \pnum -Range factories are declared in namespace \tcode{std::ranges::view}. +Range factories are declared in namespace \tcode{std::ranges::views}. \rSec2[range.empty]{Empty view} @@ -1739,13 +1739,13 @@ \effects Equivalent to: \tcode{return value_.operator->();} \end{itemdescr} -\rSec3[range.single.adaptor]{\tcode{view::single}} +\rSec3[range.single.adaptor]{\tcode{views::single}} \pnum -The name \tcode{view::single} denotes a +The name \tcode{views::single} denotes a customization point object\iref{customization.point.object}. For some subexpression \tcode{E}, the expression -\tcode{view::single(E)} is expression-equivalent to +\tcode{views::single(E)} is expression-equivalent to \tcode{single_view\{E\}}. \rSec2[range.iota]{Iota view} @@ -2411,13 +2411,13 @@ \effects Equivalent to: \tcode{return -(y - x);} \end{itemdescr} -\rSec3[range.iota.adaptor]{\tcode{view::iota}} +\rSec3[range.iota.adaptor]{\tcode{views::iota}} \pnum -The name \tcode{view::iota} denotes a +The name \tcode{views::iota} denotes a customization point object\iref{customization.point.object}. For some subexpressions \tcode{E} and \tcode{F}, the expressions -\tcode{view::iota(E)} and \tcode{view::iota(E, F)} +\tcode{views::iota(E)} and \tcode{views::iota(E, F)} are expression-equivalent to \tcode{iota_view\{E\}} and \tcode{iota_view\{E, F\}}, respectively. @@ -2430,7 +2430,7 @@ evaluate lazily as the resulting view is iterated. \pnum -Range adaptors are declared in namespace \tcode{std::ranges::view}. +Range adaptors are declared in namespace \tcode{std::ranges::views}. \pnum The bitwise \logop{OR} operator is overloaded for the purpose of creating adaptor chain @@ -2443,10 +2443,10 @@ vector ints{0,1,2,3,4,5}; auto even = [](int i){ return 0 == i % 2; }; auto square = [](int i) { return i * i; }; -for (int i : ints | view::filter(even) | view::transform(square)) { +for (int i : ints | views::filter(even) | views::transform(square)) { cout << i << ' '; // prints: 0 4 16 } -assert(ranges::equal(ints | view::filter(even), view::filter(ints, even))); +assert(ranges::equal(ints | views::filter(even), views::filter(ints, even))); \end{codeblock} \end{example} @@ -2545,14 +2545,14 @@ \rSec2[range.all]{All view} \pnum -\tcode{view::all} returns a \libconcept{View} that includes all elements of +\tcode{views::all} returns a \libconcept{View} that includes all elements of its \libconcept{Range} argument. \pnum -The name \tcode{view::all} denotes a +The name \tcode{views::all} denotes a range adaptor object\iref{range.adaptor.object}. For some subexpression \tcode{E}, the expression -\tcode{view::all(E)} is expression-equivalent to: +\tcode{views::all(E)} is expression-equivalent to: \begin{itemize} \item \tcode{\placeholdernc{decay-copy}(E)} if the decayed type of \tcode{E} @@ -2710,7 +2710,7 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{view::all(std::forward(r))} +\effects Initializes \tcode{base_} with \tcode{views::all(std::forward(r))} and initializes \tcode{pred_} with \tcode{std::\brk{}move(pred)}. \end{itemdescr} @@ -3016,13 +3016,13 @@ \effects Equivalent to: \tcode{return x.current_ == y.end_;} \end{itemdescr} -\rSec3[range.filter.adaptor]{\tcode{view::filter}} +\rSec3[range.filter.adaptor]{\tcode{views::filter}} \pnum -The name \tcode{view::filter} denotes a +The name \tcode{views::filter} denotes a range adaptor object\iref{range.adaptor.object}. For some subexpressions \tcode{E} and \tcode{P}, -the expression \tcode{view::filter(E, P)} is expression-equivalent to +the expression \tcode{views::filter(E, P)} is expression-equivalent to \tcode{filter_view\{E, P\}}. @@ -3115,7 +3115,7 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{view::all(std::forward(r))} +\effects Initializes \tcode{base_} with \tcode{views::all(std::forward(r))} and \tcode{fun_} with \tcode{std::move(fun)}. \end{itemdescr} @@ -3666,13 +3666,13 @@ \effects Equivalent to: \tcode{return x.end_ - y.current_;} \end{itemdescr} -\rSec3[range.transform.adaptor]{\tcode{view::transform}} +\rSec3[range.transform.adaptor]{\tcode{views::transform}} \pnum -The name \tcode{view::transform} denotes a +The name \tcode{views::transform} denotes a range adaptor object\iref{range.adaptor.object}. For some subexpressions \tcode{E} and \tcode{F}, the expression -\tcode{view::transform(E, F)} is expression-equivalent to +\tcode{views::transform(E, F)} is expression-equivalent to \tcode{transform_view\{E, F\}}. @@ -3792,7 +3792,7 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{view::all(std::forward(r))} +\effects Initializes \tcode{base_} with \tcode{views::all(std::forward(r))} and \tcode{count_} with \tcode{count}. \end{itemdescr} @@ -3872,13 +3872,13 @@ \tcode{return y.count() == 0 || y.base() == x.end_;} \end{itemdescr} -\rSec3[range.take.adaptor]{\tcode{view::take}} +\rSec3[range.take.adaptor]{\tcode{views::take}} \pnum -The name \tcode{view::take} denotes a +The name \tcode{views::take} denotes a range adaptor object\iref{range.adaptor.object}. For some subexpressions \tcode{E} and \tcode{F}, the expression -\tcode{view::take(E, F)} is expression-equivalent to +\tcode{views::take(E, F)} is expression-equivalent to \tcode{take_view\{E, F\}}. \rSec2[range.take.while]{Take while view} @@ -3895,7 +3895,7 @@ \begin{codeblock} auto input = istringstream{"0 1 2 3 4 5 6 7 8 9"}; auto small = [](const auto x) noexcept { return x < 5; }; -auto small_ints = istream_view(input) | view::take_while(small); +auto small_ints = istream_view(input) | views::take_while(small); for (const auto i : small_ints) { cout << i << ' '; // prints \tcode{0 1 2 3 4} } @@ -4030,14 +4030,14 @@ \tcode{return y.end_ == x || !invoke(*y.pred_, *x);} \end{itemdescr} -\rSec3[range.take.while.adaptor]{\tcode{view::take_while}} +\rSec3[range.take.while.adaptor]{\tcode{views::take_while}} \indexlibrary{\idxcode{take_while}}% \pnum -The name \tcode{view::take_while} denotes +The name \tcode{views::take_while} denotes a range adaptor object\iref{range.adaptor.object}. For some subexpressions \tcode{E} and \tcode{F}, -the expression \tcode{view::take_while(E, F)} +the expression \tcode{views::take_while(E, F)} is expression-equivalent to \tcode{take_while_view\{E, F\}}. \rSec2[range.drop]{Drop view} @@ -4052,7 +4052,7 @@ \pnum \begin{example} \begin{codeblock} -auto ints = view::iota(0) | view::take(10); +auto ints = views::iota(0) | views::take(10); auto latter_half = drop_view{ints, 5}; for (auto i : latter_half) { cout << i << ' '; // prints \tcode{5 6 7 8 9} @@ -4164,13 +4164,13 @@ \end{note} \end{itemdescr} -\rSec3[range.drop.adaptor]{\tcode{view::drop}} +\rSec3[range.drop.adaptor]{\tcode{views::drop}} \pnum -The name \tcode{view::drop} denotes +The name \tcode{views::drop} denotes a range adaptor object\iref{range.adaptor.object}. For some subexpressions \tcode{E} and \tcode{F}, -the expression \tcode{view::drop(E, F)} +the expression \tcode{views::drop(E, F)} is expression-equivalent to \tcode{drop_view\{E, F\}}. \rSec2[range.drop.while]{Drop while view} @@ -4282,13 +4282,13 @@ \end{note} \end{itemdescr} -\rSec3[range.drop.while.adaptor]{\tcode{view::drop_while}} +\rSec3[range.drop.while.adaptor]{\tcode{views::drop_while}} \pnum -The name \tcode{view::drop_while} +The name \tcode{views::drop_while} denotes a range adaptor object\iref{range.adaptor.object}. For some subexpressions \tcode{E} and \tcode{F}, -the expression \tcode{view::drop_while(E, F)} +the expression \tcode{views::drop_while(E, F)} is expression-equivalent to \tcode{drop_while_view\{E, F\}}. \rSec2[range.join]{Join view} @@ -4396,7 +4396,7 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{view::all(std::forward(r))}. +\effects Initializes \tcode{base_} with \tcode{views::all(std::forward(r))}. \end{itemdescr} \rSec3[range.join.iterator]{Class template \tcode{join_view::iterator}} @@ -4527,7 +4527,7 @@ if constexpr (ref_is_glvalue) // \tcode{x} is a reference return (x); // \tcode{(x)} is an lvalue else - return (parent_->inner_ = view::all(x)); + return (parent_->inner_ = views::all(x)); }; for (; outer_ != ranges::end(parent_->base_); ++outer_) { @@ -4747,13 +4747,13 @@ \effects Equivalent to: \tcode{return x.outer_ == y.end_;} \end{itemdescr} -\rSec3[range.join.adaptor]{\tcode{view::join}} +\rSec3[range.join.adaptor]{\tcode{views::join}} \pnum -The name \tcode{view::join} denotes a +The name \tcode{views::join} denotes a range adaptor object\iref{range.adaptor.object}. For some subexpression \tcode{E}, the expression -\tcode{view::join(E)} is expression-equivalent to +\tcode{views::join(E)} is expression-equivalent to \tcode{join_view\{E\}}. \rSec2[range.split]{Split view} @@ -4874,8 +4874,8 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{base_} with \tcode{view::all(std::forward(r))} and -\tcode{pattern_} with \tcode{view::all(std\brk{}::forward

(p))}. +Initializes \tcode{base_} with \tcode{views::all(std::forward(r))} and +\tcode{pattern_} with \tcode{views::all(std\brk{}::forward

(p))}. \end{itemdescr} \indexlibrary{\idxcode{split_view}!\idxcode{split_view}}% @@ -4889,7 +4889,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{base_} with \tcode{view::all(std::forward(r))} and +Initializes \tcode{base_} with \tcode{views::all(std::forward(r))} and \tcode{pattern_} with \tcode{single_view\{\brk{}std::move(e)\}}. \end{itemdescr} @@ -5226,13 +5226,13 @@ \tcode{ranges::iter_swap(x.i_.\placeholdernc{current}, y.i_.\placeholdernc{current})}. \end{itemdescr} -\rSec3[range.split.adaptor]{\tcode{view::split}} +\rSec3[range.split.adaptor]{\tcode{views::split}} \pnum -The name \tcode{view::split} denotes a +The name \tcode{views::split} denotes a range adaptor object\iref{range.adaptor.object}. For some subexpressions \tcode{E} and \tcode{F}, -the expression \tcode{view::split(E, F)} is expression-equivalent to +the expression \tcode{views::split(E, F)} is expression-equivalent to \tcode{split_view\{E, F\}}. @@ -5244,11 +5244,11 @@ for some iterator \tcode{i} and non-negative integer \tcode{n}. \pnum -The name \tcode{view::counted} denotes a +The name \tcode{views::counted} denotes a customization point object\iref{customization.point.object}. Let \tcode{E} and \tcode{F} be expressions, and let \tcode{T} be \tcode{decay_t}. -Then the expression \tcode{view::counted(E, F)} is expression-equivalent to: +Then the expression \tcode{views::counted(E, F)} is expression-equivalent to: \begin{itemize} \item If \tcode{T} models \libconcept{Iterator} and @@ -5260,9 +5260,9 @@ \tcode{subrange\{counted_iterator\{E, F\}, default_sentinel\}}. \end{itemize} -\item Otherwise, \tcode{view::counted(E, F)} is ill-formed. +\item Otherwise, \tcode{views::counted(E, F)} is ill-formed. \begin{note} - This case can result in substitution failure when \tcode{view::counted(E, F)} + This case can result in substitution failure when \tcode{views::counted(E, F)} appears in the immediate context of a template instantiation. \end{note} \end{itemize} @@ -5378,7 +5378,7 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{view::all(std::forward(r))}. +\effects Initializes \tcode{base_} with \tcode{views::all(std::forward(r))}. \end{itemdescr} \indexlibrary{\idxcode{base}!\idxcode{common_view}}% @@ -5391,18 +5391,18 @@ \effects Equivalent to: \tcode{return base_;} \end{itemdescr} -\rSec3[range.common.adaptor]{\tcode{view::common}} +\rSec3[range.common.adaptor]{\tcode{views::common}} \pnum -The name \tcode{view::common} denotes a +The name \tcode{views::common} denotes a range adaptor object\iref{range.adaptor.object}. For some subexpression \tcode{E}, -the expression \tcode{view::common(E)} is expression-equivalent to: +the expression \tcode{views::common(E)} is expression-equivalent to: \begin{itemize} -\item \tcode{view::all(E)}, +\item \tcode{views::all(E)}, if \tcode{decltype((E))} models \libconcept{CommonRange} - and \tcode{view::all(E)} is a well-formed expression. + and \tcode{views::all(E)} is a well-formed expression. \item Otherwise, \tcode{common_view\{E\}}. \end{itemize} @@ -5487,7 +5487,7 @@ \begin{itemdescr} \pnum -\effects Initializes \tcode{base_} with \tcode{view::all(std::forward(r))}. +\effects Initializes \tcode{base_} with \tcode{views::all(std::forward(r))}. \end{itemdescr} \indexlibrary{\idxcode{base}!\idxcode{reverse_view}}% @@ -5542,13 +5542,13 @@ \effects Equivalent to: \tcode{return make_reverse_iterator(ranges::begin(base_));} \end{itemdescr} -\rSec3[range.reverse.adaptor]{\tcode{view::reverse}} +\rSec3[range.reverse.adaptor]{\tcode{views::reverse}} \pnum -The name \tcode{view::reverse} denotes a +The name \tcode{views::reverse} denotes a range adaptor object\iref{range.adaptor.object}. For some subexpression \tcode{E}, the expression -\tcode{view::reverse(E)} is expression-equivalent to: +\tcode{views::reverse(E)} is expression-equivalent to: \begin{itemize} \item If the type of \tcode{E} is @@ -5776,10 +5776,10 @@ of the adapted \tcode{View}'s value-type. \pnum -The name \tcode{view::elements} denotes +The name \tcode{views::elements} denotes a range adaptor object\iref{range.adaptor.object}. For some subexpression \tcode{E} and constant expression \tcode{N}, -the expression \tcode{view::elements(E)} is expression-equivalent to +the expression \tcode{views::elements(E)} is expression-equivalent to \tcode{elements_view, N>\{E\}}. \begin{example} @@ -5791,12 +5791,12 @@ {"Hamilton"sv, 1936} }; -auto names = historical_figures | view::elements<0>; +auto names = historical_figures | views::elements<0>; for (auto&& name : names) { cout << name << ' '; // prints \tcode{Babbage Hamilton Lovelace Turing } } -auto birth_years = historical_figures | view::elements<1>; +auto birth_years = historical_figures | views::elements<1>; for (auto&& born : birth_years) { cout << born << ' '; // prints \tcode{1791 1936 1815 1912 } } From 133ffa9709eb56f30eb7d0da17857b98833c6fc0 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 14:57:02 -0700 Subject: [PATCH 04/84] [everywhere] Rename concept 'Same' to 'same_as'. --- source/algorithms.tex | 8 +++--- source/concepts.tex | 30 ++++++++++----------- source/expressions.tex | 4 +-- source/iterators.tex | 60 +++++++++++++++++++++--------------------- source/numerics.tex | 4 +-- source/ranges.tex | 36 ++++++++++++------------- source/support.tex | 2 +- source/utilities.tex | 2 +- 8 files changed, 73 insertions(+), 73 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 676c67060e..f1a59c4c71 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1656,7 +1656,7 @@ class Proj = identity, IndirectRelation> C = ranges::equal_to> requires IndirectlyCopyable && (ForwardIterator || - (InputIterator && Same, iter_value_t>) || + (InputIterator && same_as, iter_value_t>) || IndirectlyCopyableStorable) constexpr unique_copy_result unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); @@ -1664,7 +1664,7 @@ IndirectRelation, Proj>> C = ranges::equal_to> requires IndirectlyCopyable, O> && (ForwardIterator> || - (InputIterator && Same, iter_value_t>) || + (InputIterator && same_as, iter_value_t>) || IndirectlyCopyableStorable, O>) constexpr unique_copy_result, O> unique_copy(R&& r, O result, C comp = {}, Proj proj = {}); @@ -5227,7 +5227,7 @@ class Proj = identity, IndirectRelation> C = ranges::equal_to> requires IndirectlyCopyable && (ForwardIterator || - (InputIterator && Same, iter_value_t>) || + (InputIterator && same_as, iter_value_t>) || IndirectlyCopyableStorable) constexpr ranges::unique_copy_result ranges::unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); @@ -5235,7 +5235,7 @@ IndirectRelation, Proj>> C = ranges::equal_to> requires IndirectlyCopyable, O> && (ForwardIterator> || - (InputIterator && Same, iter_value_t>) || + (InputIterator && same_as, iter_value_t>) || IndirectlyCopyableStorable, O>) constexpr ranges::unique_copy_result, O> ranges::unique_copy(R&& r, O result, C comp = {}, Proj proj = {}); diff --git a/source/concepts.tex b/source/concepts.tex index df0e72c938..5af18a2c96 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -147,9 +147,9 @@ \begin{codeblock} namespace std { // \ref{concepts.lang}, language-related concepts - // \ref{concept.same}, concept \libconcept{Same} + // \ref{concept.same}, concept \libconcept{same_as} template - concept Same = @\seebelow@; + concept same_as = @\seebelow@; // \ref{concept.derivedfrom}, concept \libconcept{DerivedFrom} template @@ -271,21 +271,21 @@ features. These concepts express relationships between types, type classifications, and fundamental type properties. -\rSec2[concept.same]{Concept \libconcept{Same}} +\rSec2[concept.same]{Concept \libconcept{same_as}} -\indexlibrary{\idxcode{Same}}% +\indexlibrary{\idxcode{same_as}}% \begin{itemdecl} template concept @\placeholdernc{same-impl}@ = is_same_v; // \expos template - concept Same = @\placeholdernc{same-impl}@ && @\placeholdernc{same-impl}@; + concept same_as = @\placeholdernc{same-impl}@ && @\placeholdernc{same-impl}@; \end{itemdecl} \begin{itemdescr} \pnum \begin{note} -\tcode{\libconcept{Same}} subsumes \tcode{\libconcept{Same}} and +\tcode{\libconcept{same_as}} subsumes \tcode{\libconcept{same_as}} and vice versa. \end{note} \end{itemdescr} @@ -382,7 +382,7 @@ \begin{itemdecl} template concept CommonReference = - Same, common_reference_t> && + same_as, common_reference_t> && ConvertibleTo> && ConvertibleTo>; \end{itemdecl} @@ -426,7 +426,7 @@ \begin{itemdecl} template concept Common = - Same, common_type_t> && + same_as, common_type_t> && requires { static_cast>(declval()); static_cast>(declval()); @@ -505,7 +505,7 @@ is_lvalue_reference_v && CommonReference&, const remove_reference_t&> && requires(LHS lhs, RHS&& rhs) { - { lhs = std::forward(rhs) } -> Same; + { lhs = std::forward(rhs) } -> same_as; }; \end{itemdecl} @@ -827,12 +827,12 @@ const remove_reference_t& b2, const bool a) { { b1 } -> ConvertibleTo; { !b1 } -> ConvertibleTo; - { b1 && b2 } -> Same; - { b1 && a } -> Same; - { a && b2 } -> Same; - { b1 || b2 } -> Same; - { b1 || a } -> Same; - { a || b2 } -> Same; + { b1 && b2 } -> same_as; + { b1 && a } -> same_as; + { a && b2 } -> same_as; + { b1 || b2 } -> same_as; + { b1 || a } -> same_as; + { a || b2 } -> same_as; { b1 == b2 } -> ConvertibleTo; { b1 == a } -> ConvertibleTo; { a == b2 } -> ConvertibleTo; diff --git a/source/expressions.tex b/source/expressions.tex index 93dc47ff56..75721be9cb 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -2710,14 +2710,14 @@ \begin{codeblock} template concept C2 = requires(T x) { - {*x} -> Same; + {*x} -> same_as; }; \end{codeblock} The \grammarterm{compound-requirement} in \tcode{C2} requires that \tcode{*x} is a valid expression, that \tcode{typename T::inner} is a valid type, and -that \tcode{Same} is satisfied. +that \tcode{same_as} is satisfied. \begin{codeblock} template concept C3 = diff --git a/source/iterators.tex b/source/iterators.tex index 7590fc5660..8fd63cd0ff 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -367,7 +367,7 @@ // \ref{iterators.common}, common iterators template S> - requires (!Same) + requires (!same_as) class common_iterator; template @@ -857,7 +857,7 @@ concept @\placeholder{cpp17-iterator}@ = Copyable && requires(I i) { { *i } -> @\placeholder{can-reference}@; - { ++i } -> Same; + { ++i } -> same_as; { *i++ } -> @\placeholder{can-reference}@; }; @@ -877,30 +877,30 @@ concept @\placeholder{cpp17-forward-iterator}@ = @\placeholder{cpp17-input-iterator}@ && Constructible && is_lvalue_reference_v> && - Same>, typename readable_traits::value_type> && + same_as>, typename readable_traits::value_type> && requires(I i) { { i++ } -> ConvertibleTo; - { *i++ } -> Same>; + { *i++ } -> same_as>; }; template concept @\placeholder{cpp17-bidirectional-iterator}@ = @\placeholder{cpp17-forward-iterator}@ && requires(I i) { - { --i } -> Same; + { --i } -> same_as; { i-- } -> ConvertibleTo; - { *i-- } -> Same>; + { *i-- } -> same_as>; }; template concept @\placeholder{cpp17-random-access-iterator}@ = @\placeholder{cpp17-bidirectional-iterator}@ && StrictTotallyOrdered && requires(I i, typename incrementable_traits::difference_type n) { - { i += n } -> Same; - { i -= n } -> Same; - { i + n } -> Same; - { n + i } -> Same; - { i - n } -> Same; - { i - i } -> Same; + { i += n } -> same_as; + { i -= n } -> same_as; + { i + n } -> same_as; + { n + i } -> same_as; + { i - n } -> same_as; + { i - i } -> same_as; { i[n] } -> ConvertibleTo>; }; \end{codeblock} @@ -1243,7 +1243,7 @@ \begin{itemize} \item If \tcode{Out} and \tcode{T} model - \tcode{Readable \&\& Same, decay_t{>}}, + \tcode{Readable \&\& same_as, decay_t{>}}, then \tcode{*o} after any above assignment is equal to the value of \tcode{E} before the assignment. \end{itemize} @@ -1292,7 +1292,7 @@ requires(I i) { typename iter_difference_t; requires @\placeholdernc{is-signed-integer-like}@>; - { ++i } -> Same; // not required to be equality-preserving + { ++i } -> same_as; // not required to be equality-preserving i++; // not required to be equality-preserving }; \end{codeblock} @@ -1442,7 +1442,7 @@ Regular && WeaklyIncrementable && requires(I i) { - { i++ } -> Same; + { i++ } -> same_as; }; \end{codeblock} @@ -1548,8 +1548,8 @@ Sentinel && !disable_sized_sentinel, remove_cv_t> && requires(const I& i, const S& s) { - { s - i } -> Same>; - { i - s } -> Same>; + { s - i } -> same_as>; + { i - s } -> same_as>; }; \end{itemdecl} @@ -1725,8 +1725,8 @@ ForwardIterator && DerivedFrom<@\placeholdernc{ITER_CONCEPT}@(I), bidirectional_iterator_tag> && requires(I i) { - { --i } -> Same; - { i-- } -> Same; + { --i } -> same_as; + { i-- } -> same_as; }; \end{codeblock} @@ -1770,12 +1770,12 @@ StrictTotallyOrdered && SizedSentinel && requires(I i, const I j, const iter_difference_t n) { - { i += n } -> Same; - { j + n } -> Same; - { n + j } -> Same; - { i -= n } -> Same; - { j - n } -> Same; - { j[n] } -> Same>; + { i += n } -> same_as; + { j + n } -> same_as; + { n + j } -> same_as; + { i -= n } -> same_as; + { j - n } -> same_as; + { j[n] } -> same_as>; }; \end{codeblock} @@ -1820,9 +1820,9 @@ RandomAccessIterator && DerivedFrom<@\placeholdernc{ITER_CONCEPT}@(I), contiguous_iterator_tag> && is_lvalue_reference_v> && - Same, remove_cvref_t>> && + same_as, remove_cvref_t>> && requires(const I& i) { - { to_address(i) } -> Same>>; + { to_address(i) } -> same_as>>; }; \end{codeblock} @@ -2895,7 +2895,7 @@ If \tcode{n == 0}, \range{i}{bound} or \range{bound}{i} denotes a range. If \tcode{n < 0}, \range{bound}{i} denotes a range, \tcode{I} models \libconcept{BidirectionalIterator}, and -\tcode{I} and \tcode{S} model \tcode{\libconcept{Same}}. +\tcode{I} and \tcode{S} model \tcode{\libconcept{same_as}}. \pnum \effects @@ -2936,7 +2936,7 @@ \range{first}{last} denotes a range, or \range{last}{first} denotes a range and \tcode{S} and \tcode{I} model -\tcode{Same \&\& SizedSentinel}. +\tcode{same_as \&\& SizedSentinel}. \pnum \effects @@ -4653,7 +4653,7 @@ \begin{codeblock} namespace std { template S> - requires (!Same) + requires (!same_as) class common_iterator { public: constexpr common_iterator() = default; diff --git a/source/numerics.tex b/source/numerics.tex index 429f1d545b..629261092d 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -2156,8 +2156,8 @@ concept UniformRandomBitGenerator = Invocable && UnsignedIntegral> && requires { - { G::min() } -> Same>; - { G::max() } -> Same>; + { G::min() } -> same_as>; + { G::max() } -> same_as>; }; \end{codeblock} diff --git a/source/ranges.tex b/source/ranges.tex index 2f7382da39..0653daffbc 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -106,7 +106,7 @@ // \ref{view.interface}, class template \tcode{view_interface} template - requires is_class_v && Same> + requires is_class_v && same_as> class view_interface; // \ref{range.subrange}, sub-ranges @@ -1027,7 +1027,7 @@ concept ContiguousRange = RandomAccessRange && ContiguousIterator> && requires(T& t) { - { ranges::data(t) } -> Same>>; + { ranges::data(t) } -> same_as>>; }; \end{itemdecl} @@ -1043,7 +1043,7 @@ \begin{itemdecl} template concept CommonRange = - Range && Same, sentinel_t>; + Range && same_as, sentinel_t>; \end{itemdecl} \pnum @@ -1073,8 +1073,8 @@ template concept @\placeholder{simple-view}@ = // \expos View && Range && - Same, iterator_t> && - Same, sentinel_t>; + same_as, iterator_t> && + same_as, sentinel_t>; template concept @\placeholder{has-arrow}@ = // \expos @@ -1082,7 +1082,7 @@ template concept @\placeholder{not-same-as}@ = // \expos - !Same, remove_cvref_t>; + !same_as, remove_cvref_t>; \end{codeblock} \rSec2[view.interface]{View interface} @@ -1096,7 +1096,7 @@ \begin{codeblock} namespace std::ranges { template - requires is_class_v && Same> + requires is_class_v && same_as> class view_interface : public view_base { private: constexpr D& derived() noexcept { // \expos @@ -1557,12 +1557,12 @@ \begin{codeblock} vector f(); auto result1 = ranges::find(f(), 42); // \#1 -static_assert(Same); +static_assert(same_as); auto vec = f(); auto result2 = ranges::find(vec, 42); // \#2 -static_assert(Same::iterator>); +static_assert(same_as::iterator>); auto result3 = ranges::find(subrange{vec}, 42); // \#3 -static_assert(Same::iterator>); +static_assert(same_as::iterator>); \end{codeblock} The call to \tcode{ranges::find} at \#1 returns \tcode{ranges::dangling} since \tcode{f()} is an rvalue \tcode{vector}; @@ -1793,7 +1793,7 @@ constexpr iterator begin() const; constexpr auto end() const; - constexpr iterator end() const requires Same; + constexpr iterator end() const requires same_as; constexpr auto size() const requires @\seebelow@; }; @@ -1833,8 +1833,8 @@ template concept @\placeholder{Decrementable}@ = Incrementable && requires(I i) { - { --i } -> Same; - { i-- } -> Same; + { --i } -> same_as; + { i-- } -> same_as; }; \end{itemdecl} @@ -1867,8 +1867,8 @@ concept @\placeholder{Advanceable}@ = @\placeholdernc{Decrementable}@ && StrictTotallyOrdered && requires(I i, const I j, const @\placeholdernc{IOTA-DIFF-T}@(I) n) { - { i += n } -> Same; - { i -= n } -> Same; + { i += n } -> same_as; + { i -= n } -> same_as; I(j + n); I(n + j); I(j - n); @@ -1954,7 +1954,7 @@ \pnum \effects Equivalent to: \begin{codeblock} -if constexpr (Same) +if constexpr (same_as) return unreachable_sentinel; else return sentinel{bound_}; @@ -1963,7 +1963,7 @@ \indexlibrary{\idxcode{end}!\idxcode{iota_view}}% \begin{itemdecl} -constexpr iterator end() const requires Same; +constexpr iterator end() const requires same_as; \end{itemdecl} \begin{itemdescr} @@ -1993,7 +1993,7 @@ \pnum \remarks The expression in the \grammarterm{requires-clause} is equivalent to \begin{codeblock} -(Same && Advanceable) || (Integral && Integral) || +(same_as && Advanceable) || (Integral && Integral) || SizedSentinel \end{codeblock} \end{itemdescr} diff --git a/source/support.tex b/source/support.tex index 56e3c7b9d3..1b492a9ce6 100644 --- a/source/support.tex +++ b/source/support.tex @@ -4714,7 +4714,7 @@ \begin{codeblock} template concept @\placeholder{compares-as}@ = // \expos - Same, Cat>; + same_as, Cat>; template concept @\placeholder{partially-ordered-with}@ = // \expos diff --git a/source/utilities.tex b/source/utilities.tex index 332c4de8be..087c93de15 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -7927,7 +7927,7 @@ concept @\placeholdernc{no-throw-input-iterator}@ = // exposition only InputIterator && is_lvalue_reference_v> && - Same>, iter_value_t>; + same_as>, iter_value_t>; \end{itemdecl} \begin{itemdescr} From 4b36335c9d70cbcbbabe72a66e0e2a8427068a30 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 14:57:50 -0700 Subject: [PATCH 05/84] [everywhere] Rename concept 'DerivedFrom' to 'derived_from'. --- source/concepts.tex | 12 ++++++------ source/iterators.tex | 16 ++++++++-------- source/ranges.tex | 18 +++++++++--------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 5af18a2c96..d774ff2ba6 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -151,9 +151,9 @@ template concept same_as = @\seebelow@; - // \ref{concept.derivedfrom}, concept \libconcept{DerivedFrom} + // \ref{concept.derivedfrom}, concept \libconcept{derived_from} template - concept DerivedFrom = @\seebelow@; + concept derived_from = @\seebelow@; // \ref{concept.convertibleto}, concept \libconcept{ConvertibleTo} template @@ -290,12 +290,12 @@ \end{note} \end{itemdescr} -\rSec2[concept.derivedfrom]{Concept \libconcept{DerivedFrom}} +\rSec2[concept.derivedfrom]{Concept \libconcept{derived_from}} -\indexlibrary{\idxcode{DerivedFrom}}% +\indexlibrary{\idxcode{derived_from}}% \begin{itemdecl} template - concept DerivedFrom = + concept derived_from = is_base_of_v && is_convertible_v; \end{itemdecl} @@ -303,7 +303,7 @@ \begin{itemdescr} \pnum \begin{note} -\tcode{\libconcept{DerivedFrom}} is satisfied if and only if +\tcode{\libconcept{derived_from}} is satisfied if and only if \tcode{Derived} is publicly and unambiguously derived from \tcode{Base}, or \tcode{Derived} and \tcode{Base} are the same class type ignoring cv-qualifiers. \end{note} diff --git a/source/iterators.tex b/source/iterators.tex index 8fd63cd0ff..6da200ef4b 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -1621,7 +1621,7 @@ Iterator && Readable && requires { typename @\placeholdernc{ITER_CONCEPT}@(I); } && - DerivedFrom<@\placeholdernc{ITER_CONCEPT}@(I), input_iterator_tag>; + derived_from<@\placeholdernc{ITER_CONCEPT}@(I), input_iterator_tag>; \end{codeblock} \rSec3[iterator.concept.output]{Concept \libconcept{OutputIterator}} @@ -1672,7 +1672,7 @@ template concept ForwardIterator = InputIterator && - DerivedFrom<@\placeholdernc{ITER_CONCEPT}@(I), forward_iterator_tag> && + derived_from<@\placeholdernc{ITER_CONCEPT}@(I), forward_iterator_tag> && Incrementable && Sentinel; \end{codeblock} @@ -1723,7 +1723,7 @@ template concept BidirectionalIterator = ForwardIterator && - DerivedFrom<@\placeholdernc{ITER_CONCEPT}@(I), bidirectional_iterator_tag> && + derived_from<@\placeholdernc{ITER_CONCEPT}@(I), bidirectional_iterator_tag> && requires(I i) { { --i } -> same_as; { i-- } -> same_as; @@ -1766,7 +1766,7 @@ template concept RandomAccessIterator = BidirectionalIterator && - DerivedFrom<@\placeholdernc{ITER_CONCEPT}@(I), random_access_iterator_tag> && + derived_from<@\placeholdernc{ITER_CONCEPT}@(I), random_access_iterator_tag> && StrictTotallyOrdered && SizedSentinel && requires(I i, const I j, const iter_difference_t n) { @@ -1818,7 +1818,7 @@ template concept @\libconcept{ContiguousIterator}@ = RandomAccessIterator && - DerivedFrom<@\placeholdernc{ITER_CONCEPT}@(I), contiguous_iterator_tag> && + derived_from<@\placeholdernc{ITER_CONCEPT}@(I), contiguous_iterator_tag> && is_lvalue_reference_v> && same_as, remove_cvref_t>> && requires(const I& i) { @@ -3120,7 +3120,7 @@ \tcode{random_access_iterator_tag} if the type \tcode{iterator_traits<\brk{}Iterator>::iterator_category} models -\tcode{\libconcept{DerivedFrom}}, and +\tcode{\libconcept{derived_from}}, and \item \tcode{iterator_traits<\brk{}Iterator>::iterator_category} otherwise. \end{itemize} @@ -4116,7 +4116,7 @@ \tcode{random_access_iterator_tag} if the type \tcode{iterator_traits<\brk{}Iterator>::iterator_category} models -\tcode{\libconcept{DerivedFrom}}, and +\tcode{\libconcept{derived_from}}, and \item \tcode{iterator_traits<\brk{}Iterator>::iterator_category} otherwise. \end{itemize} @@ -4734,7 +4734,7 @@ \tcode{iterator_category} denotes \tcode{forward_iterator_tag} if \tcode{iterator_traits::iterator_category} -models \tcode{DerivedFrom}; +models \tcode{derived_from}; otherwise it denotes \tcode{input_iterator_tag}. \item diff --git a/source/ranges.tex b/source/ranges.tex index 0653daffbc..25674264f3 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -951,7 +951,7 @@ For a type \tcode{T}, the default value of \tcode{enable_view} is: \begin{itemize} -\item If \tcode{DerivedFrom} is \tcode{true}, \tcode{true}. +\item If \tcode{derived_from} is \tcode{true}, \tcode{true}. \item Otherwise, if \tcode{T} is a specialization of class template \tcode{initializer_list}\iref{support.initlist}, \tcode{set}\iref{set}, @@ -1163,7 +1163,7 @@ incomplete type. Before any member of the resulting specialization of \tcode{view_interface} other than special member functions is referenced, \tcode{D} shall be complete, and -model both \tcode{\libconcept{DerivedFrom}>} and \libconcept{View}. +model both \tcode{\libconcept{derived_from}>} and \libconcept{View}. \rSec3[view.interface.members]{Members} @@ -1212,7 +1212,7 @@ concept @\placeholdernc{pair-like}@ = // \expos !is_reference_v && requires(T t) { typename tuple_size::type; // ensures \tcode{tuple_size} is complete - requires DerivedFrom, integral_constant>; + requires derived_from, integral_constant>; typename tuple_element_t<0, remove_const_t>; typename tuple_element_t<1, remove_const_t>; { get<0>(t) } -> ConvertibleTo&>; @@ -2810,10 +2810,10 @@ \item Let \tcode{C} denote the type \tcode{iterator_traits>::iterator_category}. -\item If \tcode{C} models \tcode{DerivedFrom}, +\item If \tcode{C} models \tcode{derived_from}, then \tcode{iterator_category} denotes \tcode{bi\-directional_iterator_tag}. -\item Otherwise, if \tcode{C} models \tcode{DerivedFrom}, +\item Otherwise, if \tcode{C} models \tcode{derived_from}, then \tcode{iterator_category} denotes \tcode{forward_iterator_tag}. \item Otherwise, \tcode{iterator_category} denotes \tcode{input_iterator_tag}. @@ -3318,7 +3318,7 @@ \pnum Let \tcode{C} denote the type \tcode{iterator_traits>::iterator_category}. -If \tcode{C} models \tcode{\libconcept{DerivedFrom}}, +If \tcode{C} models \tcode{\libconcept{derived_from}}, then \tcode{iterator_category} denotes \tcode{random_access_iterator_tag}; otherwise, \tcode{iterator_category} denotes \tcode{C}. @@ -4494,10 +4494,10 @@ \item If \tcode{ref_is_glvalue} is \tcode{true}, \begin{itemize} \item If \placeholder{OUTERC} and \placeholder{INNERC} each model - \tcode{DerivedFrom}, \tcode{itera\-tor_category} + \tcode{derived_from}, \tcode{itera\-tor_category} denotes \tcode{bidirectional_iterator_tag}. \item Otherwise, if \placeholder{OUTERC} and \placeholder{INNERC} each model - \tcode{DerivedFrom}, \tcode{itera\-tor_category} + \tcode{derived_from}, \tcode{itera\-tor_category} denotes \tcode{forward_iterator_tag}. \end{itemize} \item Otherwise, \tcode{iterator_category} denotes \tcode{input_iterator_tag}. @@ -5147,7 +5147,7 @@ The \grammarterm{typedef-name} \tcode{iterator_category} denotes \tcode{forward_iterator_tag} if \tcode{iterator_traits>::iterator_category} models -\tcode{DerivedFrom}, and \tcode{input_iterator_tag} +\tcode{derived_from}, and \tcode{input_iterator_tag} otherwise. \indexlibrary{\idxcode{inner_iterator}!\idxcode{split_view::inner_iterator}}% From b0b50ad361778cb0e74aa204ea29c525ca17bd87 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:00:01 -0700 Subject: [PATCH 06/84] [everywhere] Rename concept 'ConvertibleTo' to 'convertible_to'. --- source/algorithms.tex | 32 +++++++++++----------- source/concepts.tex | 46 ++++++++++++++++---------------- source/expressions.tex | 2 +- source/iterators.tex | 22 ++++++++-------- source/lib-intro.tex | 4 +-- source/ranges.tex | 60 +++++++++++++++++++++--------------------- source/support.tex | 4 +-- source/templates.tex | 2 +- 8 files changed, 86 insertions(+), 86 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index f1a59c4c71..90c8566387 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -673,13 +673,13 @@ [[no_unique_address]] F fun; template - requires ConvertibleTo && ConvertibleTo + requires convertible_to && convertible_to operator for_each_result() const & { return {in, fun}; } template - requires ConvertibleTo && ConvertibleTo + requires convertible_to && convertible_to operator for_each_result() && { return {std::move(in), std::move(fun)}; } @@ -939,13 +939,13 @@ [[no_unique_address]] I2 in2; template - requires ConvertibleTo && ConvertibleTo + requires convertible_to && convertible_to operator mismatch_result() const & { return {in1, in2}; } template - requires ConvertibleTo && ConvertibleTo + requires convertible_to && convertible_to operator mismatch_result() && { return {std::move(in1), std::move(in2)}; } @@ -1142,13 +1142,13 @@ [[no_unique_address]] O out; template - requires ConvertibleTo && ConvertibleTo + requires convertible_to && convertible_to operator copy_result() const & { return {in, out}; } template - requires ConvertibleTo && ConvertibleTo + requires convertible_to && convertible_to operator copy_result() && { return {std::move(in), std::move(out)}; } @@ -1343,15 +1343,15 @@ [[no_unique_address]] O out; template - requires ConvertibleTo && - ConvertibleTo && ConvertibleTo + requires convertible_to && + convertible_to && convertible_to operator binary_transform_result() const & { return {in1, in2, out}; } template - requires ConvertibleTo && - ConvertibleTo && ConvertibleTo + requires convertible_to && + convertible_to && convertible_to operator binary_transform_result() && { return {std::move(in1), std::move(in2), std::move(out)}; } @@ -2169,15 +2169,15 @@ [[no_unique_address]] O2 out2; template - requires ConvertibleTo && - ConvertibleTo && ConvertibleTo + requires convertible_to && + convertible_to && convertible_to operator partition_copy_result() const & { return {in, out1, out2}; } template - requires ConvertibleTo && - ConvertibleTo && ConvertibleTo + requires convertible_to && + convertible_to && convertible_to operator partition_copy_result() && { return {std::move(in), std::move(out1), std::move(out2)}; } @@ -2683,13 +2683,13 @@ [[no_unique_address]] T max; template - requires ConvertibleTo + requires convertible_to operator minmax_result() const & { return {min, max}; } template - requires ConvertibleTo + requires convertible_to operator minmax_result() && { return {std::move(min), std::move(max)}; } diff --git a/source/concepts.tex b/source/concepts.tex index d774ff2ba6..0ea822fa91 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -155,9 +155,9 @@ template concept derived_from = @\seebelow@; - // \ref{concept.convertibleto}, concept \libconcept{ConvertibleTo} + // \ref{concept.convertibleto}, concept \libconcept{convertible_to} template - concept ConvertibleTo = @\seebelow@; + concept convertible_to = @\seebelow@; // \ref{concept.commonref}, concept \libconcept{CommonReference} template @@ -309,18 +309,18 @@ \end{note} \end{itemdescr} -\rSec2[concept.convertibleto]{Concept \libconcept{ConvertibleTo}} +\rSec2[concept.convertibleto]{Concept \libconcept{convertible_to}} \pnum -The \libconcept{ConvertibleTo} concept requires an expression of a particular +The \libconcept{convertible_to} concept requires an expression of a particular type and value category to be both implicitly and explicitly convertible to some other type. The implicit and explicit conversions are required to produce equal results. -\indexlibrary{\idxcode{ConvertibleTo}}% +\indexlibrary{\idxcode{convertible_to}}% \begin{itemdecl} template - concept ConvertibleTo = + concept convertible_to = is_convertible_v && requires(From (&f)()) { static_cast(f()); @@ -338,7 +338,7 @@ for some types \tcode{From} and \tcode{To}, and let \tcode{f} be a function with no arguments and return type \tcode{From} such that \tcode{f()} is equality-preserving. -\tcode{From} and \tcode{To} model \tcode{\libconcept{ConvertibleTo}} +\tcode{From} and \tcode{To} model \tcode{\libconcept{convertible_to}} only if: \begin{itemize} @@ -368,9 +368,9 @@ \pnum For two types \tcode{T} and \tcode{U}, if \tcode{common_reference_t} is well-formed and denotes a type \tcode{C} such that both -\tcode{\libconcept{ConvertibleTo}} +\tcode{\libconcept{convertible_to}} and -\tcode{\libconcept{ConvertibleTo}} +\tcode{\libconcept{convertible_to}} are modeled, then \tcode{T} and \tcode{U} share a \term{common reference type}, \tcode{C}. \begin{note} @@ -383,8 +383,8 @@ template concept CommonReference = same_as, common_reference_t> && - ConvertibleTo> && - ConvertibleTo>; + convertible_to> && + convertible_to>; \end{itemdecl} \begin{itemdescr} @@ -759,7 +759,7 @@ \indexlibrary{\idxcode{MoveConstructible}}% \begin{itemdecl} template - concept MoveConstructible = Constructible && ConvertibleTo; + concept MoveConstructible = Constructible && convertible_to; \end{itemdecl} \begin{itemdescr} @@ -785,9 +785,9 @@ template concept CopyConstructible = MoveConstructible && - Constructible && ConvertibleTo && - Constructible && ConvertibleTo && - Constructible && ConvertibleTo; + Constructible && convertible_to && + Constructible && convertible_to && + Constructible && convertible_to; \end{itemdecl} \begin{itemdescr} @@ -825,20 +825,20 @@ Movable> && // (see \ref{concepts.object}) requires(const remove_reference_t& b1, const remove_reference_t& b2, const bool a) { - { b1 } -> ConvertibleTo; - { !b1 } -> ConvertibleTo; + { b1 } -> convertible_to; + { !b1 } -> convertible_to; { b1 && b2 } -> same_as; { b1 && a } -> same_as; { a && b2 } -> same_as; { b1 || b2 } -> same_as; { b1 || a } -> same_as; { a || b2 } -> same_as; - { b1 == b2 } -> ConvertibleTo; - { b1 == a } -> ConvertibleTo; - { a == b2 } -> ConvertibleTo; - { b1 != b2 } -> ConvertibleTo; - { b1 != a } -> ConvertibleTo; - { a != b2 } -> ConvertibleTo; + { b1 == b2 } -> convertible_to; + { b1 == a } -> convertible_to; + { a == b2 } -> convertible_to; + { b1 != b2 } -> convertible_to; + { b1 != a } -> convertible_to; + { a != b2 } -> convertible_to; }; \end{itemdecl} diff --git a/source/expressions.tex b/source/expressions.tex index 75721be9cb..484ce6d3f4 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -2505,7 +2505,7 @@ template concept R = requires (T i) { typename T::type; - {*i} -> ConvertibleTo; + {*i} -> convertible_to; }; \end{codeblock} A \grammarterm{requires-expression} can also be used in a diff --git a/source/iterators.tex b/source/iterators.tex index 6da200ef4b..47498cb3ff 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -879,7 +879,7 @@ is_lvalue_reference_v> && same_as>, typename readable_traits::value_type> && requires(I i) { - { i++ } -> ConvertibleTo; + { i++ } -> convertible_to; { *i++ } -> same_as>; }; @@ -887,7 +887,7 @@ concept @\placeholder{cpp17-bidirectional-iterator}@ = @\placeholder{cpp17-forward-iterator}@ && requires(I i) { { --i } -> same_as; - { i-- } -> ConvertibleTo; + { i-- } -> convertible_to; { *i-- } -> same_as>; }; @@ -901,7 +901,7 @@ { n + i } -> same_as; { i - n } -> same_as; { i - i } -> same_as; - { i[n] } -> ConvertibleTo>; + { i[n] } -> convertible_to>; }; \end{codeblock} @@ -4556,7 +4556,7 @@ constexpr move_sentinel(); constexpr explicit move_sentinel(S s); template - requires ConvertibleTo + requires convertible_to constexpr move_sentinel(const move_sentinel& s); template requires Assignable @@ -4596,7 +4596,7 @@ \indexlibrary{\idxcode{move_sentinel}!constructor}% \begin{itemdecl} template - requires ConvertibleTo + requires convertible_to constexpr move_sentinel(const move_sentinel& s); \end{itemdecl} @@ -4660,11 +4660,11 @@ constexpr common_iterator(I i); constexpr common_iterator(S s); template - requires ConvertibleTo && ConvertibleTo + requires convertible_to && convertible_to constexpr common_iterator(const common_iterator& x); template - requires ConvertibleTo && ConvertibleTo && + requires convertible_to && convertible_to && Assignable && Assignable common_iterator& operator=(const common_iterator& x); @@ -4771,7 +4771,7 @@ \indexlibrary{\idxcode{common_iterator}!constructor}% \begin{itemdecl} template - requires ConvertibleTo && ConvertibleTo + requires convertible_to && convertible_to constexpr common_iterator(const common_iterator& x); \end{itemdecl} @@ -4789,7 +4789,7 @@ \indexlibrarymember{operator=}{common_iterator}% \begin{itemdecl} template - requires ConvertibleTo && ConvertibleTo && + requires convertible_to && convertible_to && Assignable && Assignable common_iterator& operator=(const common_iterator& x); \end{itemdecl} @@ -5079,7 +5079,7 @@ constexpr counted_iterator() = default; constexpr counted_iterator(I x, iter_difference_t n); template - requires ConvertibleTo + requires convertible_to constexpr counted_iterator(const counted_iterator& x); template @@ -5179,7 +5179,7 @@ \indexlibrary{\idxcode{counted_iterator}!constructor}% \begin{itemdecl} template - requires ConvertibleTo + requires convertible_to constexpr counted_iterator(const counted_iterator& x); \end{itemdecl} diff --git a/source/lib-intro.tex b/source/lib-intro.tex index eff21d116c..646f410ead 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -718,8 +718,8 @@ constexpr auto @\placeholdernc{synth-three-way}@ = [](const T& t, const U& u) requires requires { - { t < u } -> ConvertibleTo; - { u < t } -> ConvertibleTo; + { t < u } -> convertible_to; + { u < t } -> convertible_to; } { if constexpr (ThreeWayComparableWith) { diff --git a/source/ranges.tex b/source/ranges.tex index 25674264f3..88a2122fe5 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1215,16 +1215,16 @@ requires derived_from, integral_constant>; typename tuple_element_t<0, remove_const_t>; typename tuple_element_t<1, remove_const_t>; - { get<0>(t) } -> ConvertibleTo&>; - { get<1>(t) } -> ConvertibleTo&>; + { get<0>(t) } -> convertible_to&>; + { get<1>(t) } -> convertible_to&>; }; template concept @\placeholdernc{pair-like-convertible-to}@ = // \expos !Range && @\placeholder{pair-like}@> && requires(T&& t) { - { get<0>(std::forward(t)) } -> ConvertibleTo; - { get<1>(std::forward(t)) } -> ConvertibleTo; + { get<0>(std::forward(t)) } -> convertible_to; + { get<1>(std::forward(t)) } -> convertible_to; }; template @@ -1257,11 +1257,11 @@ template<@\placeholdernc{not-same-as}@ R> requires @\placeholdernc{forwarding-range}@ && - ConvertibleTo, I> && ConvertibleTo, S> + convertible_to, I> && convertible_to, S> constexpr subrange(R&& r) requires (!StoreSize || SizedRange); template<@\placeholdernc{forwarding-range}@ R> - requires ConvertibleTo, I> && ConvertibleTo, S> + requires convertible_to, I> && convertible_to, S> constexpr subrange(R&& r, @\placeholdernc{make-unsigned-like-t}@(iter_difference_t) n) requires (K == subrange_kind::sized) : subrange{ranges::begin(r), ranges::end(r), n} @@ -1377,7 +1377,7 @@ \begin{itemdecl} template<@\placeholdernc{not-same-as}@ R> requires @\placeholdernc{forwarding-range}@ && - ConvertibleTo, I> && ConvertibleTo, S> + convertible_to, I> && convertible_to, S> constexpr subrange(R&& r) requires (!StoreSize || SizedRange); \end{itemdecl} @@ -1872,7 +1872,7 @@ I(j + n); I(n + j); I(j - n); - { j - j } -> ConvertibleTo<@\placeholdernc{IOTA-DIFF-T}@(I)>; + { j - j } -> convertible_to<@\placeholdernc{IOTA-DIFF-T}@(I)>; }; \end{itemdecl} @@ -2623,7 +2623,7 @@ \end{codeblock} The expression in the \grammarterm{requires-clause} is equivalent to \begin{codeblock} -ConvertibleTo && requires { @\placeholder{FUN}@(declval()); } +convertible_to && requires { @\placeholder{FUN}@(declval()); } \end{codeblock} \pnum @@ -3238,7 +3238,7 @@ iterator() = default; constexpr iterator(Parent& parent, iterator_t current); constexpr iterator(iterator i) - requires Const && ConvertibleTo, iterator_t>; + requires Const && convertible_to, iterator_t>; constexpr iterator_t base() const; constexpr decltype(auto) operator*() const @@ -3337,7 +3337,7 @@ \indexlibrary{\idxcode{iterator}!\idxcode{transform_view::iterator}}% \begin{itemdecl} constexpr iterator(iterator i) - requires Const && ConvertibleTo, iterator_t>; + requires Const && convertible_to, iterator_t>; \end{itemdecl} \begin{itemdescr} @@ -3585,7 +3585,7 @@ sentinel() = default; constexpr explicit sentinel(sentinel_t end); constexpr sentinel(sentinel i) - requires Const && ConvertibleTo, sentinel_t>; + requires Const && convertible_to, sentinel_t>; constexpr sentinel_t base() const; @@ -3614,7 +3614,7 @@ \indexlibrary{\idxcode{sentinel}!\idxcode{transform_view::sentinel}} \begin{itemdecl} constexpr sentinel(sentinel i) - requires Const && ConvertibleTo, sentinel_t>; + requires Const && convertible_to, sentinel_t>; \end{itemdecl} \begin{itemdescr} @@ -3821,7 +3821,7 @@ sentinel() = default; constexpr explicit sentinel(sentinel_t end); constexpr sentinel(sentinel s) - requires Const && ConvertibleTo, sentinel_t>; + requires Const && convertible_to, sentinel_t>; constexpr sentinel_t base() const; @@ -3843,7 +3843,7 @@ \indexlibrary{\idxcode{sentinel}!\idxcode{take_view::sentinel}}% \begin{itemdecl} constexpr sentinel(sentinel s) - requires Const && ConvertibleTo, sentinel_t>; + requires Const && convertible_to, sentinel_t>; \end{itemdecl} \begin{itemdescr} @@ -3988,7 +3988,7 @@ sentinel() = default; constexpr explicit sentinel(sentinel_t end, const Pred* pred); constexpr sentinel(sentinel s) - requires Const && ConvertibleTo, sentinel_t>; + requires Const && convertible_to, sentinel_t>; constexpr sentinel_t base() const { return end_; } @@ -4009,7 +4009,7 @@ \begin{itemdecl} constexpr sentinel(sentinel s) - requires Const && ConvertibleTo, sentinel_t>; + requires Const && convertible_to, sentinel_t>; \end{itemdecl} \begin{itemdescr} @@ -4431,9 +4431,9 @@ constexpr iterator(Parent& parent, iterator_t outer); constexpr iterator(iterator i) requires Const && - ConvertibleTo, iterator_t> && - ConvertibleTo, - iterator_t>>; + convertible_to, iterator_t> && + convertible_to, + iterator_t>>; constexpr decltype(auto) operator*() const { return *inner_; } @@ -4556,9 +4556,9 @@ \begin{itemdecl} constexpr iterator(iterator i) requires Const && - ConvertibleTo, iterator_t> && - ConvertibleTo, - iterator_t>>; + convertible_to, iterator_t> && + convertible_to, + iterator_t>>; \end{itemdecl} \begin{itemdescr} @@ -4709,7 +4709,7 @@ constexpr explicit sentinel(Parent& parent); constexpr sentinel(sentinel s) - requires Const && ConvertibleTo, sentinel_t>; + requires Const && convertible_to, sentinel_t>; friend constexpr bool operator==(const iterator& x, const sentinel& y); }; @@ -4729,7 +4729,7 @@ \indexlibrary{\idxcode{sentinel}!\idxcode{join_view::sentinel}} \begin{itemdecl} constexpr sentinel(sentinel s) - requires Const && ConvertibleTo, sentinel_t>; + requires Const && convertible_to, sentinel_t>; \end{itemdecl} \begin{itemdescr} @@ -4923,7 +4923,7 @@ constexpr outer_iterator(Parent& parent, iterator_t current) requires ForwardRange; constexpr outer_iterator(outer_iterator i) - requires Const && ConvertibleTo, iterator_t>; + requires Const && convertible_to, iterator_t>; constexpr value_type operator*() const; @@ -4977,7 +4977,7 @@ \indexlibrary{\idxcode{outer_iterator}!\idxcode{split_view::outer_iterator}}% \begin{itemdecl} constexpr outer_iterator(outer_iterator i) - requires Const && ConvertibleTo, iterator_t>; + requires Const && convertible_to, iterator_t>; \end{itemdecl} \begin{itemdescr} @@ -5252,7 +5252,7 @@ \begin{itemize} \item If \tcode{T} models \libconcept{Iterator} and - \tcode{decltype((F))} models \tcode{\libconcept{ConvertibleTo}>}, + \tcode{decltype((F))} models \tcode{\libconcept{convertible_to}>}, \begin{itemize} \item \tcode{subrange\{E, E + static_cast>(F)\}} if \tcode{T} models \libconcept{RandomAccessIterator}. @@ -5918,7 +5918,7 @@ iterator() = default; constexpr explicit iterator(iterator_t current); constexpr iterator(iterator i) - requires Const && ConvertibleTo, iterator_t>; + requires Const && convertible_to, iterator_t>; constexpr iterator_t base() const; @@ -5988,7 +5988,7 @@ \begin{itemdecl} constexpr iterator(iterator i) - requires Const && ConvertibleTo, iterator_t>; + requires Const && convertible_to, iterator_t>; \end{itemdecl} \begin{itemdescr} diff --git a/source/support.tex b/source/support.tex index 1b492a9ce6..307519c605 100644 --- a/source/support.tex +++ b/source/support.tex @@ -4761,7 +4761,7 @@ template concept ThreeWayComparable = @\placeholder{weakly-equality-comparable-with}@ && - (!ConvertibleTo || @\placeholder{partially-ordered-with}@) && + (!convertible_to || @\placeholder{partially-ordered-with}@) && requires(const remove_reference_t& a, const remove_reference_t& b) { { a <=> b } -> @\placeholder{compares-as}@; }; @@ -4803,7 +4803,7 @@ template concept ThreeWayComparableWith = @\placeholder{weakly-equality-comparable-with}@ && - (!ConvertibleTo || @\placeholder{partially-ordered-with}@) && + (!convertible_to || @\placeholder{partially-ordered-with}@) && ThreeWayComparable && ThreeWayComparable && CommonReference&, const remove_reference_t&> && diff --git a/source/templates.tex b/source/templates.tex index 1e8c3c3d42..1682ce7b19 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -3924,7 +3924,7 @@ \begin{codeblock} template concept C = requires(T x) { - { x == x } -> ConvertibleTo; + { x == x } -> convertible_to; }; template From 6131cdada6d7722abed318d5131002820fe22054 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:00:31 -0700 Subject: [PATCH 07/84] [everywhere] Rename concept 'CommonReference' to 'common_reference_with'. --- source/concepts.tex | 28 ++++++++++++++-------------- source/iterators.tex | 10 +++++----- source/support.tex | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 0ea822fa91..d56e9e7ebf 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -159,9 +159,9 @@ template concept convertible_to = @\seebelow@; - // \ref{concept.commonref}, concept \libconcept{CommonReference} + // \ref{concept.commonref}, concept \libconcept{common_reference_with} template - concept CommonReference = @\seebelow@; + concept common_reference_with = @\seebelow@; // \ref{concept.common}, concept \libconcept{Common} template @@ -363,7 +363,7 @@ \end{itemdescr} -\rSec2[concept.commonref]{Concept \libconcept{CommonReference}} +\rSec2[concept.commonref]{Concept \libconcept{common_reference_with}} \pnum For two types \tcode{T} and \tcode{U}, if \tcode{common_reference_t} @@ -378,10 +378,10 @@ different type. \tcode{C} may be a reference type. \end{note} -\indexlibrary{\idxcode{CommonReference}}% +\indexlibrary{\idxcode{common_reference_with}}% \begin{itemdecl} template - concept CommonReference = + concept common_reference_with = same_as, common_reference_t> && convertible_to> && convertible_to>; @@ -395,7 +395,7 @@ \tcode{decltype((t1))} and \tcode{decltype((t2))} are each \tcode{T}, and let \tcode{u1} and \tcode{u2} be equality-preserving expressions such that \tcode{decltype((u1))} and \tcode{decltype((u2))} are each \tcode{U}. -\tcode{T} and \tcode{U} model \tcode{\libconcept{CommonReference}} +\tcode{T} and \tcode{U} model \tcode{\libconcept{common_reference_with}} only if: \begin{itemize} \item \tcode{C(t1)} equals \tcode{C(t2)} if and only if @@ -406,7 +406,7 @@ \pnum \begin{note} -Users can customize the behavior of \libconcept{CommonReference} by specializing +Users can customize the behavior of \libconcept{common_reference_with} by specializing the \tcode{basic_common_reference} class template\iref{meta.trans.other}. \end{note} \end{itemdescr} @@ -431,10 +431,10 @@ static_cast>(declval()); static_cast>(declval()); } && - CommonReference< + common_reference_with< add_lvalue_reference_t, add_lvalue_reference_t> && - CommonReference< + common_reference_with< add_lvalue_reference_t>, common_reference_t< add_lvalue_reference_t, @@ -503,7 +503,7 @@ template concept Assignable = is_lvalue_reference_v && - CommonReference&, const remove_reference_t&> && + common_reference_with&, const remove_reference_t&> && requires(LHS lhs, RHS&& rhs) { { lhs = std::forward(rhs) } -> same_as; }; @@ -565,7 +565,7 @@ is that \tcode{t1} equals \tcode{u2} and \tcode{u1} equals \tcode{t2}. \item If \tcode{T} and \tcode{U} are different types that model - \tcode{\libconcept{CommonReference}}, + \tcode{\libconcept{common_reference_with}}, the result of the operation is that \tcode{C(t1)} equals \tcode{C(u2)} and @@ -653,7 +653,7 @@ \begin{itemdecl} template concept SwappableWith = - CommonReference&, const remove_reference_t&> && + common_reference_with&, const remove_reference_t&> && requires(T&& t, U&& u) { ranges::swap(std::forward(t), std::forward(t)); ranges::swap(std::forward(u), std::forward(u)); @@ -929,7 +929,7 @@ template concept EqualityComparableWith = EqualityComparable && EqualityComparable && - CommonReference&, const remove_reference_t&> && + common_reference_with&, const remove_reference_t&> && EqualityComparable< common_reference_t< const remove_reference_t&, @@ -989,7 +989,7 @@ template concept StrictTotallyOrderedWith = StrictTotallyOrdered && StrictTotallyOrdered && - CommonReference&, const remove_reference_t&> && + common_reference_with&, const remove_reference_t&> && StrictTotallyOrdered< common_reference_t< const remove_reference_t&, diff --git a/source/iterators.tex b/source/iterators.tex index 47498cb3ff..81642690b9 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -1203,9 +1203,9 @@ typename iter_reference_t; typename iter_rvalue_reference_t; } && - CommonReference&&, iter_value_t&> && - CommonReference&&, iter_rvalue_reference_t&&> && - CommonReference&&, const iter_value_t&>; + common_reference_with&&, iter_value_t&> && + common_reference_with&&, iter_rvalue_reference_t&&> && + common_reference_with&&, const iter_value_t&>; \end{codeblock} \pnum @@ -2327,7 +2327,7 @@ Invocable&> && Invocable> && Invocable> && - CommonReference< + common_reference_with< invoke_result_t&>, invoke_result_t>>; @@ -2338,7 +2338,7 @@ RegularInvocable&> && RegularInvocable> && RegularInvocable> && - CommonReference< + common_reference_with< invoke_result_t&>, invoke_result_t>>; diff --git a/source/support.tex b/source/support.tex index 307519c605..f5502d67cb 100644 --- a/source/support.tex +++ b/source/support.tex @@ -4806,7 +4806,7 @@ (!convertible_to || @\placeholder{partially-ordered-with}@) && ThreeWayComparable && ThreeWayComparable && - CommonReference&, const remove_reference_t&> && + common_reference_with&, const remove_reference_t&> && ThreeWayComparable< common_reference_t&, const remove_reference_t&>, Cat> && requires(const remove_reference_t& t, const remove_reference_t& u) { From bda62c46dbd21216b48d6ec228fef840a11fa58a Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:01:51 -0700 Subject: [PATCH 08/84] [everywhere] Rename concept 'Common' to 'common_with'. --- source/concepts.tex | 14 +++++++------- source/iterators.tex | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index d56e9e7ebf..0e54eed638 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -163,9 +163,9 @@ template concept common_reference_with = @\seebelow@; - // \ref{concept.common}, concept \libconcept{Common} + // \ref{concept.common}, concept \libconcept{common_with} template - concept Common = @\seebelow@; + concept common_with = @\seebelow@; // \ref{concepts.arithmetic}, arithmetic concepts template @@ -411,7 +411,7 @@ \end{note} \end{itemdescr} -\rSec2[concept.common]{Concept \libconcept{Common}} +\rSec2[concept.common]{Concept \libconcept{common_with}} \pnum If \tcode{T} and \tcode{U} can both be explicitly converted to some third type, @@ -422,10 +422,10 @@ different type. \tcode{C} might not be unique. \end{note} -\indexlibrary{\idxcode{Common}}% +\indexlibrary{\idxcode{common_with}}% \begin{itemdecl} template - concept Common = + concept common_with = same_as, common_type_t> && requires { static_cast>(declval()); @@ -449,7 +449,7 @@ \tcode{decltype((t1))} and \tcode{decltype((t2))} are each \tcode{T}, and let \tcode{u1} and \tcode{u2} be equality-preserving expressions such that \tcode{decltype((u1))} and \tcode{decltype((u2))} are each \tcode{U}. -\tcode{T} and \tcode{U} model \tcode{\libconcept{Common}} +\tcode{T} and \tcode{U} model \tcode{\libconcept{common_with}} only if: \begin{itemize} \item \tcode{C(t1)} equals \tcode{C(t2)} if and only if @@ -460,7 +460,7 @@ \pnum \begin{note} -Users can customize the behavior of \libconcept{Common} by specializing the +Users can customize the behavior of \libconcept{common_with} by specializing the \tcode{common_type} class template\iref{meta.trans.other}. \end{note} diff --git a/source/iterators.tex b/source/iterators.tex index 81642690b9..31a9cf5b4b 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -5112,7 +5112,7 @@ constexpr counted_iterator operator-(iter_difference_t n) const requires RandomAccessIterator; - template I2> + template I2> friend constexpr iter_difference_t operator-( const counted_iterator& x, const counted_iterator& y); friend constexpr iter_difference_t operator-( @@ -5125,13 +5125,13 @@ constexpr decltype(auto) operator[](iter_difference_t n) const requires RandomAccessIterator; - template I2> + template I2> friend constexpr bool operator==( const counted_iterator& x, const counted_iterator& y); friend constexpr bool operator==( const counted_iterator& x, default_sentinel_t); - template I2> + template I2> friend constexpr strong_ordering operator<=>( const counted_iterator& x, const counted_iterator& y); @@ -5408,7 +5408,7 @@ \indexlibrarymember{operator-}{counted_iterator}% \begin{itemdecl} -template I2> +template I2> friend constexpr iter_difference_t operator-( const counted_iterator& x, const counted_iterator& y); \end{itemdecl} @@ -5469,7 +5469,7 @@ \indexlibrarymember{operator==}{counted_iterator}% \begin{itemdecl} -template I2> +template I2> friend constexpr bool operator==( const counted_iterator& x, const counted_iterator& y); \end{itemdecl} @@ -5497,7 +5497,7 @@ \indexlibrarymember{operator<=>}{counted_iterator}% \begin{itemdecl} -template I2> +template I2> friend constexpr strong_ordering operator<=>( const counted_iterator& x, const counted_iterator& y); \end{itemdecl} From ded579bad6725c98b37f5f96d7769c0ddaef4b72 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:02:42 -0700 Subject: [PATCH 09/84] [everywhere] Rename concept 'Integral' to 'integral'. --- source/concepts.tex | 10 +++++----- source/iterators.tex | 4 ++-- source/overloading.tex | 6 +++--- source/ranges.tex | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 0e54eed638..90c6877192 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -169,7 +169,7 @@ // \ref{concepts.arithmetic}, arithmetic concepts template - concept Integral = @\seebelow@; + concept integral = @\seebelow@; template concept SignedIntegral = @\seebelow@; template @@ -468,16 +468,16 @@ \rSec2[concepts.arithmetic]{Arithmetic concepts} -\indexlibrary{\idxcode{Integral}}% +\indexlibrary{\idxcode{integral}}% \indexlibrary{\idxcode{SignedIntegral}}% \indexlibrary{\idxcode{UnsignedIntegral}}% \begin{itemdecl} template - concept Integral = is_integral_v; + concept integral = is_integral_v; template - concept SignedIntegral = Integral && is_signed_v; + concept SignedIntegral = integral && is_signed_v; template - concept UnsignedIntegral = Integral && !SignedIntegral; + concept UnsignedIntegral = integral && !SignedIntegral; template concept FloatingPoint = is_floating_point_v; \end{itemdecl} diff --git a/source/iterators.tex b/source/iterators.tex index 31a9cf5b4b..dfeb9225a0 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -698,7 +698,7 @@ template requires (!requires { typename T::difference_type; } && - requires(const T& a, const T& b) { { a - b } -> Integral; }) + requires(const T& a, const T& b) { { a - b } -> integral; }) struct incrementable_traits { using difference_type = make_signed_t() - declval())>; }; @@ -1387,7 +1387,7 @@ \pnum A type \tcode{I} is \defn{integer-like} -if it models \tcode{Integral} or if it is an integer-class type. +if it models \tcode{integral} or if it is an integer-class type. A type \tcode{I} is \defn{signed-integer-like} if it models \tcode{SignedIntegral} or if it is a signed-integer-class type. A type \tcode{I} is \defn{unsigned-integer-like} diff --git a/source/overloading.tex b/source/overloading.tex index b572b551c5..f8a1c78a31 100644 --- a/source/overloading.tex +++ b/source/overloading.tex @@ -1749,7 +1749,7 @@ C(T, U) -> C>; // \#2 template using A = C; -template using B = A; +template using B = A; int i{}; double d{}; @@ -1791,11 +1791,11 @@ template concept deduces_B = requires { sizeof(BB); }; // The guides for \tcode{B} derived from the above \tcode{f1'} and \tcode{f2'} for \tcode{A} are as follows: -template +template requires deduces_A> && deduces_B> auto f1_prime_for_B(W *, W *) -> C; -template +template requires deduces_A>> && deduces_B>> auto f2_prime_for_B(W *, U) -> C>; diff --git a/source/ranges.tex b/source/ranges.tex index 88a2122fe5..88aeb40dc4 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1993,7 +1993,7 @@ \pnum \remarks The expression in the \grammarterm{requires-clause} is equivalent to \begin{codeblock} -(same_as && Advanceable) || (Integral && Integral) || +(same_as && Advanceable) || (integral && integral) || SizedSentinel \end{codeblock} \end{itemdescr} From 7f5f88d1d6b6202ca677608fe7d3bc40fb9e78ff Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:03:09 -0700 Subject: [PATCH 10/84] [everywhere] Rename concept 'SignedIntegral' to 'signed_integral'. --- source/concepts.tex | 10 +++++----- source/iterators.tex | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 90c6877192..1ebe3846af 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -171,7 +171,7 @@ template concept integral = @\seebelow@; template - concept SignedIntegral = @\seebelow@; + concept signed_integral = @\seebelow@; template concept UnsignedIntegral = @\seebelow@; template @@ -469,15 +469,15 @@ \rSec2[concepts.arithmetic]{Arithmetic concepts} \indexlibrary{\idxcode{integral}}% -\indexlibrary{\idxcode{SignedIntegral}}% +\indexlibrary{\idxcode{signed_integral}}% \indexlibrary{\idxcode{UnsignedIntegral}}% \begin{itemdecl} template concept integral = is_integral_v; template - concept SignedIntegral = integral && is_signed_v; + concept signed_integral = integral && is_signed_v; template - concept UnsignedIntegral = integral && !SignedIntegral; + concept UnsignedIntegral = integral && !signed_integral; template concept FloatingPoint = is_floating_point_v; \end{itemdecl} @@ -485,7 +485,7 @@ \begin{itemdescr} \pnum \begin{note} -\libconcept{SignedIntegral} can be modeled even by types that are +\libconcept{signed_integral} can be modeled even by types that are not signed integral types\iref{basic.fundamental}; for example, \tcode{char}. \end{note} diff --git a/source/iterators.tex b/source/iterators.tex index dfeb9225a0..7e1ea2ece7 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -870,7 +870,7 @@ typename readable_traits::value_type&>; typename common_reference_t::value_type&>; - requires SignedIntegral::difference_type>; + requires signed_integral::difference_type>; }; template @@ -1389,7 +1389,7 @@ A type \tcode{I} is \defn{integer-like} if it models \tcode{integral} or if it is an integer-class type. A type \tcode{I} is \defn{signed-integer-like} -if it models \tcode{SignedIntegral} or if it is a signed-integer-class type. +if it models \tcode{signed_integral} or if it is a signed-integer-class type. A type \tcode{I} is \defn{unsigned-integer-like} if it models \tcode{UnsignedIntegral} or if it is an unsigned-integer-class type. From 068f2785ce494a4bffaf661b105e9d4b64f7cdef Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:03:33 -0700 Subject: [PATCH 11/84] [everywhere] Rename concept 'UnsignedIntegral' to 'unsigned_integral'. --- source/concepts.tex | 8 ++++---- source/iterators.tex | 2 +- source/numerics.tex | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 1ebe3846af..b1ffc230f5 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -173,7 +173,7 @@ template concept signed_integral = @\seebelow@; template - concept UnsignedIntegral = @\seebelow@; + concept unsigned_integral = @\seebelow@; template concept FloatingPoint = @\seebelow@; @@ -470,14 +470,14 @@ \indexlibrary{\idxcode{integral}}% \indexlibrary{\idxcode{signed_integral}}% -\indexlibrary{\idxcode{UnsignedIntegral}}% +\indexlibrary{\idxcode{unsigned_integral}}% \begin{itemdecl} template concept integral = is_integral_v; template concept signed_integral = integral && is_signed_v; template - concept UnsignedIntegral = integral && !signed_integral; + concept unsigned_integral = integral && !signed_integral; template concept FloatingPoint = is_floating_point_v; \end{itemdecl} @@ -491,7 +491,7 @@ \pnum \begin{note} -\libconcept{UnsignedIntegral} can be modeled even by types that are +\libconcept{unsigned_integral} can be modeled even by types that are not unsigned integral types\iref{basic.fundamental}; for example, \tcode{bool}. \end{note} \end{itemdescr} diff --git a/source/iterators.tex b/source/iterators.tex index 7e1ea2ece7..68c3596cf4 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -1391,7 +1391,7 @@ A type \tcode{I} is \defn{signed-integer-like} if it models \tcode{signed_integral} or if it is a signed-integer-class type. A type \tcode{I} is \defn{unsigned-integer-like} -if it models \tcode{UnsignedIntegral} or +if it models \tcode{unsigned_integral} or if it is an unsigned-integer-class type. \pnum diff --git a/source/numerics.tex b/source/numerics.tex index 629261092d..f53abf9bed 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -2154,7 +2154,7 @@ \begin{codeblock} template concept UniformRandomBitGenerator = - Invocable && UnsignedIntegral> && + Invocable && unsigned_integral> && requires { { G::min() } -> same_as>; { G::max() } -> same_as>; From c7d322819ebbea3a141ef55157599c763b2198bf Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:05:23 -0700 Subject: [PATCH 12/84] [everywhere] Rename concept 'Assignable' to 'assignable_from'. --- source/concepts.tex | 18 +++++++++--------- source/iterators.tex | 18 +++++++++--------- source/ranges.tex | 4 ++-- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index b1ffc230f5..e779e0be2b 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -177,9 +177,9 @@ template concept FloatingPoint = @\seebelow@; - // \ref{concept.assignable}, concept \libconcept{Assignable} + // \ref{concept.assignable}, concept \libconcept{assignable_from} template - concept Assignable = @\seebelow@; + concept assignable_from = @\seebelow@; // \ref{concept.swappable}, concept \libconcept{Swappable} namespace ranges { @@ -496,12 +496,12 @@ \end{note} \end{itemdescr} -\rSec2[concept.assignable]{Concept \libconcept{Assignable}} +\rSec2[concept.assignable]{Concept \libconcept{assignable_from}} -\indexlibrary{\idxcode{Assignable}}% +\indexlibrary{\idxcode{assignable_from}}% \begin{itemdecl} template - concept Assignable = + concept assignable_from = is_lvalue_reference_v && common_reference_with&, const remove_reference_t&> && requires(LHS lhs, RHS&& rhs) { @@ -520,7 +520,7 @@ \item \tcode{rcopy} be a distinct object that is equal to \tcode{rhs}. \end{itemize} \tcode{LHS} and \tcode{RHS} model -\tcode{\libconcept{Assignable}} only if +\tcode{\libconcept{assignable_from}} only if \begin{itemize} \item \tcode{addressof(lhs = rhs) == addressof(lcopy)}. @@ -610,7 +610,7 @@ \item Otherwise, if \tcode{E1} and \tcode{E2} are lvalues of the same type \tcode{T} that models \tcode{\libconcept{MoveConstructible}} and - \tcode{\libconcept{Assignable}}, + \tcode{\libconcept{assignable_from}}, \tcode{S} is an expression that exchanges the denoted values. \tcode{S} is a constant expression if \begin{itemize} @@ -1044,9 +1044,9 @@ \indexlibrary{\idxcode{Regular}}% \begin{itemdecl} template - concept Movable = is_object_v && MoveConstructible && Assignable && Swappable; + concept Movable = is_object_v && MoveConstructible && assignable_from && Swappable; template - concept Copyable = CopyConstructible && Movable && Assignable; + concept Copyable = CopyConstructible && Movable && assignable_from; template concept Semiregular = Copyable && DefaultConstructible; template diff --git a/source/iterators.tex b/source/iterators.tex index 68c3596cf4..d1219de958 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -2455,7 +2455,7 @@ Writable> && Movable> && Constructible, iter_rvalue_reference_t> && - Assignable&, iter_rvalue_reference_t>; + assignable_from&, iter_rvalue_reference_t>; \end{codeblock} \pnum @@ -2500,7 +2500,7 @@ Writable&> && Copyable> && Constructible, iter_reference_t> && - Assignable&, iter_reference_t>; + assignable_from&, iter_reference_t>; \end{codeblock} \pnum @@ -2873,7 +2873,7 @@ \pnum \effects \begin{itemize} -\item If \tcode{I} and \tcode{S} model \tcode{\libconcept{Assignable}}, +\item If \tcode{I} and \tcode{S} model \tcode{\libconcept{assignable_from}}, equivalent to \tcode{i = std::move(bound)}. \item Otherwise, if \tcode{S} and \tcode{I} model \tcode{\libconcept{SizedSentinel}}, equivalent to \tcode{ranges::advance(i, bound - i)}. @@ -4559,7 +4559,7 @@ requires convertible_to constexpr move_sentinel(const move_sentinel& s); template - requires Assignable + requires assignable_from constexpr move_sentinel& operator=(const move_sentinel& s); constexpr S base() const; @@ -4609,7 +4609,7 @@ \indexlibrary{\idxcode{move_sentinel}!\idxcode{operator=}}% \begin{itemdecl} template - requires Assignable + requires assignable_from constexpr move_sentinel& operator=(const move_sentinel& s); \end{itemdecl} @@ -4665,7 +4665,7 @@ template requires convertible_to && convertible_to && - Assignable && Assignable + assignable_from && assignable_from common_iterator& operator=(const common_iterator& x); decltype(auto) operator*(); @@ -4790,7 +4790,7 @@ \begin{itemdecl} template requires convertible_to && convertible_to && - Assignable && Assignable + assignable_from && assignable_from common_iterator& operator=(const common_iterator& x); \end{itemdecl} @@ -5083,7 +5083,7 @@ constexpr counted_iterator(const counted_iterator& x); template - requires Assignable + requires assignable_from constexpr counted_iterator& operator=(const counted_iterator& x); constexpr I base() const & requires CopyConstructible; @@ -5193,7 +5193,7 @@ \indexlibrarymember{operator=}{counted_iterator}% \begin{itemdecl} template - requires Assignable + requires assignable_from constexpr counted_iterator& operator=(const counted_iterator& x); \end{itemdecl} diff --git a/source/ranges.tex b/source/ranges.tex index 88aeb40dc4..f8e16cf6b7 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -2517,7 +2517,7 @@ { } \end{codeblock} -\item If \tcode{\libconcept{Assignable}} is not +\item If \tcode{\libconcept{assignable_from}} is not modeled, the copy assignment operator is equivalent to: \begin{codeblock} @\placeholder{semiregular-box}@& operator=(const @\placeholder{semiregular-box}@& that) @@ -2529,7 +2529,7 @@ } \end{codeblock} -\item If \tcode{\libconcept{Assignable}} is not modeled, +\item If \tcode{\libconcept{assignable_from}} is not modeled, the move assignment operator is equivalent to: \begin{codeblock} @\placeholder{semiregular-box}@& operator=(@\placeholder{semiregular-box}@&& that) From e5c9974546071e55a17d6cbcacbcf39ef5412011 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:08:48 -0700 Subject: [PATCH 13/84] [everywhere] Rename concept 'Swappable' to 'swappable'. --- source/concepts.tex | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index e779e0be2b..0ec02ca1d0 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -181,14 +181,14 @@ template concept assignable_from = @\seebelow@; - // \ref{concept.swappable}, concept \libconcept{Swappable} + // \ref{concept.swappable}, concept \libconcept{swappable} namespace ranges { inline namespace @\unspec@ { inline constexpr @\unspec@ swap = @\unspec@; } } template - concept Swappable = @\seebelow@; + concept swappable = @\seebelow@; template concept SwappableWith = @\seebelow@; @@ -548,7 +548,7 @@ \end{note} \end{itemdescr} -\rSec2[concept.swappable]{Concept \libconcept{Swappable}} +\rSec2[concept.swappable]{Concept \libconcept{swappable}} \pnum Let \tcode{t1} and \tcode{t2} be equality-preserving expressions that denote @@ -643,10 +643,10 @@ \tcode{E1} and \tcode{E2} and has type \tcode{void}. \end{note} -\indexlibrary{\idxcode{Swappable}}% +\indexlibrary{\idxcode{swappable}}% \begin{itemdecl} template - concept Swappable = requires(T& a, T& b) { ranges::swap(a, b); }; + concept swappable = requires(T& a, T& b) { ranges::swap(a, b); }; \end{itemdecl} \indexlibrary{\idxcode{SwappableWith}}% @@ -664,7 +664,7 @@ \pnum \begin{note} -The semantics of the \libconcept{Swappable} and \libconcept{SwappableWith} +The semantics of the \libconcept{swappable} and \libconcept{SwappableWith} concepts are fully defined by the \tcode{ranges::swap} customization point. \end{note} @@ -684,7 +684,7 @@ ranges::swap(std::forward(t), std::forward(u)); } -template +template void lv_swap(T& t1, T& t2) { ranges::swap(t1, t2); } @@ -1044,7 +1044,7 @@ \indexlibrary{\idxcode{Regular}}% \begin{itemdecl} template - concept Movable = is_object_v && MoveConstructible && assignable_from && Swappable; + concept Movable = is_object_v && MoveConstructible && assignable_from && swappable; template concept Copyable = CopyConstructible && Movable && assignable_from; template From 591d12f9129131ff303983b381f2b4fa9b3edd83 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:09:09 -0700 Subject: [PATCH 14/84] [everywhere] Rename concept 'SwappableWith' to 'swappable_with'. --- source/concepts.tex | 10 +++++----- source/iterators.tex | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 0ec02ca1d0..6533ed18dc 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -190,7 +190,7 @@ template concept swappable = @\seebelow@; template - concept SwappableWith = @\seebelow@; + concept swappable_with = @\seebelow@; // \ref{concept.destructible}, concept \libconcept{Destructible} template @@ -649,10 +649,10 @@ concept swappable = requires(T& a, T& b) { ranges::swap(a, b); }; \end{itemdecl} -\indexlibrary{\idxcode{SwappableWith}}% +\indexlibrary{\idxcode{swappable_with}}% \begin{itemdecl} template - concept SwappableWith = + concept swappable_with = common_reference_with&, const remove_reference_t&> && requires(T&& t, U&& u) { ranges::swap(std::forward(t), std::forward(t)); @@ -664,7 +664,7 @@ \pnum \begin{note} -The semantics of the \libconcept{swappable} and \libconcept{SwappableWith} +The semantics of the \libconcept{swappable} and \libconcept{swappable_with} concepts are fully defined by the \tcode{ranges::swap} customization point. \end{note} @@ -679,7 +679,7 @@ namespace ranges = std::ranges; -template U> +template U> void value_swap(T&& t, U&& u) { ranges::swap(std::forward(t), std::forward(u)); } diff --git a/source/iterators.tex b/source/iterators.tex index d1219de958..02f3222598 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -1121,7 +1121,7 @@ \item Otherwise, if the types of \tcode{E1} and \tcode{E2} each model \tcode{Readable}, and if the reference types of \tcode{E1} and \tcode{E2} -model \libconcept{SwappableWith}\iref{concept.swappable}, +model \libconcept{swappable_with}\iref{concept.swappable}, then \tcode{ranges::swap(*E1, *E2)}. \item Otherwise, if the types \tcode{T1} and \tcode{T2} of \tcode{E1} and From 638950acff7b751804b36f19ffbdf792c1258d7a Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:10:24 -0700 Subject: [PATCH 15/84] [everywhere] Rename concept 'Destructible' to 'destructible'. --- source/concepts.tex | 14 +++++++------- source/lib-intro.tex | 2 +- source/threads.tex | 4 ++-- source/utilities.tex | 16 ++++++++-------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 6533ed18dc..80b42249d8 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -192,9 +192,9 @@ template concept swappable_with = @\seebelow@; - // \ref{concept.destructible}, concept \libconcept{Destructible} + // \ref{concept.destructible}, concept \libconcept{destructible} template - concept Destructible = @\seebelow@; + concept destructible = @\seebelow@; // \ref{concept.constructible}, concept \libconcept{Constructible} template @@ -712,17 +712,17 @@ \end{codeblock} \end{example} -\rSec2[concept.destructible]{Concept \libconcept{Destructible}} +\rSec2[concept.destructible]{Concept \libconcept{destructible}} \pnum -The \libconcept{Destructible} concept specifies properties of all types, +The \libconcept{destructible} concept specifies properties of all types, instances of which can be destroyed at the end of their lifetime, or reference types. -\indexlibrary{\idxcode{Destructible}}% +\indexlibrary{\idxcode{destructible}}% \begin{itemdecl} template - concept Destructible = is_nothrow_destructible_v; + concept destructible = is_nothrow_destructible_v; \end{itemdecl} \begin{itemdescr} @@ -743,7 +743,7 @@ \indexlibrary{\idxcode{Constructible}}% \begin{itemdecl} template - concept Constructible = Destructible && is_constructible_v; + concept Constructible = destructible && is_constructible_v; \end{itemdecl} \rSec2[concept.defaultconstructible]{Concept \libconcept{DefaultConstructible}} diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 646f410ead..7ce437cb75 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -512,7 +512,7 @@ requirement. Names in \tcode{constant width} type refer to library concepts which are presented as a concept definition\iref{temp}, possibly with additional prose semantic requirements. For example, -\libconcept{Destructible}\iref{concept.destructible} +\libconcept{destructible}\iref{concept.destructible} is such a named requirement. \pnum diff --git a/source/threads.tex b/source/threads.tex index 169e9c7570..9327513fce 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -853,14 +853,14 @@ \tcode{stop_callback} is instantiated with an argument for the template parameter \tcode{Callback} that satisfies both \tcode{Invocable} -and \tcode{Destructible}. +and \tcode{destructible}. \pnum \expects \tcode{stop_callback} is instantiated with an argument for the template parameter \tcode{Callback} that models both \tcode{Invocable} -and \tcode{Destructible}. +and \tcode{destructible}. \rSec3[stopcallback.cons]{Constructors and destructor} diff --git a/source/utilities.tex b/source/utilities.tex index 087c93de15..abdce468cd 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -6632,18 +6632,18 @@ ForwardIterator first, Size n); namespace ranges { - template + template constexpr void destroy_at(T* location) noexcept; template<@\placeholdernc{no-throw-input-iterator}@ I, @\placeholdernc{no-throw-sentinel}@ S> - requires Destructible> + requires destructible> constexpr I destroy(I first, S last) noexcept; template<@\placeholdernc{no-throw-input-range}@ R> - requires Destructible> + requires destructible> constexpr safe_iterator_t destroy(R&& r) noexcept; template<@\placeholdernc{no-throw-input-iterator}@ I> - requires Destructible> + requires destructible> constexpr I destroy_n(I first, iter_difference_t n) noexcept; } @@ -8509,7 +8509,7 @@ template constexpr void destroy_at(T* location); namespace ranges { - template + template constexpr void destroy_at(T* location) noexcept; } \end{itemdecl} @@ -8545,10 +8545,10 @@ \begin{itemdecl} namespace ranges { template<@\placeholdernc{no-throw-input-iterator}@ I, @\placeholdernc{no-throw-sentinel}@ S> - requires Destructible> + requires destructible> constexpr I destroy(I first, S last) noexcept; template<@\placeholdernc{no-throw-input-range}@ R> - requires Destructible> + requires destructible> constexpr safe_iterator_t destroy(R&& r) noexcept; } \end{itemdecl} @@ -8584,7 +8584,7 @@ \begin{itemdecl} namespace ranges { template<@\placeholdernc{no-throw-input-iterator}@ I> - requires Destructible> + requires destructible> constexpr I destroy_n(I first, iter_difference_t n) noexcept; } \end{itemdecl} From 44475851c2e4a75936d058b26f6958216f996ad9 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:14:46 -0700 Subject: [PATCH 16/84] [everywhere] Rename concept 'Constructible' to 'constructible_from'. --- source/concepts.tex | 22 +++++++++++----------- source/iterators.tex | 8 ++++---- source/ranges.tex | 44 ++++++++++++++++++++++---------------------- source/threads.tex | 4 ++-- source/utilities.tex | 36 ++++++++++++++++++------------------ 5 files changed, 57 insertions(+), 57 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 80b42249d8..b781203b69 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -196,9 +196,9 @@ template concept destructible = @\seebelow@; - // \ref{concept.constructible}, concept \libconcept{Constructible} + // \ref{concept.constructible}, concept \libconcept{constructible_from} template - concept Constructible = @\seebelow@; + concept constructible_from = @\seebelow@; // \ref{concept.defaultconstructible}, concept \libconcept{DefaultConstructible} template @@ -734,16 +734,16 @@ \end{note} \end{itemdescr} -\rSec2[concept.constructible]{Concept \libconcept{Constructible}} +\rSec2[concept.constructible]{Concept \libconcept{constructible_from}} \pnum -The \libconcept{Constructible} concept constrains the initialization of a +The \libconcept{constructible_from} concept constrains the initialization of a variable of a given type with a particular set of argument types. -\indexlibrary{\idxcode{Constructible}}% +\indexlibrary{\idxcode{constructible_from}}% \begin{itemdecl} template - concept Constructible = destructible && is_constructible_v; + concept constructible_from = destructible && is_constructible_v; \end{itemdecl} \rSec2[concept.defaultconstructible]{Concept \libconcept{DefaultConstructible}} @@ -751,7 +751,7 @@ \indexlibrary{\idxcode{DefaultConstructible}}% \begin{itemdecl} template - concept DefaultConstructible = Constructible; + concept DefaultConstructible = constructible_from; \end{itemdecl} \rSec2[concept.moveconstructible]{Concept \libconcept{MoveConstructible}} @@ -759,7 +759,7 @@ \indexlibrary{\idxcode{MoveConstructible}}% \begin{itemdecl} template - concept MoveConstructible = Constructible && convertible_to; + concept MoveConstructible = constructible_from && convertible_to; \end{itemdecl} \begin{itemdescr} @@ -785,9 +785,9 @@ template concept CopyConstructible = MoveConstructible && - Constructible && convertible_to && - Constructible && convertible_to && - Constructible && convertible_to; + constructible_from && convertible_to && + constructible_from && convertible_to && + constructible_from && convertible_to; \end{itemdecl} \begin{itemdescr} diff --git a/source/iterators.tex b/source/iterators.tex index 02f3222598..ce5ae7d223 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -875,7 +875,7 @@ template concept @\placeholder{cpp17-forward-iterator}@ = - @\placeholder{cpp17-input-iterator}@ && Constructible && + @\placeholder{cpp17-input-iterator}@ && constructible_from && is_lvalue_reference_v> && same_as>, typename readable_traits::value_type> && requires(I i) { @@ -2454,7 +2454,7 @@ IndirectlyMovable && Writable> && Movable> && - Constructible, iter_rvalue_reference_t> && + constructible_from, iter_rvalue_reference_t> && assignable_from&, iter_rvalue_reference_t>; \end{codeblock} @@ -2499,7 +2499,7 @@ IndirectlyCopyable && Writable&> && Copyable> && - Constructible, iter_reference_t> && + constructible_from, iter_reference_t> && assignable_from&, iter_reference_t>; \end{codeblock} @@ -4843,7 +4843,7 @@ Readable && (requires(const I& i) { i.operator->(); } || is_reference_v> || - Constructible, iter_reference_t>) + constructible_from, iter_reference_t>) \end{codeblock} \pnum diff --git a/source/ranges.tex b/source/ranges.tex index f8e16cf6b7..376e74e823 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1229,7 +1229,7 @@ template concept @\placeholdernc{pair-like-convertible-from}@ = // \expos - !Range && @\placeholdernc{pair-like}@ && Constructible; + !Range && @\placeholdernc{pair-like}@ && constructible_from; template concept @\placeholdernc{iterator-sentinel-pair}@ = // \expos @@ -1650,7 +1650,7 @@ constexpr explicit single_view(const T& t); constexpr explicit single_view(T&& t); template - requires Constructible + requires constructible_from constexpr single_view(in_place_t, Args&&... args); constexpr T* begin() noexcept; @@ -2671,7 +2671,7 @@ filter_view() = default; constexpr filter_view(V base, Pred pred); template - requires ViewableRange && Constructible> + requires ViewableRange && constructible_from> constexpr filter_view(R&& r, Pred pred); constexpr V base() const; @@ -2704,7 +2704,7 @@ \indexlibrary{\idxcode{filter_view}!\idxcode{filter_view}}% \begin{itemdecl} template - requires ViewableRange && Constructible> + requires ViewableRange && constructible_from> constexpr filter_view(R&& r, Pred pred); \end{itemdecl} @@ -3066,7 +3066,7 @@ transform_view() = default; constexpr transform_view(V base, F fun); template - requires ViewableRange && Constructible> + requires ViewableRange && constructible_from> constexpr transform_view(R&& r, F fun); constexpr V base() const; @@ -3109,7 +3109,7 @@ \indexlibrary{\idxcode{transform_view}!\idxcode{transform_view}}% \begin{itemdecl} template - requires ViewableRange && Constructible> + requires ViewableRange && constructible_from> constexpr transform_view(R&& r, F fun); \end{itemdecl} @@ -3710,7 +3710,7 @@ take_view() = default; constexpr take_view(V base, range_difference_t count); template - requires Constructible> + requires constructible_from> constexpr take_view(R&& r, range_difference_t count); constexpr V base() const; @@ -3786,7 +3786,7 @@ \indexlibrary{\idxcode{take_view}!\idxcode{take_view}}% \begin{itemdecl} template - requires Constructible> + requires constructible_from> constexpr take_view(R&& r, range_difference_t count); \end{itemdecl} @@ -4336,7 +4336,7 @@ constexpr explicit join_view(V base); template - requires ViewableRange && Constructible> + requires ViewableRange && constructible_from> constexpr explicit join_view(R&& r); constexpr auto begin() { @@ -4390,7 +4390,7 @@ \indexlibrary{\idxcode{join_view}!\idxcode{join_view}}% \begin{itemdecl} template - requires ViewableRange && Constructible> + requires ViewableRange && constructible_from> constexpr explicit join_view(R&& r); \end{itemdecl} @@ -4809,13 +4809,13 @@ constexpr split_view(V base, Pattern pattern); template - requires Constructible> && - Constructible> + requires constructible_from> && + constructible_from> constexpr split_view(R&& r, P&& p); template - requires Constructible> && - Constructible>> + requires constructible_from> && + constructible_from>> constexpr split_view(R&& r, range_value_t e); constexpr auto begin() { @@ -4866,8 +4866,8 @@ \indexlibrary{\idxcode{split_view}!\idxcode{split_view}}% \begin{itemdecl} template - requires Constructible> && - Constructible> + requires constructible_from> && + constructible_from> constexpr split_view(R&& r, P&& p); \end{itemdecl} @@ -4881,8 +4881,8 @@ \indexlibrary{\idxcode{split_view}!\idxcode{split_view}}% \begin{itemdecl} template - requires Constructible> && - Constructible>> + requires constructible_from> && + constructible_from>> constexpr split_view(R&& r, range_value_t e); \end{itemdecl} @@ -5313,7 +5313,7 @@ constexpr explicit common_view(V r); template - requires (!CommonRange && Constructible>) + requires (!CommonRange && constructible_from>) constexpr explicit common_view(R&& r); constexpr V base() const; @@ -5372,7 +5372,7 @@ \indexlibrary{\idxcode{common_view}!\idxcode{common_view}}% \begin{itemdecl} template - requires (!CommonRange && Constructible>) + requires (!CommonRange && constructible_from>) constexpr explicit common_view(R&& r); \end{itemdecl} @@ -5441,7 +5441,7 @@ constexpr explicit reverse_view(V r); template - requires BidirectionalRange && Constructible> + requires BidirectionalRange && constructible_from> constexpr explicit reverse_view(R&& r); constexpr V base() const; @@ -5481,7 +5481,7 @@ \indexlibrary{\idxcode{reverse_view}!\idxcode{reverse_view}}% \begin{itemdecl} template - requires BidirectionalRange && Constructible> + requires BidirectionalRange && constructible_from> constexpr explicit reverse_view(R&& r); \end{itemdecl} diff --git a/source/threads.tex b/source/threads.tex index 9327513fce..4418343834 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -877,11 +877,11 @@ \begin{itemdescr} \pnum \constraints -\tcode{Callback} and \tcode{C} satisfy \libconcept{Constructible}. +\tcode{Callback} and \tcode{C} satisfy \libconcept{constructible_from}. \pnum \expects -\tcode{Callback} and \tcode{C} model \libconcept{Constructible}. +\tcode{Callback} and \tcode{C} model \libconcept{constructible_from}. \pnum \effects diff --git a/source/utilities.tex b/source/utilities.tex index abdce468cd..252ee8ee1e 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -6531,18 +6531,18 @@ using uninitialized_copy_result = copy_result; template S1, @\placeholdernc{no-throw-forward-iterator}@ O, @\placeholdernc{no-throw-sentinel}@ S2> - requires Constructible, iter_reference_t> + requires constructible_from, iter_reference_t> uninitialized_copy_result uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); template - requires Constructible, range_reference_t> + requires constructible_from, range_reference_t> uninitialized_copy_result, safe_iterator_t> uninitialized_copy(IR&& input_range, OR&& output_range); template using uninitialized_copy_n_result = uninitialized_copy_result; template S> - requires Constructible, iter_reference_t> + requires constructible_from, iter_reference_t> uninitialized_copy_n_result uninitialized_copy_n(I ifirst, iter_difference_t n, O ofirst, S olast); } @@ -6567,11 +6567,11 @@ using uninitialized_move_result = uninitialized_copy_result; template S1, @\placeholdernc{no-throw-forward-iterator}@ O, @\placeholdernc{no-throw-sentinel}@ S2> - requires Constructible, iter_rvalue_reference_t> + requires constructible_from, iter_rvalue_reference_t> uninitialized_move_result uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); template - requires Constructible, range_rvalue_reference_t> + requires constructible_from, range_rvalue_reference_t> uninitialized_move_result, safe_iterator_t> uninitialized_move(IR&& input_range, OR&& output_range); @@ -6579,7 +6579,7 @@ using uninitialized_move_n_result = uninitialized_copy_result; template S> - requires Constructible, iter_rvalue_reference_t> + requires constructible_from, iter_rvalue_reference_t> uninitialized_move_n_result uninitialized_move_n(I ifirst, iter_difference_t n, O ofirst, S olast); } @@ -6597,14 +6597,14 @@ namespace ranges { template<@\placeholdernc{no-throw-forward-iterator}@ I, @\placeholdernc{no-throw-sentinel}@ S, class T> - requires Constructible, const T&> + requires constructible_from, const T&> I uninitialized_fill(I first, S last, const T& x); template<@\placeholdernc{no-throw-forward-range}@ R, class T> - requires Constructible, const T&> + requires constructible_from, const T&> safe_iterator_t uninitialized_fill(R&& r, const T& x); template<@\placeholdernc{no-throw-forward-iterator}@ I, class T> - requires Constructible, const T&> + requires constructible_from, const T&> I uninitialized_fill_n(I first, iter_difference_t n, const T& x); } @@ -8207,11 +8207,11 @@ namespace ranges { template S1, @\placeholdernc{no-throw-forward-iterator}@ O, @\placeholdernc{no-throw-sentinel}@ S2> - requires Constructible, iter_reference_t> + requires constructible_from, iter_reference_t> uninitialized_copy_result uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); template - requires Constructible, range_reference_t> + requires constructible_from, range_reference_t> uninitialized_copy_result, safe_iterator_t> uninitialized_copy(IR&& input_range, OR&& output_range); } @@ -8261,7 +8261,7 @@ \begin{itemdecl} namespace ranges { template S> - requires Constructible, iter_reference_t> + requires constructible_from, iter_reference_t> uninitialized_copy_n_result uninitialized_copy_n(I ifirst, iter_difference_t n, O ofirst, S olast); } @@ -8312,11 +8312,11 @@ namespace ranges { template S1, @\placeholdernc{no-throw-forward-iterator}@ O, @\placeholdernc{no-throw-sentinel}@ S2> - requires Constructible, iter_rvalue_reference_t> + requires constructible_from, iter_rvalue_reference_t> uninitialized_move_result uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); template - requires Constructible, range_rvalue_reference_t> + requires constructible_from, range_rvalue_reference_t> uninitialized_move_result, safe_iterator_t> uninitialized_move(IR&& input_range, OR&& output_range); } @@ -8371,7 +8371,7 @@ \begin{itemdecl} namespace ranges { template S> - requires Constructible, iter_rvalue_reference_t> + requires constructible_from, iter_rvalue_reference_t> uninitialized_move_n_result uninitialized_move_n(I ifirst, iter_difference_t n, O ofirst, S olast); } @@ -8422,10 +8422,10 @@ \begin{itemdecl} namespace ranges { template<@\placeholdernc{no-throw-forward-iterator}@ I, @\placeholdernc{no-throw-sentinel}@ S, class T> - requires Constructible, const T&> + requires constructible_from, const T&> I uninitialized_fill(I first, S last, const T& x); template<@\placeholdernc{no-throw-forward-range}@ R, class T> - requires Constructible, const T&> + requires constructible_from, const T&> safe_iterator_t uninitialized_fill(R&& r, const T& x); } \end{itemdecl} @@ -8462,7 +8462,7 @@ \begin{itemdecl} namespace ranges { template<@\placeholdernc{no-throw-forward-iterator}@ I, class T> - requires Constructible, const T&> + requires constructible_from, const T&> I uninitialized_fill_n(I first, iter_difference_t n, const T& x); } \end{itemdecl} From 02c8088f8f11ff2faa71fadaecafbbbc5ad1a04e Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:19:15 -0700 Subject: [PATCH 17/84] [everywhere] Rename concept 'DefaultConstructible' to 'default_constructible'. --- source/concepts.tex | 12 ++++++------ source/iterators.tex | 2 +- source/ranges.tex | 4 ++-- source/utilities.tex | 24 ++++++++++++------------ 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index b781203b69..a8b1b604b8 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -200,9 +200,9 @@ template concept constructible_from = @\seebelow@; - // \ref{concept.defaultconstructible}, concept \libconcept{DefaultConstructible} + // \ref{concept.defaultconstructible}, concept \libconcept{default_constructible} template - concept DefaultConstructible = @\seebelow@; + concept default_constructible = @\seebelow@; // \ref{concept.moveconstructible}, concept \libconcept{MoveConstructible} template @@ -746,12 +746,12 @@ concept constructible_from = destructible && is_constructible_v; \end{itemdecl} -\rSec2[concept.defaultconstructible]{Concept \libconcept{DefaultConstructible}} +\rSec2[concept.defaultconstructible]{Concept \libconcept{default_constructible}} -\indexlibrary{\idxcode{DefaultConstructible}}% +\indexlibrary{\idxcode{default_constructible}}% \begin{itemdecl} template - concept DefaultConstructible = constructible_from; + concept default_constructible = constructible_from; \end{itemdecl} \rSec2[concept.moveconstructible]{Concept \libconcept{MoveConstructible}} @@ -1048,7 +1048,7 @@ template concept Copyable = CopyConstructible && Movable && assignable_from; template - concept Semiregular = Copyable && DefaultConstructible; + concept Semiregular = Copyable && default_constructible; template concept Regular = Semiregular && EqualityComparable; \end{itemdecl} diff --git a/source/iterators.tex b/source/iterators.tex index ce5ae7d223..3602e21ef8 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -1288,7 +1288,7 @@ template concept WeaklyIncrementable = - DefaultConstructible && Movable && + default_constructible && Movable && requires(I i) { typename iter_difference_t; requires @\placeholdernc{is-signed-integer-like}@>; diff --git a/source/ranges.tex b/source/ranges.tex index 376e74e823..294e576263 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -2509,7 +2509,7 @@ its type parameter \tcode{T} with \tcode{\libconcept{CopyConstructible} \&\& is_object_v}. -\item If \tcode{T} models \libconcept{DefaultConstructible}, the default +\item If \tcode{T} models \libconcept{default_constructible}, the default constructor of \tcode{\placeholder{semiregular-box}} is equivalent to: \begin{codeblock} constexpr @\placeholder{semiregular-box}@() noexcept(is_nothrow_default_constructible_v) @@ -5608,7 +5608,7 @@ }; template - requires DefaultConstructible && + requires default_constructible && @\placeholder{stream-extractable}@ class basic_istream_view : public view_interface> { public: diff --git a/source/utilities.tex b/source/utilities.tex index 252ee8ee1e..6489e1c31f 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -6476,14 +6476,14 @@ namespace ranges { template<@\placeholdernc{no-throw-forward-iterator}@ I, @\placeholdernc{no-throw-sentinel}@ S> - requires DefaultConstructible> + requires default_constructible> I uninitialized_default_construct(I first, S last); template<@\placeholdernc{no-throw-forward-range}@ R> - requires DefaultConstructible> + requires default_constructible> safe_iterator_t uninitialized_default_construct(R&& r); template<@\placeholdernc{no-throw-forward-iterator}@ I> - requires DefaultConstructible> + requires default_constructible> I uninitialized_default_construct_n(I first, iter_difference_t n); } @@ -6500,14 +6500,14 @@ namespace ranges { template<@\placeholdernc{no-throw-forward-iterator}@ I, @\placeholdernc{no-throw-sentinel}@ S> - requires DefaultConstructible> + requires default_constructible> I uninitialized_value_construct(I first, S last); template<@\placeholdernc{no-throw-forward-range}@ R> - requires DefaultConstructible> + requires default_constructible> safe_iterator_t uninitialized_value_construct(R&& r); template<@\placeholdernc{no-throw-forward-iterator}@ I> - requires DefaultConstructible> + requires default_constructible> I uninitialized_value_construct_n(I first, iter_difference_t n); } @@ -8043,10 +8043,10 @@ \begin{itemdecl} namespace ranges { template<@\placeholdernc{no-throw-forward-iterator}@ I, @\placeholdernc{no-throw-sentinel}@ S> - requires DefaultConstructible> + requires default_constructible> I uninitialized_default_construct(I first, S last); template<@\placeholdernc{no-throw-forward-range}@ R> - requires DefaultConstructible> + requires default_constructible> safe_iterator_t uninitialized_default_construct(R&& r); } \end{itemdecl} @@ -8083,7 +8083,7 @@ \begin{itemdecl} namespace ranges { template<@\placeholdernc{no-throw-forward-iterator}@ I> - requires DefaultConstructible> + requires default_constructible> I uninitialized_default_construct_n(I first, iter_difference_t n); } \end{itemdecl} @@ -8120,10 +8120,10 @@ \begin{itemdecl} namespace ranges { template<@\placeholdernc{no-throw-forward-iterator}@ I, @\placeholdernc{no-throw-sentinel}@ S> - requires DefaultConstructible> + requires default_constructible> I uninitialized_value_construct(I first, S last); template<@\placeholdernc{no-throw-forward-range}@ R> - requires DefaultConstructible> + requires default_constructible> safe_iterator_t uninitialized_value_construct(R&& r); } \end{itemdecl} @@ -8160,7 +8160,7 @@ \begin{itemdecl} namespace ranges { template<@\placeholdernc{no-throw-forward-iterator}@ I> - requires DefaultConstructible> + requires default_constructible> I uninitialized_value_construct_n(I first, iter_difference_t n); } \end{itemdecl} From aac943b32d1d1debdec4b786086d82d686a7b544 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:20:45 -0700 Subject: [PATCH 18/84] [everywhere] Rename concept 'MoveConstructible' to 'move_constructible'. --- source/concepts.tex | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index a8b1b604b8..077b6a41ad 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -204,9 +204,9 @@ template concept default_constructible = @\seebelow@; - // \ref{concept.moveconstructible}, concept \libconcept{MoveConstructible} + // \ref{concept.moveconstructible}, concept \libconcept{move_constructible} template - concept MoveConstructible = @\seebelow@; + concept move_constructible = @\seebelow@; // \ref{concept.copyconstructible}, concept \libconcept{CopyConstructible} template @@ -609,7 +609,7 @@ \item Otherwise, if \tcode{E1} and \tcode{E2} are lvalues of the - same type \tcode{T} that models \tcode{\libconcept{MoveConstructible}} and + same type \tcode{T} that models \tcode{\libconcept{move_constructible}} and \tcode{\libconcept{assignable_from}}, \tcode{S} is an expression that exchanges the denoted values. \tcode{S} is a constant expression if @@ -754,19 +754,19 @@ concept default_constructible = constructible_from; \end{itemdecl} -\rSec2[concept.moveconstructible]{Concept \libconcept{MoveConstructible}} +\rSec2[concept.moveconstructible]{Concept \libconcept{move_constructible}} -\indexlibrary{\idxcode{MoveConstructible}}% +\indexlibrary{\idxcode{move_constructible}}% \begin{itemdecl} template - concept MoveConstructible = constructible_from && convertible_to; + concept move_constructible = constructible_from && convertible_to; \end{itemdecl} \begin{itemdescr} \pnum If \tcode{T} is an object type, then let \tcode{rv} be an rvalue of type \tcode{T} and \tcode{u2} a distinct object of type \tcode{T} equal to -\tcode{rv}. \tcode{T} models \libconcept{MoveConstructible} only if +\tcode{rv}. \tcode{T} models \libconcept{move_constructible} only if \begin{itemize} \item After the definition \tcode{T u = rv;}, \tcode{u} is equal to \tcode{u2}. @@ -784,7 +784,7 @@ \begin{itemdecl} template concept CopyConstructible = - MoveConstructible && + move_constructible && constructible_from && convertible_to && constructible_from && convertible_to && constructible_from && convertible_to; @@ -1044,7 +1044,7 @@ \indexlibrary{\idxcode{Regular}}% \begin{itemdecl} template - concept Movable = is_object_v && MoveConstructible && assignable_from && swappable; + concept Movable = is_object_v && move_constructible && assignable_from && swappable; template concept Copyable = CopyConstructible && Movable && assignable_from; template From eb9fafe3d2facb662fa76e693b63a8dda6aeaf6a Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:22:26 -0700 Subject: [PATCH 19/84] [everywhere] Rename concept 'CopyConstructible' to 'copy_constructible'. --- source/algorithms.tex | 30 +++++++++++++++--------------- source/concepts.tex | 14 +++++++------- source/iterators.tex | 18 +++++++++--------- source/ranges.tex | 10 +++++----- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 90c8566387..15782e39a0 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1326,11 +1326,11 @@ using unary_transform_result = copy_result; template S, WeaklyIncrementable O, - CopyConstructible F, class Proj = identity> + copy_constructible F, class Proj = identity> requires Writable>> constexpr unary_transform_result transform(I first1, S last1, O result, F op, Proj proj = {}); - template requires Writable, Proj>>> constexpr unary_transform_result, O> @@ -1358,7 +1358,7 @@ }; template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, CopyConstructible F, class Proj1 = identity, + WeaklyIncrementable O, copy_constructible F, class Proj1 = identity, class Proj2 = identity> requires Writable, projected>> @@ -1366,7 +1366,7 @@ transform(I1 first1, S1 last1, I2 first2, S2 last2, O result, F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); template + copy_constructible F, class Proj1 = identity, class Proj2 = identity> requires Writable, Proj1>, projected, Proj2>>> constexpr binary_transform_result, safe_iterator_t, O> @@ -1505,13 +1505,13 @@ ForwardIterator first, Size n, Generator gen); namespace ranges { - template S, CopyConstructible F> + template S, copy_constructible F> requires Invocable && Writable> constexpr O generate(O first, S last, F gen); - template + template requires Invocable && OutputRange> constexpr safe_iterator_t generate(R&& r, F gen); - template + template requires Invocable && Writable> constexpr O generate_n(O first, iter_difference_t n, F gen); } @@ -3117,7 +3117,7 @@ \pnum \begin{note} The overloads in namespace \tcode{ranges} require -\tcode{Fun} to model \libconcept{CopyConstructible}. +\tcode{Fun} to model \libconcept{copy_constructible}. \end{note} \end{itemdescr} @@ -4566,17 +4566,17 @@ BinaryOperation binary_op); template S, WeaklyIncrementable O, - CopyConstructible F, class Proj = identity> + copy_constructible F, class Proj = identity> requires Writable>> constexpr ranges::unary_transform_result ranges::transform(I first1, S last1, O result, F op, Proj proj = {}); -template requires Writable, Proj>>> constexpr ranges::unary_transform_result, O> ranges::transform(R&& r, O result, F op, Proj proj = {}); template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, CopyConstructible F, class Proj1 = identity, + WeaklyIncrementable O, copy_constructible F, class Proj1 = identity, class Proj2 = identity> requires Writable, projected>> @@ -4584,7 +4584,7 @@ ranges::transform(I1 first1, S1 last1, I2 first2, S2 last2, O result, F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); template + copy_constructible F, class Proj1 = identity, class Proj2 = identity> requires Writable, Proj1>, projected, Proj2>>> constexpr ranges::binary_transform_result, safe_iterator_t, O> @@ -4910,13 +4910,13 @@ ForwardIterator generate_n(ExecutionPolicy&& exec, ForwardIterator first, Size n, Generator gen); -template S, CopyConstructible F> +template S, copy_constructible F> requires Invocable && Writable> constexpr O ranges::generate(O first, S last, F gen); -template +template requires Invocable && OutputRange> constexpr safe_iterator_t ranges::generate(R&& r, F gen); -template +template requires Invocable && Writable> constexpr O ranges::generate_n(O first, iter_difference_t n, F gen); \end{itemdecl} diff --git a/source/concepts.tex b/source/concepts.tex index 077b6a41ad..a6c58214ae 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -208,9 +208,9 @@ template concept move_constructible = @\seebelow@; - // \ref{concept.copyconstructible}, concept \libconcept{CopyConstructible} + // \ref{concept.copyconstructible}, concept \libconcept{copy_constructible} template - concept CopyConstructible = @\seebelow@; + concept copy_constructible = @\seebelow@; // \ref{concepts.compare}, comparison concepts // \ref{concept.boolean}, concept \libconcept{Boolean} @@ -778,12 +778,12 @@ \end{itemize} \end{itemdescr} -\rSec2[concept.copyconstructible]{Concept \libconcept{CopyConstructible}} +\rSec2[concept.copyconstructible]{Concept \libconcept{copy_constructible}} -\indexlibrary{\idxcode{CopyConstructible}}% +\indexlibrary{\idxcode{copy_constructible}}% \begin{itemdecl} template - concept CopyConstructible = + concept copy_constructible = move_constructible && constructible_from && convertible_to && constructible_from && convertible_to && @@ -794,7 +794,7 @@ \pnum If \tcode{T} is an object type, then let \tcode{v} be an lvalue of type (possibly \tcode{const}) \tcode{T} or an rvalue of type \tcode{const T}. -\tcode{T} models \libconcept{CopyConstructible} only if +\tcode{T} models \libconcept{copy_constructible} only if \begin{itemize} \item After the definition \tcode{T u = v;}, \tcode{u} is equal to \tcode{v}. @@ -1046,7 +1046,7 @@ template concept Movable = is_object_v && move_constructible && assignable_from && swappable; template - concept Copyable = CopyConstructible && Movable && assignable_from; + concept Copyable = copy_constructible && Movable && assignable_from; template concept Semiregular = Copyable && default_constructible; template diff --git a/source/iterators.tex b/source/iterators.tex index 3602e21ef8..df8fc9f08b 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -2323,7 +2323,7 @@ template concept IndirectUnaryInvocable = Readable && - CopyConstructible && + copy_constructible && Invocable&> && Invocable> && Invocable> && @@ -2334,7 +2334,7 @@ template concept IndirectRegularUnaryInvocable = Readable && - CopyConstructible && + copy_constructible && RegularInvocable&> && RegularInvocable> && RegularInvocable> && @@ -2345,7 +2345,7 @@ template concept IndirectUnaryPredicate = Readable && - CopyConstructible && + copy_constructible && Predicate&> && Predicate> && Predicate>; @@ -2353,7 +2353,7 @@ template concept IndirectRelation = Readable && Readable && - CopyConstructible && + copy_constructible && Relation&, iter_value_t&> && Relation&, iter_reference_t> && Relation, iter_value_t&> && @@ -2363,7 +2363,7 @@ template concept IndirectStrictWeakOrder = Readable && Readable && - CopyConstructible && + copy_constructible && StrictWeakOrder&, iter_value_t&> && StrictWeakOrder&, iter_reference_t> && StrictWeakOrder, iter_value_t&> && @@ -4202,10 +4202,10 @@ \begin{itemdescr} \pnum -\constraints \tcode{Iterator} satisfies \libconcept{CopyConstructible}. +\constraints \tcode{Iterator} satisfies \libconcept{copy_constructible}. \pnum -\expects \tcode{Iterator} models \libconcept{CopyConstructible}. +\expects \tcode{Iterator} models \libconcept{copy_constructible}. \pnum \returns \tcode{current}. @@ -5086,7 +5086,7 @@ requires assignable_from constexpr counted_iterator& operator=(const counted_iterator& x); - constexpr I base() const & requires CopyConstructible; + constexpr I base() const & requires copy_constructible; constexpr I base() &&; constexpr iter_difference_t count() const noexcept; constexpr decltype(auto) operator*(); @@ -5211,7 +5211,7 @@ \indexlibrarymember{base}{counted_iterator}% \begin{itemdecl} -constexpr I base() const & requires CopyConstructible; +constexpr I base() const & requires copy_constructible; \end{itemdecl} \begin{itemdescr} diff --git a/source/ranges.tex b/source/ranges.tex index 294e576263..2bed78f1b7 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -137,7 +137,7 @@ } // \ref{range.single}, single view - template + template requires is_object_v class single_view; @@ -168,7 +168,7 @@ namespace views { inline constexpr @\unspec@ filter = @\unspec@; } // \ref{range.transform}, transform view - template + template requires View && is_object_v && RegularInvocable> class transform_view; @@ -1640,7 +1640,7 @@ \begin{codeblock} namespace std::ranges { - template + template requires is_object_v class single_view : public view_interface> { private: @@ -2507,7 +2507,7 @@ \begin{itemize} \item \tcode{\placeholder{semiregular-box}} constrains its type parameter \tcode{T} with -\tcode{\libconcept{CopyConstructible} \&\& is_object_v}. +\tcode{\libconcept{copy_constructible} \&\& is_object_v}. \item If \tcode{T} models \libconcept{default_constructible}, the default constructor of \tcode{\placeholder{semiregular-box}} is equivalent to: @@ -3049,7 +3049,7 @@ \begin{codeblock} namespace std::ranges { - template + template requires View && is_object_v && RegularInvocable> class transform_view : public view_interface> { From 7089e3c3bf7fa831229ae1f365f032bc8d66e702 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:23:20 -0700 Subject: [PATCH 20/84] [everywhere] Rename concept 'Boolean' to 'boolean'. --- source/concepts.tex | 52 ++++++++++++++++++++++----------------------- source/support.tex | 16 +++++++------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index a6c58214ae..92c5d8d890 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -213,9 +213,9 @@ concept copy_constructible = @\seebelow@; // \ref{concepts.compare}, comparison concepts - // \ref{concept.boolean}, concept \libconcept{Boolean} + // \ref{concept.boolean}, concept \libconcept{boolean} template - concept Boolean = @\seebelow@; + concept boolean = @\seebelow@; // \ref{concept.equalitycomparable}, concept \libconcept{EqualityComparable} template @@ -812,16 +812,16 @@ This subclause describes concepts that establish relationships and orderings on values of possibly differing object types. -\rSec2[concept.boolean]{Concept \libconcept{Boolean}} +\rSec2[concept.boolean]{Concept \libconcept{boolean}} \pnum -The \libconcept{Boolean} concept specifies the requirements on a type that is +The \libconcept{boolean} concept specifies the requirements on a type that is usable in Boolean contexts. -\indexlibrary{\idxcode{Boolean}}% +\indexlibrary{\idxcode{boolean}}% \begin{itemdecl} template - concept Boolean = + concept boolean = Movable> && // (see \ref{concepts.object}) requires(const remove_reference_t& b1, const remove_reference_t& b2, const bool a) { @@ -845,7 +845,7 @@ \pnum For some type \tcode{B}, let \tcode{b1} and \tcode{b2} be lvalues of type \tcode{const remove_reference_t}. -\tcode{B} models \libconcept{Boolean} only if +\tcode{B} models \libconcept{boolean} only if \begin{itemize} \item \tcode{bool(b1) == !bool(!b1)}. @@ -868,9 +868,9 @@ \pnum \begin{example} The types \tcode{bool}, \tcode{true_type}\iref{meta.type.synop}, and -\tcode{bitset<$N$>::reference}\iref{template.bitset} are \libconcept{Boolean} +\tcode{bitset<$N$>::reference}\iref{template.bitset} are \libconcept{boolean} types. Pointers, smart pointers, and types with only explicit conversions to -\tcode{bool} are not \libconcept{Boolean} types. +\tcode{bool} are not \libconcept{boolean} types. \end{example} \rSec2[concept.equalitycomparable]{Concept \libconcept{EqualityComparable}} @@ -880,10 +880,10 @@ concept @\placeholder{weakly-equality-comparable-with}@ = // \expos requires(const remove_reference_t& t, const remove_reference_t& u) { - { t == u } -> Boolean; - { t != u } -> Boolean; - { u == t } -> Boolean; - { u != t } -> Boolean; + { t == u } -> boolean; + { t != u } -> boolean; + { u == t } -> boolean; + { u != t } -> boolean; }; \end{itemdecl} @@ -960,10 +960,10 @@ EqualityComparable && requires(const remove_reference_t& a, const remove_reference_t& b) { - { a < b } -> Boolean; - { a > b } -> Boolean; - { a <= b } -> Boolean; - { a >= b } -> Boolean; + { a < b } -> boolean; + { a > b } -> boolean; + { a <= b } -> boolean; + { a >= b } -> boolean; }; \end{itemdecl} @@ -997,14 +997,14 @@ EqualityComparableWith && requires(const remove_reference_t& t, const remove_reference_t& u) { - { t < u } -> Boolean; - { t > u } -> Boolean; - { t <= u } -> Boolean; - { t >= u } -> Boolean; - { u < t } -> Boolean; - { u > t } -> Boolean; - { u <= t } -> Boolean; - { u >= t } -> Boolean; + { t < u } -> boolean; + { t > u } -> boolean; + { t <= u } -> boolean; + { t >= u } -> boolean; + { u < t } -> boolean; + { u > t } -> boolean; + { u <= t } -> boolean; + { u >= t } -> boolean; }; \end{itemdecl} @@ -1136,7 +1136,7 @@ \indexlibrary{\idxcode{Predicate}}% \begin{itemdecl} template - concept Predicate = RegularInvocable && Boolean>; + concept Predicate = RegularInvocable && boolean>; \end{itemdecl} \rSec2[concept.relation]{Concept \libconcept{Relation}} diff --git a/source/support.tex b/source/support.tex index f5502d67cb..26710540ec 100644 --- a/source/support.tex +++ b/source/support.tex @@ -4719,14 +4719,14 @@ template concept @\placeholder{partially-ordered-with}@ = // \expos requires(const remove_reference_t& t, const remove_reference_t& u) { - { t < u } -> Boolean; - { t > u } -> Boolean; - { t <= u } -> Boolean; - { t >= u } -> Boolean; - { u < t } -> Boolean; - { u > t } -> Boolean; - { u <= t } -> Boolean; - { u >= t } -> Boolean; + { t < u } -> boolean; + { t > u } -> boolean; + { t <= u } -> boolean; + { t >= u } -> boolean; + { u < t } -> boolean; + { u > t } -> boolean; + { u <= t } -> boolean; + { u >= t } -> boolean; }; \end{codeblock} From 520bbc9a9451838f790ff7842484e4342a904e7c Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:24:30 -0700 Subject: [PATCH 21/84] [everywhere] Rename concept 'EqualityComparable' to 'equality_comparable'. --- source/concepts.tex | 20 ++++++++++---------- source/iterators.tex | 8 ++++---- source/ranges.tex | 24 ++++++++++++------------ source/support.tex | 2 +- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 92c5d8d890..3b1fe5bdd9 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -217,9 +217,9 @@ template concept boolean = @\seebelow@; - // \ref{concept.equalitycomparable}, concept \libconcept{EqualityComparable} + // \ref{concept.equalitycomparable}, concept \libconcept{equality_comparable} template - concept EqualityComparable = @\seebelow@; + concept equality_comparable = @\seebelow@; template concept EqualityComparableWith = @\seebelow@; @@ -873,7 +873,7 @@ \tcode{bool} are not \libconcept{boolean} types. \end{example} -\rSec2[concept.equalitycomparable]{Concept \libconcept{EqualityComparable}} +\rSec2[concept.equalitycomparable]{Concept \libconcept{equality_comparable}} \begin{itemdecl} template @@ -904,16 +904,16 @@ \end{itemize} \end{itemdescr} -\indexlibrary{\idxcode{EqualityComparable}}% +\indexlibrary{\idxcode{equality_comparable}}% \begin{itemdecl} template - concept EqualityComparable = @\placeholder{weakly-equality-comparable-with}@; + concept equality_comparable = @\placeholder{weakly-equality-comparable-with}@; \end{itemdecl} \begin{itemdescr} \pnum Let \tcode{a} and \tcode{b} be objects of type \tcode{T}. -\tcode{T} models \libconcept{EqualityComparable} only if +\tcode{T} models \libconcept{equality_comparable} only if \tcode{bool(a == b)} is \tcode{true} when \tcode{a} is equal to \tcode{b}\iref{concepts.equality}, and \tcode{false} otherwise. @@ -928,9 +928,9 @@ \begin{itemdecl} template concept EqualityComparableWith = - EqualityComparable && EqualityComparable && + equality_comparable && equality_comparable && common_reference_with&, const remove_reference_t&> && - EqualityComparable< + equality_comparable< common_reference_t< const remove_reference_t&, const remove_reference_t&>> && @@ -957,7 +957,7 @@ \begin{itemdecl} template concept StrictTotallyOrdered = - EqualityComparable && + equality_comparable && requires(const remove_reference_t& a, const remove_reference_t& b) { { a < b } -> boolean; @@ -1050,7 +1050,7 @@ template concept Semiregular = Copyable && default_constructible; template - concept Regular = Semiregular && EqualityComparable; + concept Regular = Semiregular && equality_comparable; \end{itemdecl} \begin{itemdescr} diff --git a/source/iterators.tex b/source/iterators.tex index df8fc9f08b..5b560393af 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -863,7 +863,7 @@ template concept @\placeholder{cpp17-input-iterator}@ = - @\placeholder{cpp17-iterator}@ && EqualityComparable && requires(I i) { + @\placeholder{cpp17-iterator}@ && equality_comparable && requires(I i) { typename incrementable_traits::difference_type; typename readable_traits::value_type; typename common_reference_t&&, @@ -1276,7 +1276,7 @@ The \libconcept{WeaklyIncrementable} concept specifies the requirements on types that can be incremented with the pre- and post-increment operators. The increment operations are not required to be equality-preserving, -nor is the type required to be \libconcept{EqualityComparable}. +nor is the type required to be \libconcept{equality_comparable}. \indexlibrary{\idxcode{WeaklyIncrementable}}% \begin{codeblock} @@ -1429,7 +1429,7 @@ \pnum The \libconcept{Incrementable} concept specifies requirements on types that can be incremented with the pre- and post-increment operators. The increment operations are required to be equality-preserving, -and the type is required to be \libconcept{EqualityComparable}. +and the type is required to be \libconcept{equality_comparable}. \begin{note} This supersedes the annotations on the increment expressions in the definition of \tcode{WeaklyIncrementable}. @@ -1631,7 +1631,7 @@ can be used to write values (from the requirement for \libconcept{Writable}\iref{iterator.concept.writable}) and which can be both pre- and post-incremented. \begin{note} -Output iterators are not required to model \libconcept{EqualityComparable}. +Output iterators are not required to model \libconcept{equality_comparable}. \end{note} \indexlibrary{\idxcode{OutputIterator}}% diff --git a/source/ranges.tex b/source/ranges.tex index 2bed78f1b7..c1fe36c319 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -2031,7 +2031,7 @@ requires @\placeholdernc{Advanceable}@; friend constexpr bool operator==(const iterator& x, const iterator& y) - requires EqualityComparable; + requires equality_comparable; friend constexpr bool operator<(const iterator& x, const iterator& y) requires StrictTotallyOrdered; @@ -2227,7 +2227,7 @@ \indexlibrary{\idxcode{operator==}!\idxcode{iota_view::iterator}} \begin{itemdecl} friend constexpr bool operator==(const iterator& x, const iterator& y) - requires EqualityComparable; + requires equality_comparable; \end{itemdecl} \begin{itemdescr} @@ -2776,7 +2776,7 @@ constexpr iterator operator--(int) requires BidirectionalRange; friend constexpr bool operator==(const iterator& x, const iterator& y) - requires EqualityComparable>; + requires equality_comparable>; friend constexpr range_rvalue_reference_t iter_move(const iterator& i) noexcept(noexcept(ranges::iter_move(i.current_))); @@ -2935,7 +2935,7 @@ \indexlibrary{\idxcode{operator==}!\idxcode{filter_view::iterator}}% \begin{itemdecl} friend constexpr bool operator==(const iterator& x, const iterator& y) - requires EqualityComparable>; + requires equality_comparable>; \end{itemdecl} \begin{itemdescr} @@ -3260,7 +3260,7 @@ { return invoke(*parent_->fun_, current_[n]); } friend constexpr bool operator==(const iterator& x, const iterator& y) - requires EqualityComparable>; + requires equality_comparable>; friend constexpr bool operator<(const iterator& x, const iterator& y) requires RandomAccessRange; @@ -3457,7 +3457,7 @@ \indexlibrary{\idxcode{operator==}!\idxcode{transform_view::iterator}} \begin{itemdecl} friend constexpr bool operator==(const iterator& x, const iterator& y) - requires EqualityComparable>; + requires equality_comparable>; \end{itemdecl} \begin{itemdescr} @@ -4455,8 +4455,8 @@ BidirectionalRange>; friend constexpr bool operator==(const iterator& x, const iterator& y) - requires ref_is_glvalue && EqualityComparable> && - EqualityComparable>>; + requires ref_is_glvalue && equality_comparable> && + equality_comparable>>; friend constexpr decltype(auto) iter_move(const iterator& i) noexcept(noexcept(ranges::iter_move(i.inner_))) { @@ -4671,8 +4671,8 @@ \indexlibrary{\idxcode{operator==}!\idxcode{join_view::iterator}} \begin{itemdecl} friend constexpr bool operator==(const iterator& x, const iterator& y) - requires ref_is_glvalue && EqualityComparable> && - EqualityComparable>>; + requires ref_is_glvalue && equality_comparable> && + equality_comparable>>; \end{itemdecl} \begin{itemdescr} @@ -5942,7 +5942,7 @@ { return get(*(current_ + n)); } friend constexpr bool operator==(const iterator& x, const iterator& y) - requires EqualityComparable>; + requires equality_comparable>; friend constexpr bool operator==(const iterator& x, const sentinel_t& y); friend constexpr bool operator<(const iterator& x, const iterator& y) @@ -6105,7 +6105,7 @@ \begin{itemdecl} friend constexpr bool operator==(const iterator& x, const iterator& y) - requires EqualityComparable; + requires equality_comparable; \end{itemdecl} \begin{itemdescr} diff --git a/source/support.tex b/source/support.tex index 26710540ec..9c8f41b5d8 100644 --- a/source/support.tex +++ b/source/support.tex @@ -4781,7 +4781,7 @@ \tcode{((a <=> b) <=> 0)} and \tcode{(0 <=> (b <=> a))} are equal; \item if \tcode{Cat} is convertible to \tcode{strong_equality}, \tcode{T} models - \libconcept{EqualityComparable}\iref{concept.equalitycomparable}; + \libconcept{equality_comparable}\iref{concept.equalitycomparable}; \item if \tcode{Cat} is convertible to \tcode{partial_ordering}: \begin{itemize} From 7646581672df7e9194ecc1e2938dc31ba916f369 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:24:56 -0700 Subject: [PATCH 22/84] [everywhere] Rename concept 'EqualityComparableWith' to 'equality_comparable_with'. --- source/concepts.tex | 10 +++++----- source/iterators.tex | 4 ++-- source/support.tex | 2 +- source/utilities.tex | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 3b1fe5bdd9..827c9533e7 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -221,7 +221,7 @@ template concept equality_comparable = @\seebelow@; template - concept EqualityComparableWith = @\seebelow@; + concept equality_comparable_with = @\seebelow@; // \ref{concept.stricttotallyordered}, concept \libconcept{StrictTotallyOrdered} template @@ -924,10 +924,10 @@ \end{note} \end{itemdescr} -\indexlibrary{\idxcode{EqualityComparableWith}}% +\indexlibrary{\idxcode{equality_comparable_with}}% \begin{itemdecl} template - concept EqualityComparableWith = + concept equality_comparable_with = equality_comparable && equality_comparable && common_reference_with&, const remove_reference_t&> && equality_comparable< @@ -947,7 +947,7 @@ common_reference_t&, const remove_reference_t&> \end{codeblock} \tcode{T} and \tcode{U} model -\tcode{\libconcept{EqualityComparableWith}} only if +\tcode{\libconcept{equality_comparable_with}} only if \tcode{bool(t == u) == bool(C(t) == C(u))}. \end{itemdescr} @@ -994,7 +994,7 @@ common_reference_t< const remove_reference_t&, const remove_reference_t&>> && - EqualityComparableWith && + equality_comparable_with && requires(const remove_reference_t& t, const remove_reference_t& u) { { t < u } -> boolean; diff --git a/source/iterators.tex b/source/iterators.tex index 5b560393af..571db27a6e 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -4682,7 +4682,7 @@ friend bool operator==( const common_iterator& x, const common_iterator& y); template S2> - requires Sentinel && EqualityComparableWith + requires Sentinel && equality_comparable_with friend bool operator==( const common_iterator& x, const common_iterator& y); @@ -4946,7 +4946,7 @@ \indexlibrarymember{operator==}{common_iterator}% \begin{itemdecl} template S2> - requires Sentinel && EqualityComparableWith + requires Sentinel && equality_comparable_with friend bool operator==( const common_iterator& x, const common_iterator& y); \end{itemdecl} diff --git a/source/support.tex b/source/support.tex index 9c8f41b5d8..eff1f0c301 100644 --- a/source/support.tex +++ b/source/support.tex @@ -4837,7 +4837,7 @@ \item if \tcode{Cat} is convertible to \tcode{strong_equality}, \tcode{T} and \tcode{U} model - \tcode{\libconcept{EqualityComparableWith}}\iref{concept.equalitycomparable}; + \tcode{\libconcept{equality_comparable_with}}\iref{concept.equalitycomparable}; \item if \tcode{Cat} is convertible to \tcode{partial_ordering}: \begin{itemize} diff --git a/source/utilities.tex b/source/utilities.tex index 6489e1c31f..1f86e0eb2d 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -14675,7 +14675,7 @@ \begin{itemdecl} struct ranges::equal_to { template - requires EqualityComparableWith || @\placeholdernc{BUILTIN-PTR-CMP}@(T, ==, U) + requires equality_comparable_with || @\placeholdernc{BUILTIN-PTR-CMP}@(T, ==, U) constexpr bool operator()(T&& t, U&& u) const; using is_transparent = @\unspecnc@; @@ -14710,7 +14710,7 @@ \begin{itemdecl} struct ranges::not_equal_to { template - requires EqualityComparableWith || @\placeholdernc{BUILTIN-PTR-CMP}@(T, ==, U) + requires equality_comparable_with || @\placeholdernc{BUILTIN-PTR-CMP}@(T, ==, U) constexpr bool operator()(T&& t, U&& u) const; using is_transparent = @\unspecnc@; From c93ad16540ad06e47e4dd075faacb1ab3a1616a4 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:25:34 -0700 Subject: [PATCH 23/84] [everywhere] Rename concept 'StrictTotallyOrdered' to 'totally_ordered'. --- source/concepts.tex | 16 ++++++++-------- source/iterators.tex | 6 +++--- source/lib-intro.tex | 2 +- source/ranges.tex | 22 +++++++++++----------- source/support.tex | 2 +- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 827c9533e7..1d315201aa 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -223,9 +223,9 @@ template concept equality_comparable_with = @\seebelow@; - // \ref{concept.stricttotallyordered}, concept \libconcept{StrictTotallyOrdered} + // \ref{concept.stricttotallyordered}, concept \libconcept{totally_ordered} template - concept StrictTotallyOrdered = @\seebelow@; + concept totally_ordered = @\seebelow@; template concept StrictTotallyOrderedWith = @\seebelow@; @@ -951,12 +951,12 @@ \tcode{bool(t == u) == bool(C(t) == C(u))}. \end{itemdescr} -\rSec2[concept.stricttotallyordered]{Concept \libconcept{StrictTotallyOrdered}} +\rSec2[concept.stricttotallyordered]{Concept \libconcept{totally_ordered}} -\indexlibrary{\idxcode{StrictTotallyOrdered}}% +\indexlibrary{\idxcode{totally_ordered}}% \begin{itemdecl} template - concept StrictTotallyOrdered = + concept totally_ordered = equality_comparable && requires(const remove_reference_t& a, const remove_reference_t& b) { @@ -971,7 +971,7 @@ \pnum For some type \tcode{T}, let \tcode{a}, \tcode{b}, and \tcode{c} be lvalues of type \tcode{const remove_reference_t}. -\tcode{T} models \libconcept{StrictTotallyOrdered} only if +\tcode{T} models \libconcept{totally_ordered} only if \begin{itemize} \item Exactly one of \tcode{bool(a < b)}, \tcode{bool(a > b)}, or @@ -988,9 +988,9 @@ \begin{itemdecl} template concept StrictTotallyOrderedWith = - StrictTotallyOrdered && StrictTotallyOrdered && + totally_ordered && totally_ordered && common_reference_with&, const remove_reference_t&> && - StrictTotallyOrdered< + totally_ordered< common_reference_t< const remove_reference_t&, const remove_reference_t&>> && diff --git a/source/iterators.tex b/source/iterators.tex index 571db27a6e..98c253380b 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -893,7 +893,7 @@ template concept @\placeholder{cpp17-random-access-iterator}@ = - @\placeholder{cpp17-bidirectional-iterator}@ && StrictTotallyOrdered && + @\placeholder{cpp17-bidirectional-iterator}@ && totally_ordered && requires(I i, typename incrementable_traits::difference_type n) { { i += n } -> same_as; { i -= n } -> same_as; @@ -1357,7 +1357,7 @@ \pnum All integer-class types model \libconcept{Regular}\iref{concepts.object} and -\libconcept{StrictTotallyOrdered}\iref{concept.stricttotallyordered}. +\libconcept{totally_ordered}\iref{concept.stricttotallyordered}. \pnum A value-initialized object of integer-class type has value 0. @@ -1767,7 +1767,7 @@ concept RandomAccessIterator = BidirectionalIterator && derived_from<@\placeholdernc{ITER_CONCEPT}@(I), random_access_iterator_tag> && - StrictTotallyOrdered && + totally_ordered && SizedSentinel && requires(I i, const I j, const iter_difference_t n) { { i += n } -> same_as; diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 7ce437cb75..e4823ad96d 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -532,7 +532,7 @@ total functions; that is, some arguments to a required operation may result in the required semantics failing to be met. \begin{example} -The required \tcode{<} operator of the \libconcept{StrictTotallyOrdered} +The required \tcode{<} operator of the \libconcept{totally_ordered} concept\iref{concept.stricttotallyordered} does not meet the semantic requirements of that concept when operating on NaNs. \end{example} diff --git a/source/ranges.tex b/source/ranges.tex index c1fe36c319..fd74785338 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1865,7 +1865,7 @@ \begin{itemdecl} template concept @\placeholder{Advanceable}@ = - @\placeholdernc{Decrementable}@ && StrictTotallyOrdered && + @\placeholdernc{Decrementable}@ && totally_ordered && requires(I i, const I j, const @\placeholdernc{IOTA-DIFF-T}@(I) n) { { i += n } -> same_as; { i -= n } -> same_as; @@ -2034,16 +2034,16 @@ requires equality_comparable; friend constexpr bool operator<(const iterator& x, const iterator& y) - requires StrictTotallyOrdered; + requires totally_ordered; friend constexpr bool operator>(const iterator& x, const iterator& y) - requires StrictTotallyOrdered; + requires totally_ordered; friend constexpr bool operator<=(const iterator& x, const iterator& y) - requires StrictTotallyOrdered; + requires totally_ordered; friend constexpr bool operator>=(const iterator& x, const iterator& y) - requires StrictTotallyOrdered; + requires totally_ordered; friend constexpr compare_three_way_result_t operator<=>( const iterator& x, const iterator& y) - requires StrictTotallyOrdered && ThreeWayComparable; + requires totally_ordered && ThreeWayComparable; friend constexpr iterator operator+(iterator i, difference_type n) requires @\placeholdernc{Advanceable}@; @@ -2238,7 +2238,7 @@ \indexlibrary{\idxcode{operator<}!\idxcode{iota_view::iterator}} \begin{itemdecl} friend constexpr bool operator<(const iterator& x, const iterator& y) - requires StrictTotallyOrdered; + requires totally_ordered; \end{itemdecl} \begin{itemdescr} @@ -2249,7 +2249,7 @@ \indexlibrary{\idxcode{operator>}!\idxcode{iota_view::iterator}} \begin{itemdecl} friend constexpr bool operator>(const iterator& x, const iterator& y) - requires StrictTotallyOrdered; + requires totally_ordered; \end{itemdecl} \begin{itemdescr} @@ -2260,7 +2260,7 @@ \indexlibrary{\idxcode{operator<=}!\idxcode{iota_view::iterator}} \begin{itemdecl} friend constexpr bool operator<=(const iterator& x, const iterator& y) - requires StrictTotallyOrdered; + requires totally_ordered; \end{itemdecl} \begin{itemdescr} @@ -2271,7 +2271,7 @@ \indexlibrary{\idxcode{operator>=}!\idxcode{iota_view::iterator}} \begin{itemdecl} friend constexpr bool operator>=(const iterator& x, const iterator& y) - requires StrictTotallyOrdered; + requires totally_ordered; \end{itemdecl} \begin{itemdescr} @@ -2283,7 +2283,7 @@ \begin{itemdecl} friend constexpr compare_three_way_result_t operator<=>(const iterator& x, const iterator& y) - requires StrictTotallyOrdered && ThreeWayComparable; + requires totally_ordered && ThreeWayComparable; \end{itemdecl} \begin{itemdescr} diff --git a/source/support.tex b/source/support.tex index eff1f0c301..6a79a7bfde 100644 --- a/source/support.tex +++ b/source/support.tex @@ -4796,7 +4796,7 @@ \end{itemize} \item If \tcode{Cat} is convertible to \tcode{strong_ordering}, \tcode{T} models - \libconcept{StrictTotallyOrdered}\iref{concept.stricttotallyordered}. + \libconcept{totally_ordered}\iref{concept.stricttotallyordered}. \end{itemize} \begin{codeblock} From 2af7583a20939837255c9a3dd49c16c9d5945f51 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:25:53 -0700 Subject: [PATCH 24/84] [everywhere] Rename concept 'StrictTotallyOrderedWith' to 'totally_ordered_with'. --- source/concepts.tex | 6 +++--- source/ranges.tex | 2 +- source/support.tex | 2 +- source/utilities.tex | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 1d315201aa..307d93c96e 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -227,7 +227,7 @@ template concept totally_ordered = @\seebelow@; template - concept StrictTotallyOrderedWith = @\seebelow@; + concept totally_ordered_with = @\seebelow@; // \ref{concepts.object}, object concepts template @@ -987,7 +987,7 @@ \begin{itemdecl} template - concept StrictTotallyOrderedWith = + concept totally_ordered_with = totally_ordered && totally_ordered && common_reference_with&, const remove_reference_t&> && totally_ordered< @@ -1018,7 +1018,7 @@ common_reference_t&, const remove_reference_t&> \end{codeblock} \tcode{T} and \tcode{U} model -\tcode{\libconcept{StrictTotallyOrderedWith}} only if +\tcode{\libconcept{totally_ordered_with}} only if \begin{itemize} \item \tcode{bool(t < u) == bool(C(t) < C(u)).} diff --git a/source/ranges.tex b/source/ranges.tex index fd74785338..4a40f20b19 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1927,7 +1927,7 @@ \expects \tcode{Bound} denotes \tcode{unreachable_sentinel_t} or \tcode{bound} is reachable from \tcode{value}. -When \tcode{W} and \tcode{Bound} model \libconcept{StrictTotallyOrderedWith}, +When \tcode{W} and \tcode{Bound} model \libconcept{totally_ordered_with}, then \tcode{bool(value <= bound)} is \tcode{true}. \pnum diff --git a/source/support.tex b/source/support.tex index 6a79a7bfde..340d836c63 100644 --- a/source/support.tex +++ b/source/support.tex @@ -4853,7 +4853,7 @@ \item if \tcode{Cat} is convertible to \tcode{strong_ordering}, \tcode{T} and \tcode{U} model - \tcode{\libconcept{StrictTotallyOrderedWith}}\iref{concept.stricttotallyordered}. + \tcode{\libconcept{totally_ordered_with}}\iref{concept.stricttotallyordered}. \end{itemize} \rSec2[cmp.result]{Result of three-way comparison} diff --git a/source/utilities.tex b/source/utilities.tex index 1f86e0eb2d..475a9a7e7d 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -14729,7 +14729,7 @@ \begin{itemdecl} struct ranges::greater { template - requires StrictTotallyOrderedWith || @\placeholdernc{BUILTIN-PTR-CMP}@(U, <, T) + requires totally_ordered_with || @\placeholdernc{BUILTIN-PTR-CMP}@(U, <, T) constexpr bool operator()(T&& t, U&& u) const; using is_transparent = @\unspecnc@; @@ -14748,7 +14748,7 @@ \begin{itemdecl} struct ranges::less { template - requires StrictTotallyOrderedWith || @\placeholdernc{BUILTIN-PTR-CMP}@(T, <, U) + requires totally_ordered_with || @\placeholdernc{BUILTIN-PTR-CMP}@(T, <, U) constexpr bool operator()(T&& t, U&& u) const; using is_transparent = @\unspecnc@; @@ -14789,7 +14789,7 @@ \begin{itemdecl} struct ranges::greater_equal { template - requires StrictTotallyOrderedWith || @\placeholdernc{BUILTIN-PTR-CMP}@(T, <, U) + requires totally_ordered_with || @\placeholdernc{BUILTIN-PTR-CMP}@(T, <, U) constexpr bool operator()(T&& t, U&& u) const; using is_transparent = @\unspecnc@; @@ -14808,7 +14808,7 @@ \begin{itemdecl} struct ranges::less_equal { template - requires StrictTotallyOrderedWith || @\placeholdernc{BUILTIN-PTR-CMP}@(U, <, T) + requires totally_ordered_with || @\placeholdernc{BUILTIN-PTR-CMP}@(U, <, T) constexpr bool operator()(T&& t, U&& u) const; using is_transparent = @\unspecnc@; From 9822b709752b4c84a5233ba9beab88e8455f7277 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:26:43 -0700 Subject: [PATCH 25/84] [everywhere] Rename concept 'Movable' to 'movable'. --- source/concepts.tex | 10 +++++----- source/iterators.tex | 4 ++-- source/ranges.tex | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 307d93c96e..dc42a151e7 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -231,7 +231,7 @@ // \ref{concepts.object}, object concepts template - concept Movable = @\seebelow@; + concept movable = @\seebelow@; template concept Copyable = @\seebelow@; template @@ -822,7 +822,7 @@ \begin{itemdecl} template concept boolean = - Movable> && // (see \ref{concepts.object}) + movable> && // (see \ref{concepts.object}) requires(const remove_reference_t& b1, const remove_reference_t& b2, const bool a) { { b1 } -> convertible_to; @@ -1038,15 +1038,15 @@ This subclause describes concepts that specify the basis of the value-oriented programming style on which the library is based. -\indexlibrary{\idxcode{Movable}}% +\indexlibrary{\idxcode{movable}}% \indexlibrary{\idxcode{Copyable}}% \indexlibrary{\idxcode{Semiregular}}% \indexlibrary{\idxcode{Regular}}% \begin{itemdecl} template - concept Movable = is_object_v && move_constructible && assignable_from && swappable; + concept movable = is_object_v && move_constructible && assignable_from && swappable; template - concept Copyable = copy_constructible && Movable && assignable_from; + concept Copyable = copy_constructible && movable && assignable_from; template concept Semiregular = Copyable && default_constructible; template diff --git a/source/iterators.tex b/source/iterators.tex index 98c253380b..86e8d2ade5 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -1288,7 +1288,7 @@ template concept WeaklyIncrementable = - default_constructible && Movable && + default_constructible && movable && requires(I i) { typename iter_difference_t; requires @\placeholdernc{is-signed-integer-like}@>; @@ -2453,7 +2453,7 @@ concept IndirectlyMovableStorable = IndirectlyMovable && Writable> && - Movable> && + movable> && constructible_from, iter_rvalue_reference_t> && assignable_from&, iter_rvalue_reference_t>; \end{codeblock} diff --git a/source/ranges.tex b/source/ranges.tex index 4a40f20b19..e0e836b9f3 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -241,7 +241,7 @@ namespace views { inline constexpr @\unspec@ reverse = @\unspec@; } // \ref{range.istream}, istream view - template> + template> requires @\seebelow@ class basic_istream_view; template @@ -5607,7 +5607,7 @@ is >> t; }; - template + template requires default_constructible && @\placeholder{stream-extractable}@ class basic_istream_view : public view_interface> { From 3cf394bb45a791da5283379de5881853ac418943 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:27:13 -0700 Subject: [PATCH 26/84] [everywhere] Rename concept 'Copyable' to 'copyable'. --- source/algorithms.tex | 12 ++++++------ source/concepts.tex | 8 ++++---- source/iterators.tex | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 15782e39a0..e8ecdaa293 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -2636,7 +2636,7 @@ template> Comp = ranges::less> constexpr const T& min(const T& a, const T& b, Comp comp = {}, Proj proj = {}); - template> Comp = ranges::less> constexpr T min(initializer_list r, Comp comp = {}, Proj proj = {}); template> Comp = ranges::less> constexpr const T& max(const T& a, const T& b, Comp comp = {}, Proj proj = {}); - template> Comp = ranges::less> constexpr T max(initializer_list r, Comp comp = {}, Proj proj = {}); template> Comp = ranges::less> constexpr minmax_result minmax(const T& a, const T& b, Comp comp = {}, Proj proj = {}); - template> Comp = ranges::less> constexpr minmax_result minmax(initializer_list r, Comp comp = {}, Proj proj = {}); @@ -7909,7 +7909,7 @@ template constexpr T min(initializer_list r, Compare comp); -template> Comp = ranges::less> constexpr T ranges::min(initializer_list r, Comp comp = {}, Proj proj = {}); template constexpr T max(initializer_list r, Compare comp); -template> Comp = ranges::less> constexpr T ranges::max(initializer_list r, Comp comp = {}, Proj proj = {}); template constexpr pair minmax(initializer_list t, Compare comp); -template> Comp = ranges::less> constexpr ranges::minmax_result ranges::minmax(initializer_list r, Comp comp = {}, Proj proj = {}); diff --git a/source/concepts.tex b/source/concepts.tex index dc42a151e7..63d0b0ab8d 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -233,7 +233,7 @@ template concept movable = @\seebelow@; template - concept Copyable = @\seebelow@; + concept copyable = @\seebelow@; template concept Semiregular = @\seebelow@; template @@ -1039,16 +1039,16 @@ value-oriented programming style on which the library is based. \indexlibrary{\idxcode{movable}}% -\indexlibrary{\idxcode{Copyable}}% +\indexlibrary{\idxcode{copyable}}% \indexlibrary{\idxcode{Semiregular}}% \indexlibrary{\idxcode{Regular}}% \begin{itemdecl} template concept movable = is_object_v && move_constructible && assignable_from && swappable; template - concept Copyable = copy_constructible && movable && assignable_from; + concept copyable = copy_constructible && movable && assignable_from; template - concept Semiregular = Copyable && default_constructible; + concept Semiregular = copyable && default_constructible; template concept Regular = Semiregular && equality_comparable; \end{itemdecl} diff --git a/source/iterators.tex b/source/iterators.tex index 86e8d2ade5..cc8cadf981 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -855,7 +855,7 @@ \begin{codeblock} template concept @\placeholder{cpp17-iterator}@ = - Copyable && requires(I i) { + copyable && requires(I i) { { *i } -> @\placeholder{can-reference}@; { ++i } -> same_as; { *i++ } -> @\placeholder{can-reference}@; @@ -2498,7 +2498,7 @@ concept IndirectlyCopyableStorable = IndirectlyCopyable && Writable&> && - Copyable> && + copyable> && constructible_from, iter_reference_t> && assignable_from&, iter_reference_t>; \end{codeblock} From 69b71c8d1556e1ffd9865160b47873caab72ad2c Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:27:37 -0700 Subject: [PATCH 27/84] [everywhere] Rename concept 'Semiregular' to 'semiregular'. --- source/concepts.tex | 10 +++++----- source/iterators.tex | 8 ++++---- source/lib-intro.tex | 2 +- source/ranges.tex | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 63d0b0ab8d..66ea4644e2 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -235,7 +235,7 @@ template concept copyable = @\seebelow@; template - concept Semiregular = @\seebelow@; + concept semiregular = @\seebelow@; template concept Regular = @\seebelow@; @@ -1040,7 +1040,7 @@ \indexlibrary{\idxcode{movable}}% \indexlibrary{\idxcode{copyable}}% -\indexlibrary{\idxcode{Semiregular}}% +\indexlibrary{\idxcode{semiregular}}% \indexlibrary{\idxcode{Regular}}% \begin{itemdecl} template @@ -1048,15 +1048,15 @@ template concept copyable = copy_constructible && movable && assignable_from; template - concept Semiregular = copyable && default_constructible; + concept semiregular = copyable && default_constructible; template - concept Regular = Semiregular && equality_comparable; + concept Regular = semiregular && equality_comparable; \end{itemdecl} \begin{itemdescr} \pnum \begin{note} -The \libconcept{Semiregular} concept is modeled by types that behave similarly +The \libconcept{semiregular} concept is modeled by types that behave similarly to built-in types like \tcode{int}, except that they might not be comparable with \tcode{==}. \end{note} diff --git a/source/iterators.tex b/source/iterators.tex index cc8cadf981..d9ca4a57cb 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -363,7 +363,7 @@ template constexpr move_iterator make_move_iterator(Iterator i); - template class move_sentinel; + template class move_sentinel; // \ref{iterators.common}, common iterators template S> @@ -1498,14 +1498,14 @@ \pnum The \libconcept{Sentinel} concept specifies the relationship -between an \libconcept{Iterator} type and a \libconcept{Semiregular} type +between an \libconcept{Iterator} type and a \libconcept{semiregular} type whose values denote a range. \indexlibrary{\idxcode{Sentinel}}% \begin{itemdecl} template concept Sentinel = - Semiregular && + semiregular && Iterator && @\placeholder{weakly-equality-comparable-with}@; // See \ref{concept.equalitycomparable} \end{itemdecl} @@ -4550,7 +4550,7 @@ \indexlibrary{\idxcode{move_sentinel}}% \begin{codeblock} namespace std { - template + template class move_sentinel { public: constexpr move_sentinel(); diff --git a/source/lib-intro.tex b/source/lib-intro.tex index e4823ad96d..3c237f9c38 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1011,7 +1011,7 @@ \pnum The type of a customization point object shall model -\libconcept{Semiregular}\iref{concepts.object}. +\libconcept{semiregular}\iref{concepts.object}. \pnum All instances of a specific customization point object type shall diff --git a/source/ranges.tex b/source/ranges.tex index e0e836b9f3..21f6f38797 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -144,7 +144,7 @@ namespace views { inline constexpr @\unspec@ single = @\unspec@; } // \ref{range.iota}, iota view - template + template requires @\placeholder{weakly-equality-comparable-with}@ class iota_view; @@ -905,7 +905,7 @@ \begin{itemdecl} template concept View = - Range && Semiregular && enable_view; + Range && semiregular && enable_view; \end{itemdecl} \begin{itemdescr} @@ -1775,7 +1775,7 @@ concept @\placeholdernc{Advanceable}@ = // \expos @\seebelow@; - template + template requires @\placeholdernc{weakly-equality-comparable-with}@ class iota_view : public view_interface> { private: From d991fc4ed58e99c73e0e2b7714bf6f192f281406 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:27:59 -0700 Subject: [PATCH 28/84] [everywhere] Rename concept 'Regular' to 'regular'. --- source/concepts.tex | 8 ++++---- source/iterators.tex | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 66ea4644e2..d9379667cc 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -237,7 +237,7 @@ template concept semiregular = @\seebelow@; template - concept Regular = @\seebelow@; + concept regular = @\seebelow@; // \ref{concepts.callable}, callable concepts // \ref{concept.invocable}, concept \libconcept{Invocable} @@ -1041,7 +1041,7 @@ \indexlibrary{\idxcode{movable}}% \indexlibrary{\idxcode{copyable}}% \indexlibrary{\idxcode{semiregular}}% -\indexlibrary{\idxcode{Regular}}% +\indexlibrary{\idxcode{regular}}% \begin{itemdecl} template concept movable = is_object_v && move_constructible && assignable_from && swappable; @@ -1050,7 +1050,7 @@ template concept semiregular = copyable && default_constructible; template - concept Regular = semiregular && equality_comparable; + concept regular = semiregular && equality_comparable; \end{itemdecl} \begin{itemdescr} @@ -1063,7 +1063,7 @@ \pnum \begin{note} -The \libconcept{Regular} concept is modeled by types that behave similarly to +The \libconcept{regular} concept is modeled by types that behave similarly to built-in types like \tcode{int} and that are comparable with \tcode{==}. \end{note} diff --git a/source/iterators.tex b/source/iterators.tex index d9ca4a57cb..361e2d8ca2 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -1356,7 +1356,7 @@ \pnum All integer-class types model -\libconcept{Regular}\iref{concepts.object} and +\libconcept{regular}\iref{concepts.object} and \libconcept{totally_ordered}\iref{concept.stricttotallyordered}. \pnum @@ -1439,7 +1439,7 @@ \begin{codeblock} template concept Incrementable = - Regular && + regular && WeaklyIncrementable && requires(I i) { { i++ } -> same_as; From 514b07210d915e4b10b2dadaa1ad5649152c0621 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:29:05 -0700 Subject: [PATCH 29/84] [everywhere] Rename concept 'Invocable' to 'invocable'. --- source/algorithms.tex | 12 ++++++------ source/concepts.tex | 20 ++++++++++---------- source/iterators.tex | 8 ++++---- source/lib-intro.tex | 2 +- source/numerics.tex | 2 +- source/threads.tex | 4 ++-- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index e8ecdaa293..0863edd39a 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1506,13 +1506,13 @@ namespace ranges { template S, copy_constructible F> - requires Invocable && Writable> + requires invocable && Writable> constexpr O generate(O first, S last, F gen); template - requires Invocable && OutputRange> + requires invocable && OutputRange> constexpr safe_iterator_t generate(R&& r, F gen); template - requires Invocable && Writable> + requires invocable && Writable> constexpr O generate_n(O first, iter_difference_t n, F gen); } @@ -4911,13 +4911,13 @@ ForwardIterator first, Size n, Generator gen); template S, copy_constructible F> - requires Invocable && Writable> + requires invocable && Writable> constexpr O ranges::generate(O first, S last, F gen); template - requires Invocable && OutputRange> + requires invocable && OutputRange> constexpr safe_iterator_t ranges::generate(R&& r, F gen); template - requires Invocable && Writable> + requires invocable && Writable> constexpr O ranges::generate_n(O first, iter_difference_t n, F gen); \end{itemdecl} diff --git a/source/concepts.tex b/source/concepts.tex index d9379667cc..c6b2b558cf 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -240,9 +240,9 @@ concept regular = @\seebelow@; // \ref{concepts.callable}, callable concepts - // \ref{concept.invocable}, concept \libconcept{Invocable} + // \ref{concept.invocable}, concept \libconcept{invocable} template - concept Invocable = @\seebelow@; + concept invocable = @\seebelow@; // \ref{concept.regularinvocable}, concept \libconcept{RegularInvocable} template @@ -1077,17 +1077,17 @@ The concepts in this subclause describe the requirements on function objects\iref{function.objects} and their arguments. -\rSec2[concept.invocable]{Concept \libconcept{Invocable}} +\rSec2[concept.invocable]{Concept \libconcept{invocable}} \pnum -The \libconcept{Invocable} concept specifies a relationship between a callable +The \libconcept{invocable} concept specifies a relationship between a callable type\iref{func.def} \tcode{F} and a set of argument types \tcode{Args...} which can be evaluated by the library function \tcode{invoke}\iref{func.invoke}. -\indexlibrary{\idxcode{Invocable}}% +\indexlibrary{\idxcode{invocable}}% \begin{itemdecl} template - concept Invocable = requires(F&& f, Args&&... args) { + concept invocable = requires(F&& f, Args&&... args) { invoke(std::forward(f), std::forward(args)...); // not required to be equality-preserving }; \end{itemdecl} @@ -1095,7 +1095,7 @@ \begin{itemdescr} \pnum \begin{example} -A function that generates random numbers can model \libconcept{Invocable}, +A function that generates random numbers can model \libconcept{invocable}, since the \tcode{invoke} function call expression is not required to be equality-preserving\iref{concepts.equality}. \end{example} @@ -1106,7 +1106,7 @@ \indexlibrary{\idxcode{RegularInvocable}}% \begin{itemdecl} template - concept RegularInvocable = Invocable; + concept RegularInvocable = invocable; \end{itemdecl} \begin{itemdescr} @@ -1116,7 +1116,7 @@ arguments\iref{concepts.equality}. \begin{note} This requirement supersedes the annotation in the definition of -\libconcept{Invocable}. +\libconcept{invocable}. \end{note} \pnum @@ -1126,7 +1126,7 @@ \pnum \begin{note} -The distinction between \libconcept{Invocable} and \libconcept{RegularInvocable} +The distinction between \libconcept{invocable} and \libconcept{RegularInvocable} is purely semantic. \end{note} \end{itemdescr} diff --git a/source/iterators.tex b/source/iterators.tex index 361e2d8ca2..08af337de9 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -158,7 +158,7 @@ concept IndirectStrictWeakOrder = @\seebelow@; template - requires (Readable && ...) && Invocable...> + requires (Readable && ...) && invocable...> using indirect_result_t = invoke_result_t...>; // \ref{projected}, projected @@ -2324,9 +2324,9 @@ concept IndirectUnaryInvocable = Readable && copy_constructible && - Invocable&> && - Invocable> && - Invocable> && + invocable&> && + invocable> && + invocable> && common_reference_with< invoke_result_t&>, invoke_result_t>>; diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 3c237f9c38..170f3481ef 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1019,7 +1019,7 @@ \pnum The type \tcode{T} of a customization point object shall model -\tcode{\libconcept{Invocable}}\iref{concept.invocable} +\tcode{\libconcept{invocable}}\iref{concept.invocable} when the types in \tcode{Args...} meet the requirements specified in that customization point object's definition. When the types of \tcode{Args...} do not meet the customization point object's requirements, \tcode{T} shall not have diff --git a/source/numerics.tex b/source/numerics.tex index f53abf9bed..5ee9e4164e 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -2154,7 +2154,7 @@ \begin{codeblock} template concept UniformRandomBitGenerator = - Invocable && unsigned_integral> && + invocable && unsigned_integral> && requires { { G::min() } -> same_as>; { G::max() } -> same_as>; diff --git a/source/threads.tex b/source/threads.tex index 4418343834..3776e2f49a 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -852,14 +852,14 @@ \mandates \tcode{stop_callback} is instantiated with an argument for the template parameter \tcode{Callback} -that satisfies both \tcode{Invocable} +that satisfies both \tcode{invocable} and \tcode{destructible}. \pnum \expects \tcode{stop_callback} is instantiated with an argument for the template parameter \tcode{Callback} -that models both \tcode{Invocable} +that models both \tcode{invocable} and \tcode{destructible}. From 1f8f9def007a4a840b7e9c35fea2492b099c4dc1 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:29:34 -0700 Subject: [PATCH 30/84] [everywhere] Rename concept 'RegularInvocable' to 'regular_invocable'. --- source/concepts.tex | 16 ++++++++-------- source/iterators.tex | 6 +++--- source/ranges.tex | 16 ++++++++-------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index c6b2b558cf..ef9811ba46 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -244,9 +244,9 @@ template concept invocable = @\seebelow@; - // \ref{concept.regularinvocable}, concept \libconcept{RegularInvocable} + // \ref{concept.regularinvocable}, concept \libconcept{regular_invocable} template - concept RegularInvocable = @\seebelow@; + concept regular_invocable = @\seebelow@; // \ref{concept.predicate}, concept \libconcept{Predicate} template @@ -1101,12 +1101,12 @@ \end{example} \end{itemdescr} -\rSec2[concept.regularinvocable]{Concept \libconcept{RegularInvocable}} +\rSec2[concept.regularinvocable]{Concept \libconcept{regular_invocable}} -\indexlibrary{\idxcode{RegularInvocable}}% +\indexlibrary{\idxcode{regular_invocable}}% \begin{itemdecl} template - concept RegularInvocable = invocable; + concept regular_invocable = invocable; \end{itemdecl} \begin{itemdescr} @@ -1121,12 +1121,12 @@ \pnum \begin{example} -A random number generator does not model \libconcept{RegularInvocable}. +A random number generator does not model \libconcept{regular_invocable}. \end{example} \pnum \begin{note} -The distinction between \libconcept{invocable} and \libconcept{RegularInvocable} +The distinction between \libconcept{invocable} and \libconcept{regular_invocable} is purely semantic. \end{note} \end{itemdescr} @@ -1136,7 +1136,7 @@ \indexlibrary{\idxcode{Predicate}}% \begin{itemdecl} template - concept Predicate = RegularInvocable && boolean>; + concept Predicate = regular_invocable && boolean>; \end{itemdecl} \rSec2[concept.relation]{Concept \libconcept{Relation}} diff --git a/source/iterators.tex b/source/iterators.tex index 08af337de9..8aa2ee2a57 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -2335,9 +2335,9 @@ concept IndirectRegularUnaryInvocable = Readable && copy_constructible && - RegularInvocable&> && - RegularInvocable> && - RegularInvocable> && + regular_invocable&> && + regular_invocable> && + regular_invocable> && common_reference_with< invoke_result_t&>, invoke_result_t>>; diff --git a/source/ranges.tex b/source/ranges.tex index 21f6f38797..7a4033429c 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -170,7 +170,7 @@ // \ref{range.transform}, transform view template requires View && is_object_v && - RegularInvocable> + regular_invocable> class transform_view; namespace views { inline constexpr @\unspec@ transform = @\unspec@; } @@ -3051,7 +3051,7 @@ namespace std::ranges { template requires View && is_object_v && - RegularInvocable> + regular_invocable> class transform_view : public view_interface> { private: // \ref{range.transform.iterator}, class template \tcode{transform_view::iterator} @@ -3074,16 +3074,16 @@ constexpr iterator begin(); constexpr iterator begin() const requires Range && - RegularInvocable>; + regular_invocable>; constexpr sentinel end(); constexpr iterator end() requires CommonRange; constexpr sentinel end() const requires Range && - RegularInvocable>; + regular_invocable>; constexpr iterator end() const requires CommonRange && - RegularInvocable>; + regular_invocable>; constexpr auto size() requires SizedRange { return ranges::size(base_); } constexpr auto size() const requires SizedRange @@ -3146,7 +3146,7 @@ \begin{itemdecl} constexpr iterator begin() const requires Range && - RegularInvocable>; + regular_invocable>; \end{itemdecl} \begin{itemdescr} @@ -3187,7 +3187,7 @@ \begin{itemdecl} constexpr sentinel end() const requires Range && - RegularInvocable>; + regular_invocable>; \end{itemdecl} \begin{itemdescr} @@ -3202,7 +3202,7 @@ \begin{itemdecl} constexpr iterator end() const requires CommonRange && - RegularInvocable>; + regular_invocable>; \end{itemdecl} \begin{itemdescr} From 58f66a776a679abea5853eb7dbae143924fd3443 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:32:34 -0700 Subject: [PATCH 31/84] [everywhere] Rename concept 'Predicate' to 'predicate'. --- source/concepts.tex | 14 +++++++------- source/iterators.tex | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index ef9811ba46..a39c8751ba 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -248,9 +248,9 @@ template concept regular_invocable = @\seebelow@; - // \ref{concept.predicate}, concept \libconcept{Predicate} + // \ref{concept.predicate}, concept \libconcept{predicate} template - concept Predicate = @\seebelow@; + concept predicate = @\seebelow@; // \ref{concept.relation}, concept \libconcept{Relation} template @@ -1131,12 +1131,12 @@ \end{note} \end{itemdescr} -\rSec2[concept.predicate]{Concept \libconcept{Predicate}} +\rSec2[concept.predicate]{Concept \libconcept{predicate}} -\indexlibrary{\idxcode{Predicate}}% +\indexlibrary{\idxcode{predicate}}% \begin{itemdecl} template - concept Predicate = regular_invocable && boolean>; + concept predicate = regular_invocable && boolean>; \end{itemdecl} \rSec2[concept.relation]{Concept \libconcept{Relation}} @@ -1145,8 +1145,8 @@ \begin{itemdecl} template concept Relation = - Predicate && Predicate && - Predicate && Predicate; + predicate && predicate && + predicate && predicate; \end{itemdecl} \rSec2[concept.strictweakorder]{Concept \libconcept{StrictWeakOrder}} diff --git a/source/iterators.tex b/source/iterators.tex index 8aa2ee2a57..efe277e74e 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -2346,9 +2346,9 @@ concept IndirectUnaryPredicate = Readable && copy_constructible && - Predicate&> && - Predicate> && - Predicate>; + predicate&> && + predicate> && + predicate>; template concept IndirectRelation = From 458af63c9bf22c8716181c12931d7d0fe8180fac Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:33:17 -0700 Subject: [PATCH 32/84] [everywhere] Rename concept 'Relation' to 'relation'. --- source/concepts.tex | 16 ++++++++-------- source/iterators.tex | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index a39c8751ba..6691a7cba9 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -252,9 +252,9 @@ template concept predicate = @\seebelow@; - // \ref{concept.relation}, concept \libconcept{Relation} + // \ref{concept.relation}, concept \libconcept{relation} template - concept Relation = @\seebelow@; + concept relation = @\seebelow@; // \ref{concept.strictweakorder}, concept \libconcept{StrictWeakOrder} template @@ -1139,27 +1139,27 @@ concept predicate = regular_invocable && boolean>; \end{itemdecl} -\rSec2[concept.relation]{Concept \libconcept{Relation}} +\rSec2[concept.relation]{Concept \libconcept{relation}} -\indexlibrary{\idxcode{Relation}}% +\indexlibrary{\idxcode{relation}}% \begin{itemdecl} template - concept Relation = + concept relation = predicate && predicate && predicate && predicate; \end{itemdecl} \rSec2[concept.strictweakorder]{Concept \libconcept{StrictWeakOrder}} -\indexlibrary{\idxcode{Relation}}% +\indexlibrary{\idxcode{StrictWeakOrder}}% \begin{itemdecl} template - concept StrictWeakOrder = Relation; + concept StrictWeakOrder = relation; \end{itemdecl} \begin{itemdescr} \pnum -A \libconcept{Relation} models \libconcept{StrictWeakOrder} only if +A \libconcept{relation} models \libconcept{StrictWeakOrder} only if it imposes a \term{strict weak ordering} on its arguments. \pnum diff --git a/source/iterators.tex b/source/iterators.tex index efe277e74e..e167a6cc13 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -2354,11 +2354,11 @@ concept IndirectRelation = Readable && Readable && copy_constructible && - Relation&, iter_value_t&> && - Relation&, iter_reference_t> && - Relation, iter_value_t&> && - Relation, iter_reference_t> && - Relation, iter_common_reference_t>; + relation&, iter_value_t&> && + relation&, iter_reference_t> && + relation, iter_value_t&> && + relation, iter_reference_t> && + relation, iter_common_reference_t>; template concept IndirectStrictWeakOrder = From 2fc3c8ad86a2320f23647478f1c386cb3ad356fc Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:34:04 -0700 Subject: [PATCH 33/84] [everywhere] Rename concept 'StrictWeakOrder' to 'strict_weak_order'. --- source/concepts.tex | 12 ++++++------ source/iterators.tex | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 6691a7cba9..72d4811195 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -256,9 +256,9 @@ template concept relation = @\seebelow@; - // \ref{concept.strictweakorder}, concept \libconcept{StrictWeakOrder} + // \ref{concept.strictweakorder}, concept \libconcept{strict_weak_order} template - concept StrictWeakOrder = @\seebelow@; + concept strict_weak_order = @\seebelow@; } \end{codeblock} @@ -1149,17 +1149,17 @@ predicate && predicate; \end{itemdecl} -\rSec2[concept.strictweakorder]{Concept \libconcept{StrictWeakOrder}} +\rSec2[concept.strictweakorder]{Concept \libconcept{strict_weak_order}} -\indexlibrary{\idxcode{StrictWeakOrder}}% +\indexlibrary{\idxcode{strict_weak_order}}% \begin{itemdecl} template - concept StrictWeakOrder = relation; + concept strict_weak_order = relation; \end{itemdecl} \begin{itemdescr} \pnum -A \libconcept{relation} models \libconcept{StrictWeakOrder} only if +A \libconcept{relation} models \libconcept{strict_weak_order} only if it imposes a \term{strict weak ordering} on its arguments. \pnum diff --git a/source/iterators.tex b/source/iterators.tex index e167a6cc13..48f08fe44b 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -2364,11 +2364,11 @@ concept IndirectStrictWeakOrder = Readable && Readable && copy_constructible && - StrictWeakOrder&, iter_value_t&> && - StrictWeakOrder&, iter_reference_t> && - StrictWeakOrder, iter_value_t&> && - StrictWeakOrder, iter_reference_t> && - StrictWeakOrder, iter_common_reference_t>; + strict_weak_order&, iter_value_t&> && + strict_weak_order&, iter_reference_t> && + strict_weak_order, iter_value_t&> && + strict_weak_order, iter_reference_t> && + strict_weak_order, iter_common_reference_t>; } \end{codeblock} From 3fcab1ca489c5d7bd996aadb6aa13fee6448d80c Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:34:43 -0700 Subject: [PATCH 34/84] [everywhere] Rename concept 'Readable' to 'readable'. --- source/iterators.tex | 72 ++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/source/iterators.tex b/source/iterators.tex index 48f08fe44b..cdd30c4304 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -81,11 +81,11 @@ = decltype(ranges::iter_move(declval())); // \ref{iterator.concepts}, iterator concepts - // \ref{iterator.concept.readable}, concept \libconcept{Readable} + // \ref{iterator.concept.readable}, concept \libconcept{readable} template - concept Readable = @\seebelow@; + concept readable = @\seebelow@; - template + template using iter_common_reference_t = common_reference_t, iter_value_t&>; @@ -158,11 +158,11 @@ concept IndirectStrictWeakOrder = @\seebelow@; template - requires (Readable && ...) && invocable...> + requires (readable && ...) && invocable...> using indirect_result_t = invoke_result_t...>; // \ref{projected}, projected - template Proj> + template Proj> struct projected; template @@ -730,7 +730,7 @@ To implement algorithms only in terms of readable types, it is often necessary to determine the value type that corresponds to a particular readable type. Accordingly, it is required that if \tcode{R} is the name of a type that -models the \libconcept{Readable} concept\iref{iterator.concept.readable}, +models the \libconcept{readable} concept\iref{iterator.concept.readable}, the type \begin{codeblock} iter_value_t @@ -795,15 +795,15 @@ \pnum \begin{note} Some legacy output iterators define a nested type named \tcode{value_type} -that is an alias for \tcode{void}. These types are not \tcode{Readable} +that is an alias for \tcode{void}. These types are not \tcode{readable} and have no associated value types. \end{note} \pnum \begin{note} -Smart pointers like \tcode{shared_ptr} are \tcode{Readable} and +Smart pointers like \tcode{shared_ptr} are \tcode{readable} and have an associated value type, but a smart pointer like \tcode{shared_ptr} -is not \tcode{Readable} and has no associated value type. +is not \tcode{readable} and has no associated value type. \end{note} \rSec3[iterator.traits]{Iterator traits} @@ -1120,7 +1120,7 @@ ill-formed with no diagnostic required. \item Otherwise, if the types of \tcode{E1} and \tcode{E2} each model -\tcode{Readable}, and if the reference types of \tcode{E1} and \tcode{E2} +\tcode{readable}, and if the reference types of \tcode{E1} and \tcode{E2} model \libconcept{swappable_with}\iref{concept.swappable}, then \tcode{ranges::swap(*E1, *E2)}. @@ -1187,17 +1187,17 @@ and \tcode{\placeholder{ITER_CONCEPT}(I)} denotes \tcode{random_access_iterator_tag}. \end{example} -\rSec3[iterator.concept.readable]{Concept \libconcept{Readable}} +\rSec3[iterator.concept.readable]{Concept \libconcept{readable}} \pnum Types that are readable by applying \tcode{operator*} -model the \libconcept{Readable} concept, including +model the \libconcept{readable} concept, including pointers, smart pointers, and iterators. -\indexlibrary{\idxcode{Readable}}% +\indexlibrary{\idxcode{readable}}% \begin{codeblock} template - concept Readable = + concept readable = requires { typename iter_value_t; typename iter_reference_t; @@ -1209,7 +1209,7 @@ \end{codeblock} \pnum -Given a value \tcode{i} of type \tcode{I}, \tcode{I} models \libconcept{Readable} +Given a value \tcode{i} of type \tcode{I}, \tcode{I} models \libconcept{readable} only if the expression \tcode{*i} is equality-preserving. \begin{note} The expression \tcode{*i} is indirectly required to be valid via the @@ -1243,7 +1243,7 @@ \begin{itemize} \item If \tcode{Out} and \tcode{T} model - \tcode{Readable \&\& same_as, decay_t{>}}, + \tcode{readable \&\& same_as, decay_t{>}}, then \tcode{*o} after any above assignment is equal to the value of \tcode{E} before the assignment. \end{itemize} @@ -1606,7 +1606,7 @@ \pnum The \libconcept{InputIterator} concept defines requirements for a type whose referenced values can be read (from the requirement for -\libconcept{Readable}\iref{iterator.concept.readable}) and which can be both pre- and +\libconcept{readable}\iref{iterator.concept.readable}) and which can be both pre- and post-incremented. \begin{note} Unlike the \oldconcept{InputIterator} requirements\iref{input.iterators}, @@ -1619,7 +1619,7 @@ template concept InputIterator = Iterator && - Readable && + readable && requires { typename @\placeholdernc{ITER_CONCEPT}@(I); } && derived_from<@\placeholdernc{ITER_CONCEPT}@(I), input_iterator_tag>; \end{codeblock} @@ -2322,7 +2322,7 @@ namespace std { template concept IndirectUnaryInvocable = - Readable && + readable && copy_constructible && invocable&> && invocable> && @@ -2333,7 +2333,7 @@ template concept IndirectRegularUnaryInvocable = - Readable && + readable && copy_constructible && regular_invocable&> && regular_invocable> && @@ -2344,7 +2344,7 @@ template concept IndirectUnaryPredicate = - Readable && + readable && copy_constructible && predicate&> && predicate> && @@ -2352,7 +2352,7 @@ template concept IndirectRelation = - Readable && Readable && + readable && readable && copy_constructible && relation&, iter_value_t&> && relation&, iter_reference_t> && @@ -2362,7 +2362,7 @@ template concept IndirectStrictWeakOrder = - Readable && Readable && + readable && readable && copy_constructible && strict_weak_order&, iter_value_t&> && strict_weak_order&, iter_reference_t> && @@ -2377,15 +2377,15 @@ \pnum Class template \tcode{projected} is used to constrain algorithms that accept callable objects and projections\iref{defns.projection}. -It combines a \libconcept{Readable} type \tcode{I} and -a callable object type \tcode{Proj} into a new \libconcept{Readable} type +It combines a \libconcept{readable} type \tcode{I} and +a callable object type \tcode{Proj} into a new \libconcept{readable} type whose \tcode{reference} type is the result of applying \tcode{Proj} to the \tcode{iter_reference_t} of \tcode{I}. \indexlibrary{\idxcode{projected}}% \begin{codeblock} namespace std { - template Proj> + template Proj> struct projected { using value_type = remove_cvref_t>; indirect_result_t operator*() const; // \notdef @@ -2407,7 +2407,7 @@ to families of algorithms. These group together iterator requirements of algorithm families. There are three relational concepts that specify -how element values are transferred between \libconcept{Readable} and +how element values are transferred between \libconcept{readable} and \libconcept{Writable} types: \libconcept{IndirectlyMovable}, \libconcept{IndirectlyCopyable}, and @@ -2430,14 +2430,14 @@ \pnum The \libconcept{IndirectlyMovable} concept specifies the relationship between -a \libconcept{Readable} type and a \libconcept{Writable} type between which +a \libconcept{readable} type and a \libconcept{Writable} type between which values may be moved. \indexlibrary{\idxcode{IndirectlyMovable}}% \begin{codeblock} template concept IndirectlyMovable = - Readable && + readable && Writable>; \end{codeblock} @@ -2445,7 +2445,7 @@ The \libconcept{IndirectlyMovableStorable} concept augments \libconcept{IndirectlyMovable} with additional requirements enabling the transfer to be performed through an intermediate object of the -\libconcept{Readable} type's value type. +\libconcept{readable} type's value type. \indexlibrary{\idxcode{IndirectlyMovableStorable}}% \begin{codeblock} @@ -2474,14 +2474,14 @@ \pnum The \libconcept{IndirectlyCopyable} concept specifies the relationship between -a \libconcept{Readable} type and a \libconcept{Writable} type between which +a \libconcept{readable} type and a \libconcept{Writable} type between which values may be copied. \indexlibrary{\idxcode{IndirectlyCopyable}}% \begin{codeblock} template concept IndirectlyCopyable = - Readable && + readable && Writable>; \end{codeblock} @@ -2489,7 +2489,7 @@ The \libconcept{IndirectlyCopyableStorable} concept augments \libconcept{IndirectlyCopyable} with additional requirements enabling the transfer to be performed through an intermediate object of the -\libconcept{Readable} type's value type. It also requires the capability +\libconcept{readable} type's value type. It also requires the capability to make copies of values. \indexlibrary{\idxcode{IndirectlyCopyableStorable}}% @@ -2519,13 +2519,13 @@ \pnum The \libconcept{IndirectlySwappable} concept specifies a swappable relationship -between the values referenced by two \libconcept{Readable} types. +between the values referenced by two \libconcept{readable} types. \indexlibrary{\idxcode{IndirectlySwappable}}% \begin{codeblock} template concept IndirectlySwappable = - Readable && Readable && + readable && readable && requires(I1& i1, I2& i2) { ranges::iter_swap(i1, i1); ranges::iter_swap(i2, i2); @@ -4840,7 +4840,7 @@ \pnum The expression in the requires clause is equivalent to: \begin{codeblock} -Readable && +readable && (requires(const I& i) { i.operator->(); } || is_reference_v> || constructible_from, iter_reference_t>) From 2283c9f974bea80f08e10f73009867c5a2ffa281 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:38:09 -0700 Subject: [PATCH 35/84] [everywhere] Rename concept 'Writable' to 'writable'. --- source/algorithms.tex | 40 ++++++++++++++++++++-------------------- source/iterators.tex | 36 ++++++++++++++++++------------------ 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 0863edd39a..56a61c4215 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1327,12 +1327,12 @@ template S, WeaklyIncrementable O, copy_constructible F, class Proj = identity> - requires Writable>> + requires writable>> constexpr unary_transform_result transform(I first1, S last1, O result, F op, Proj proj = {}); template - requires Writable, Proj>>> + requires writable, Proj>>> constexpr unary_transform_result, O> transform(R&& r, O result, F op, Proj proj = {}); @@ -1360,14 +1360,14 @@ template S1, InputIterator I2, Sentinel S2, WeaklyIncrementable O, copy_constructible F, class Proj1 = identity, class Proj2 = identity> - requires Writable, + requires writable, projected>> constexpr binary_transform_result transform(I1 first1, S1 last1, I2 first2, S2 last2, O result, F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires Writable, Proj1>, + requires writable, Proj1>, projected, Proj2>>> constexpr binary_transform_result, safe_iterator_t, O> transform(R1&& r1, R2&& r2, O result, @@ -1392,22 +1392,22 @@ namespace ranges { template S, class T1, class T2, class Proj = identity> - requires Writable && + requires writable && IndirectRelation, const T1*> constexpr I replace(I first, S last, const T1& old_value, const T2& new_value, Proj proj = {}); template - requires Writable, const T2&> && + requires writable, const T2&> && IndirectRelation, Proj>, const T1*> constexpr safe_iterator_t replace(R&& r, const T1& old_value, const T2& new_value, Proj proj = {}); template S, class T, class Proj = identity, IndirectUnaryPredicate> Pred> - requires Writable + requires writable constexpr I replace_if(I first, S last, Pred pred, const T& new_value, Proj proj = {}); template, Proj>> Pred> - requires Writable, const T&> + requires writable, const T&> constexpr safe_iterator_t replace_if(R&& r, Pred pred, const T& new_value, Proj proj = {}); } @@ -1506,13 +1506,13 @@ namespace ranges { template S, copy_constructible F> - requires invocable && Writable> + requires invocable && writable> constexpr O generate(O first, S last, F gen); template requires invocable && OutputRange> constexpr safe_iterator_t generate(R&& r, F gen); template - requires invocable && Writable> + requires invocable && writable> constexpr O generate_n(O first, iter_difference_t n, F gen); } @@ -4567,25 +4567,25 @@ template S, WeaklyIncrementable O, copy_constructible F, class Proj = identity> - requires Writable>> + requires writable>> constexpr ranges::unary_transform_result ranges::transform(I first1, S last1, O result, F op, Proj proj = {}); template - requires Writable, Proj>>> + requires writable, Proj>>> constexpr ranges::unary_transform_result, O> ranges::transform(R&& r, O result, F op, Proj proj = {}); template S1, InputIterator I2, Sentinel S2, WeaklyIncrementable O, copy_constructible F, class Proj1 = identity, class Proj2 = identity> - requires Writable, + requires writable, projected>> constexpr ranges::binary_transform_result ranges::transform(I1 first1, S1 last1, I2 first2, S2 last2, O result, F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires Writable, Proj1>, + requires writable, Proj1>, projected, Proj2>>> constexpr ranges::binary_transform_result, safe_iterator_t, O> ranges::transform(R1&& r1, R2&& r2, O result, @@ -4685,22 +4685,22 @@ Predicate pred, const T& new_value); template S, class T1, class T2, class Proj = identity> - requires Writable && + requires writable && IndirectRelation, const T1*> constexpr I ranges::replace(I first, S last, const T1& old_value, const T2& new_value, Proj proj = {}); template - requires Writable, const T2&> && + requires writable, const T2&> && IndirectRelation, Proj>, const T1*> constexpr safe_iterator_t ranges::replace(R&& r, const T1& old_value, const T2& new_value, Proj proj = {}); template S, class T, class Proj = identity, IndirectUnaryPredicate> Pred> - requires Writable + requires writable constexpr I ranges::replace_if(I first, S last, Pred pred, const T& new_value, Proj proj = {}); template, Proj>> Pred> - requires Writable, const T&> + requires writable, const T&> constexpr safe_iterator_t ranges::replace_if(R&& r, Pred pred, const T& new_value, Proj proj = {}); \end{itemdecl} @@ -4911,13 +4911,13 @@ ForwardIterator first, Size n, Generator gen); template S, copy_constructible F> - requires invocable && Writable> + requires invocable && writable> constexpr O ranges::generate(O first, S last, F gen); template requires invocable && OutputRange> constexpr safe_iterator_t ranges::generate(R&& r, F gen); template - requires invocable && Writable> + requires invocable && writable> constexpr O ranges::generate_n(O first, iter_difference_t n, F gen); \end{itemdecl} diff --git a/source/iterators.tex b/source/iterators.tex index cdd30c4304..19eac15af2 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -89,9 +89,9 @@ using iter_common_reference_t = common_reference_t, iter_value_t&>; - // \ref{iterator.concept.writable}, concept \libconcept{Writable} + // \ref{iterator.concept.writable}, concept \libconcept{writable} template - concept Writable = @\seebelow@; + concept writable = @\seebelow@; // \ref{iterator.concept.winc}, concept \libconcept{WeaklyIncrementable} template @@ -1216,16 +1216,16 @@ exposition-only \placeholder{dereferenceable} concept\iref{iterator.synopsis}. \end{note} -\rSec3[iterator.concept.writable]{Concept \libconcept{Writable}} +\rSec3[iterator.concept.writable]{Concept \libconcept{writable}} \pnum -The \libconcept{Writable} concept specifies the requirements for writing a value +The \libconcept{writable} concept specifies the requirements for writing a value into an iterator's referenced object. -\indexlibrary{\idxcode{Writable}}% +\indexlibrary{\idxcode{writable}}% \begin{codeblock} template - concept Writable = + concept writable = requires(Out&& o, T&& t) { *o = std::forward(t); // not required to be equality-preserving *std::forward(o) = std::forward(t); // not required to be equality-preserving @@ -1239,7 +1239,7 @@ \pnum Let \tcode{E} be an an expression such that \tcode{decltype((E))} is \tcode{T}, and let \tcode{o} be a dereferenceable object of type \tcode{Out}. -\tcode{Out} and \tcode{T} model \tcode{\libconcept{Writable}} only if +\tcode{Out} and \tcode{T} model \tcode{\libconcept{writable}} only if \begin{itemize} \item If \tcode{Out} and \tcode{T} model @@ -1263,11 +1263,11 @@ \pnum \begin{note} -\tcode{Writable} has the awkward \tcode{const_cast} expressions to reject +\tcode{writable} has the awkward \tcode{const_cast} expressions to reject iterators with prvalue non-proxy reference types that permit rvalue assignment but do not also permit \tcode{const} rvalue assignment. Consequently, an iterator type \tcode{I} that returns \tcode{std::string} -by value does not model \tcode{\libconcept{Writable}}. +by value does not model \tcode{\libconcept{writable}}. \end{note} \rSec3[iterator.concept.winc]{Concept \libconcept{WeaklyIncrementable}} @@ -1629,7 +1629,7 @@ \pnum The \libconcept{OutputIterator} concept defines requirements for a type that can be used to write values (from the requirement for -\libconcept{Writable}\iref{iterator.concept.writable}) and which can be both pre- and post-incremented. +\libconcept{writable}\iref{iterator.concept.writable}) and which can be both pre- and post-incremented. \begin{note} Output iterators are not required to model \libconcept{equality_comparable}. \end{note} @@ -1639,7 +1639,7 @@ template concept OutputIterator = Iterator && - Writable && + writable && requires(I i, T&& t) { *i++ = std::forward(t); // not required to be equality-preserving }; @@ -2408,7 +2408,7 @@ of algorithm families. There are three relational concepts that specify how element values are transferred between \libconcept{readable} and -\libconcept{Writable} types: +\libconcept{writable} types: \libconcept{IndirectlyMovable}, \libconcept{IndirectlyCopyable}, and \libconcept{IndirectlySwappable}. @@ -2430,7 +2430,7 @@ \pnum The \libconcept{IndirectlyMovable} concept specifies the relationship between -a \libconcept{readable} type and a \libconcept{Writable} type between which +a \libconcept{readable} type and a \libconcept{writable} type between which values may be moved. \indexlibrary{\idxcode{IndirectlyMovable}}% @@ -2438,7 +2438,7 @@ template concept IndirectlyMovable = readable && - Writable>; + writable>; \end{codeblock} \pnum @@ -2452,7 +2452,7 @@ template concept IndirectlyMovableStorable = IndirectlyMovable && - Writable> && + writable> && movable> && constructible_from, iter_rvalue_reference_t> && assignable_from&, iter_rvalue_reference_t>; @@ -2474,7 +2474,7 @@ \pnum The \libconcept{IndirectlyCopyable} concept specifies the relationship between -a \libconcept{readable} type and a \libconcept{Writable} type between which +a \libconcept{readable} type and a \libconcept{writable} type between which values may be copied. \indexlibrary{\idxcode{IndirectlyCopyable}}% @@ -2482,7 +2482,7 @@ template concept IndirectlyCopyable = readable && - Writable>; + writable>; \end{codeblock} \pnum @@ -2497,7 +2497,7 @@ template concept IndirectlyCopyableStorable = IndirectlyCopyable && - Writable&> && + writable&> && copyable> && constructible_from, iter_reference_t> && assignable_from&, iter_reference_t>; From e8b6089675cebe62450f382c31e8434c5449fef4 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:39:36 -0700 Subject: [PATCH 36/84] [everywhere] Rename concept 'WeaklyIncrementable' to 'weakly_incrementable'. --- source/algorithms.tex | 132 +++++++++++++++++++++--------------------- source/iterators.tex | 36 ++++++------ source/ranges.tex | 6 +- 3 files changed, 87 insertions(+), 87 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 56a61c4215..c8c00f41bf 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1154,11 +1154,11 @@ } }; - template S, WeaklyIncrementable O> + template S, weakly_incrementable O> requires IndirectlyCopyable constexpr copy_result copy(I first, S last, O result); - template + template requires IndirectlyCopyable, O> constexpr copy_result, O> copy(R&& r, O result); @@ -1177,7 +1177,7 @@ template using copy_n_result = copy_result; - template + template requires IndirectlyCopyable constexpr copy_n_result copy_n(I first, iter_difference_t n, O result); @@ -1196,12 +1196,12 @@ template using copy_if_result = copy_result; - template S, WeaklyIncrementable O, class Proj = identity, + template S, weakly_incrementable O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr copy_if_result copy_if(I first, S last, O result, Pred pred, Proj proj = {}); - template, Proj>> Pred> requires IndirectlyCopyable, O> constexpr copy_if_result, O> @@ -1241,11 +1241,11 @@ template using move_result = copy_result; - template S, WeaklyIncrementable O> + template S, weakly_incrementable O> requires IndirectlyMovable constexpr move_result move(I first, S last, O result); - template + template requires IndirectlyMovable, O> constexpr move_result, O> move(R&& r, O result); @@ -1325,12 +1325,12 @@ template using unary_transform_result = copy_result; - template S, WeaklyIncrementable O, + template S, weakly_incrementable O, copy_constructible F, class Proj = identity> requires writable>> constexpr unary_transform_result transform(I first1, S last1, O result, F op, Proj proj = {}); - template requires writable, Proj>>> constexpr unary_transform_result, O> @@ -1358,14 +1358,14 @@ }; template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, copy_constructible F, class Proj1 = identity, + weakly_incrementable O, copy_constructible F, class Proj1 = identity, class Proj2 = identity> requires writable, projected>> constexpr binary_transform_result transform(I1 first1, S1 last1, I2 first2, S2 last2, O result, F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires writable, Proj1>, projected, Proj2>>> @@ -1576,13 +1576,13 @@ template using remove_copy_result = copy_result; - template S, WeaklyIncrementable O, class T, + template S, weakly_incrementable O, class T, class Proj = identity> requires IndirectlyCopyable && IndirectRelation, const T*> constexpr remove_copy_result remove_copy(I first, S last, O result, const T& value, Proj proj = {}); - template + template requires IndirectlyCopyable, O> && IndirectRelation, Proj>, const T*> constexpr remove_copy_result, O> @@ -1591,12 +1591,12 @@ template using remove_copy_if_result = copy_result; - template S, WeaklyIncrementable O, + template S, weakly_incrementable O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr remove_copy_if_result remove_copy_if(I first, S last, O result, Pred pred, Proj proj = {}); - template, Proj>> Pred> requires IndirectlyCopyable, O> constexpr remove_copy_if_result, O> @@ -1652,7 +1652,7 @@ template using unique_copy_result = copy_result; - template S, WeaklyIncrementable O, + template S, weakly_incrementable O, class Proj = identity, IndirectRelation> C = ranges::equal_to> requires IndirectlyCopyable && (ForwardIterator || @@ -1660,7 +1660,7 @@ IndirectlyCopyableStorable) constexpr unique_copy_result unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); - template, Proj>> C = ranges::equal_to> requires IndirectlyCopyable, O> && (ForwardIterator> || @@ -1700,11 +1700,11 @@ template using reverse_copy_result = copy_result; - template S, WeaklyIncrementable O> + template S, weakly_incrementable O> requires IndirectlyCopyable constexpr reverse_copy_result reverse_copy(I first, S last, O result); - template + template requires IndirectlyCopyable, O> constexpr reverse_copy_result, O> reverse_copy(R&& r, O result); @@ -1743,11 +1743,11 @@ template using rotate_copy_result = copy_result; - template S, WeaklyIncrementable O> + template S, weakly_incrementable O> requires IndirectlyCopyable constexpr rotate_copy_result rotate_copy(I first, I middle, S last, O result); - template + template requires IndirectlyCopyable, O> constexpr rotate_copy_result, O> rotate_copy(R&& r, iterator_t middle, O result); @@ -2183,13 +2183,13 @@ } }; - template S, WeaklyIncrementable O1, WeaklyIncrementable O2, + template S, weakly_incrementable O1, weakly_incrementable O2, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable && IndirectlyCopyable constexpr partition_copy_result partition_copy(I first, S last, O1 out_true, O2 out_false, Pred pred, Proj proj = {}); - template, Proj>> Pred> requires IndirectlyCopyable, O1> && @@ -2245,13 +2245,13 @@ using merge_result = binary_transform_result; template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, class Proj1 = identity, + weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable constexpr merge_result merge(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr merge_result, safe_iterator_t, O> @@ -2354,13 +2354,13 @@ using set_union_result = binary_transform_result; template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, + weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable constexpr set_union_result set_union(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr set_union_result, safe_iterator_t, O> @@ -2398,13 +2398,13 @@ using set_intersection_result = binary_transform_result; template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, + weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable constexpr set_intersection_result set_intersection(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr set_intersection_result, safe_iterator_t, O> @@ -2442,13 +2442,13 @@ using set_difference_result = copy_result; template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, + weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable constexpr set_difference_result set_difference(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr set_difference_result, O> @@ -2486,14 +2486,14 @@ using set_symmetric_difference_result = binary_transform_result; template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, + weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable constexpr set_symmetric_difference_result set_symmetric_difference(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr set_symmetric_difference_result, safe_iterator_t, O> @@ -4061,10 +4061,10 @@ constexpr OutputIterator copy(InputIterator first, InputIterator last, OutputIterator result); -template S, WeaklyIncrementable O> +template S, weakly_incrementable O> requires IndirectlyCopyable constexpr ranges::copy_result ranges::copy(I first, S last, O result); -template +template requires IndirectlyCopyable, O> constexpr ranges::copy_result, O> ranges::copy(R&& r, O result); \end{itemdecl} @@ -4139,7 +4139,7 @@ ForwardIterator1 first, Size n, ForwardIterator2 result); -template +template requires IndirectlyCopyable constexpr ranges::copy_n_result ranges::copy_n(I first, iter_difference_t n, O result); @@ -4181,12 +4181,12 @@ ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 result, Predicate pred); -template S, WeaklyIncrementable O, class Proj = identity, +template S, weakly_incrementable O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr ranges::copy_if_result ranges::copy_if(I first, S last, O result, Pred pred, Proj proj = {}); -template, Proj>> Pred> requires IndirectlyCopyable, O> constexpr ranges::copy_if_result, O> @@ -4305,11 +4305,11 @@ constexpr OutputIterator move(InputIterator first, InputIterator last, OutputIterator result); -template S, WeaklyIncrementable O> +template S, weakly_incrementable O> requires IndirectlyMovable constexpr ranges::move_result ranges::move(I first, S last, O result); -template +template requires IndirectlyMovable, O> constexpr ranges::move_result, O> ranges::move(R&& r, O result); @@ -4565,25 +4565,25 @@ ForwardIterator2 first2, ForwardIterator result, BinaryOperation binary_op); -template S, WeaklyIncrementable O, +template S, weakly_incrementable O, copy_constructible F, class Proj = identity> requires writable>> constexpr ranges::unary_transform_result ranges::transform(I first1, S last1, O result, F op, Proj proj = {}); -template requires writable, Proj>>> constexpr ranges::unary_transform_result, O> ranges::transform(R&& r, O result, F op, Proj proj = {}); template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, copy_constructible F, class Proj1 = identity, + weakly_incrementable O, copy_constructible F, class Proj1 = identity, class Proj2 = identity> requires writable, projected>> constexpr ranges::binary_transform_result ranges::transform(I1 first1, S1 last1, I2 first2, S2 last2, O result, F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires writable, Proj1>, projected, Proj2>>> @@ -5057,23 +5057,23 @@ ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 result, Predicate pred); -template S, WeaklyIncrementable O, class T, +template S, weakly_incrementable O, class T, class Proj = identity> requires IndirectlyCopyable && IndirectRelation, const T*> constexpr ranges::remove_copy_result ranges::remove_copy(I first, S last, O result, const T& value, Proj proj = {}); -template +template requires IndirectlyCopyable, O> && IndirectRelation, Proj>, const T*> constexpr ranges::remove_copy_result, O> ranges::remove_copy(R&& r, O result, const T& value, Proj proj = {}); -template S, WeaklyIncrementable O, +template S, weakly_incrementable O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr ranges::remove_copy_if_result ranges::remove_copy_if(I first, S last, O result, Pred pred, Proj proj = {}); -template, Proj>> Pred> requires IndirectlyCopyable, O> constexpr ranges::remove_copy_if_result, O> @@ -5223,7 +5223,7 @@ ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 result, BinaryPredicate pred); -template S, WeaklyIncrementable O, +template S, weakly_incrementable O, class Proj = identity, IndirectRelation> C = ranges::equal_to> requires IndirectlyCopyable && (ForwardIterator || @@ -5231,7 +5231,7 @@ IndirectlyCopyableStorable) constexpr ranges::unique_copy_result ranges::unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); -template, Proj>> C = ranges::equal_to> requires IndirectlyCopyable, O> && (ForwardIterator> || @@ -5365,11 +5365,11 @@ BidirectionalIterator first, BidirectionalIterator last, ForwardIterator result); -template S, WeaklyIncrementable O> +template S, weakly_incrementable O> requires IndirectlyCopyable constexpr ranges::reverse_copy_result ranges::reverse_copy(I first, S last, O result); -template +template requires IndirectlyCopyable, O> constexpr ranges::reverse_copy_result, O> ranges::reverse_copy(R&& r, O result); @@ -5482,7 +5482,7 @@ ForwardIterator1 first, ForwardIterator1 middle, ForwardIterator1 last, ForwardIterator2 result); - template S, WeaklyIncrementable O> + template S, weakly_incrementable O> requires IndirectlyCopyable constexpr ranges::rotate_copy_result ranges::rotate_copy(I first, I middle, S last, O result); @@ -5520,7 +5520,7 @@ \end{itemdescr} \begin{itemdecl} -template +template requires IndirectlyCopyable, O> constexpr ranges::rotate_copy_result, O> ranges::rotate_copy(R&& r, iterator_t middle, O result); @@ -6760,13 +6760,13 @@ ForwardIterator first, ForwardIterator last, ForwardIterator1 out_true, ForwardIterator2 out_false, Predicate pred); -template S, WeaklyIncrementable O1, WeaklyIncrementable O2, +template S, weakly_incrementable O1, weakly_incrementable O2, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable && IndirectlyCopyable constexpr ranges::partition_copy_result ranges::partition_copy(I first, S last, O1 out_true, O2 out_false, Pred pred, Proj proj = {}); -template, Proj>> Pred> requires IndirectlyCopyable, O1> && @@ -6888,13 +6888,13 @@ ForwardIterator result, Compare comp); template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, class Proj1 = identity, + weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable constexpr ranges::merge_result ranges::merge(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr ranges::merge_result, safe_iterator_t, O> @@ -7153,13 +7153,13 @@ ForwardIterator result, Compare comp); template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, + weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable constexpr ranges::set_union_result ranges::set_union(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr ranges::set_union_result, safe_iterator_t, O> @@ -7248,13 +7248,13 @@ ForwardIterator result, Compare comp); template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, + weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable constexpr ranges::set_intersection_result ranges::set_intersection(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr ranges::set_intersection_result, safe_iterator_t, O> @@ -7341,13 +7341,13 @@ ForwardIterator result, Compare comp); template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, + weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable constexpr ranges::set_difference_result ranges::set_difference(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr ranges::set_difference_result, O> @@ -7435,14 +7435,14 @@ ForwardIterator result, Compare comp); template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, + weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable constexpr ranges::set_symmetric_difference_result ranges::set_symmetric_difference(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr ranges::set_symmetric_difference_result, safe_iterator_t, O> diff --git a/source/iterators.tex b/source/iterators.tex index 19eac15af2..b8ebcf413a 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -93,9 +93,9 @@ template concept writable = @\seebelow@; - // \ref{iterator.concept.winc}, concept \libconcept{WeaklyIncrementable} + // \ref{iterator.concept.winc}, concept \libconcept{weakly_incrementable} template - concept WeaklyIncrementable = @\seebelow@; + concept weakly_incrementable = @\seebelow@; // \ref{iterator.concept.inc}, concept \libconcept{Incrementable} template @@ -165,7 +165,7 @@ template Proj> struct projected; - template + template struct incrementable_traits>; // \ref{alg.req}, common algorithm requirements @@ -668,7 +668,7 @@ it is often necessary to determine the difference type that corresponds to a particular incrementable type. Accordingly, it is required that if \tcode{WI} is the name of a type that models the -\libconcept{WeaklyIncrementable} concept\iref{iterator.concept.winc}, +\libconcept{weakly_incrementable} concept\iref{iterator.concept.winc}, the type \begin{codeblock} iter_difference_t @@ -1270,15 +1270,15 @@ by value does not model \tcode{\libconcept{writable}}. \end{note} -\rSec3[iterator.concept.winc]{Concept \libconcept{WeaklyIncrementable}} +\rSec3[iterator.concept.winc]{Concept \libconcept{weakly_incrementable}} \pnum -The \libconcept{WeaklyIncrementable} concept specifies the requirements on +The \libconcept{weakly_incrementable} concept specifies the requirements on types that can be incremented with the pre- and post-increment operators. The increment operations are not required to be equality-preserving, nor is the type required to be \libconcept{equality_comparable}. -\indexlibrary{\idxcode{WeaklyIncrementable}}% +\indexlibrary{\idxcode{weakly_incrementable}}% \begin{codeblock} template inline constexpr bool @\placeholder{is-integer-like}@ = @\seebelow@; @\itcorr[-2]@ // exposition only @@ -1287,7 +1287,7 @@ inline constexpr bool @\placeholder{is-signed-integer-like}@ = @\seebelow@; @\itcorr[-2]@ // exposition only template - concept WeaklyIncrementable = + concept weakly_incrementable = default_constructible && movable && requires(I i) { typename iter_difference_t; @@ -1403,7 +1403,7 @@ \pnum Let \tcode{i} be an object of type \tcode{I}. When \tcode{i} is in the domain of both pre- and post-increment, \tcode{i} is said to be \term{incrementable}. -\tcode{I} models \tcode{WeaklyIncrementable} only if +\tcode{I} models \tcode{weakly_incrementable} only if \begin{itemize} \item The expressions \tcode{++i} and \tcode{i++} have the same domain. @@ -1416,7 +1416,7 @@ \pnum \begin{note} -For \tcode{WeaklyIncrementable} types, \tcode{a} equals \tcode{b} does not imply that \tcode{++a} +For \tcode{weakly_incrementable} types, \tcode{a} equals \tcode{b} does not imply that \tcode{++a} equals \tcode{++b}. (Equality does not guarantee the substitution property or referential transparency.) Algorithms on weakly incrementable types should never attempt to pass through the same incrementable value twice. They should be single-pass algorithms. These algorithms @@ -1432,7 +1432,7 @@ and the type is required to be \libconcept{equality_comparable}. \begin{note} This supersedes the annotations on the increment expressions -in the definition of \tcode{WeaklyIncrementable}. +in the definition of \tcode{weakly_incrementable}. \end{note} \indexlibrary{\idxcode{Incrementable}}% @@ -1440,7 +1440,7 @@ template concept Incrementable = regular && - WeaklyIncrementable && + weakly_incrementable && requires(I i) { { i++ } -> same_as; }; @@ -1485,7 +1485,7 @@ requires(I i) { { *i } -> @\placeholder{can-reference}@; } && - WeaklyIncrementable; + weakly_incrementable; \end{codeblock} \pnum @@ -2391,7 +2391,7 @@ indirect_result_t operator*() const; // \notdef }; - template + template struct incrementable_traits> { using difference_type = iter_difference_t; }; @@ -2577,7 +2577,7 @@ concept Mergeable = InputIterator && InputIterator && - WeaklyIncrementable && + weakly_incrementable && IndirectlyCopyable && IndirectlyCopyable && IndirectStrictWeakOrder, projected>; @@ -4538,7 +4538,7 @@ \tcode{copy_if} using \tcode{move_iterator} and \tcode{move_sentinel}: \begin{codeblock} -template S, WeaklyIncrementable O, +template S, weakly_incrementable O, IndirectUnaryPredicate Pred> requires IndirectlyMovable void move_if(I first, S last, O out, Pred pred) { @@ -5554,7 +5554,7 @@ \indexlibrary{\idxcode{unreachable_sentinel_t}}% \pnum Class \tcode{unreachable_sentinel_t} can be used with -any \libconcept{WeaklyIncrementable} type +any \libconcept{weakly_incrementable} type to denote the ``upper bound'' of an unbounded interval. \pnum @@ -5575,7 +5575,7 @@ \begin{codeblock} namespace std { struct unreachable_sentinel_t { - template + template friend constexpr bool operator==(unreachable_sentinel_t, const I&) noexcept { return false; } }; diff --git a/source/ranges.tex b/source/ranges.tex index 7a4033429c..6d1fdfabee 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -144,7 +144,7 @@ namespace views { inline constexpr @\unspec@ single = @\unspec@; } // \ref{range.iota}, iota view - template + template requires @\placeholder{weakly-equality-comparable-with}@ class iota_view; @@ -1775,7 +1775,7 @@ concept @\placeholdernc{Advanceable}@ = // \expos @\seebelow@; - template + template requires @\placeholdernc{weakly-equality-comparable-with}@ class iota_view : public view_interface> { private: @@ -1823,7 +1823,7 @@ of width not less than the width of \tcode{W}. \begin{note} It is unspecified - whether this type satisfies \libconcept{WeaklyIncrementable}. + whether this type satisfies \libconcept{weakly_incrementable}. \end{note} \end{itemize} From 5f1f7d4efd99cfa2af9bbb317024062cb53f9f4d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:40:19 -0700 Subject: [PATCH 37/84] [everywhere] Rename concept 'Incrementable' to 'incrementable'. --- source/iterators.tex | 18 +++++++++--------- source/ranges.tex | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/source/iterators.tex b/source/iterators.tex index b8ebcf413a..f414cdd38b 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -97,9 +97,9 @@ template concept weakly_incrementable = @\seebelow@; - // \ref{iterator.concept.inc}, concept \libconcept{Incrementable} + // \ref{iterator.concept.inc}, concept \libconcept{incrementable} template - concept Incrementable = @\seebelow@; + concept incrementable = @\seebelow@; // \ref{iterator.concept.iterator}, concept \libconcept{Iterator} template @@ -1424,10 +1424,10 @@ template. \end{note} -\rSec3[iterator.concept.inc]{Concept \libconcept{Incrementable}} +\rSec3[iterator.concept.inc]{Concept \libconcept{incrementable}} \pnum -The \libconcept{Incrementable} concept specifies requirements on types that can be incremented with the pre- +The \libconcept{incrementable} concept specifies requirements on types that can be incremented with the pre- and post-increment operators. The increment operations are required to be equality-preserving, and the type is required to be \libconcept{equality_comparable}. \begin{note} @@ -1435,10 +1435,10 @@ in the definition of \tcode{weakly_incrementable}. \end{note} -\indexlibrary{\idxcode{Incrementable}}% +\indexlibrary{\idxcode{incrementable}}% \begin{codeblock} template - concept Incrementable = + concept incrementable = regular && weakly_incrementable && requires(I i) { @@ -1448,7 +1448,7 @@ \pnum Let \tcode{a} and \tcode{b} be incrementable objects of type \tcode{I}. -\tcode{I} models \libconcept{Incrementable} only if +\tcode{I} models \libconcept{incrementable} only if \begin{itemize} \item If \tcode{bool(a == b)} then \tcode{bool(a++ == b)}. @@ -1463,7 +1463,7 @@ \tcode{++a} equals \tcode{++b} (which is not true for weakly incrementable types) allows the use of multi-pass one-directional -algorithms with types that model \libconcept{Incrementable}. +algorithms with types that model \libconcept{incrementable}. \end{note} \rSec3[iterator.concept.iterator]{Concept \libconcept{Iterator}} @@ -1673,7 +1673,7 @@ concept ForwardIterator = InputIterator && derived_from<@\placeholdernc{ITER_CONCEPT}@(I), forward_iterator_tag> && - Incrementable && + incrementable && Sentinel; \end{codeblock} diff --git a/source/ranges.tex b/source/ranges.tex index 6d1fdfabee..f084762026 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1832,7 +1832,7 @@ \begin{itemdecl} template concept @\placeholder{Decrementable}@ = - Incrementable && requires(I i) { + incrementable && requires(I i) { { --i } -> same_as; { i-- } -> same_as; }; @@ -2018,7 +2018,7 @@ constexpr iterator& operator++(); constexpr void operator++(int); - constexpr iterator operator++(int) requires Incrementable; + constexpr iterator operator++(int) requires incrementable; constexpr iterator& operator--() requires @\placeholdernc{Decrementable}@; constexpr iterator operator--(int) requires @\placeholdernc{Decrementable}@; @@ -2065,7 +2065,7 @@ \tcode{iterator_category} is \tcode{random_access_iterator_tag}. \item Otherwise, if \tcode{W} models \tcode{\placeholder{Decrementable}}, then \tcode{iterator_category} is \tcode{bidirectional_iterator_tag}. -\item Otherwise, if \tcode{W} models \libconcept{Incrementable}, then +\item Otherwise, if \tcode{W} models \libconcept{incrementable}, then \tcode{iterator_category} is \tcode{forward_iterator_tag}. \item Otherwise, \tcode{iterator_category} is \tcode{input_iterator_tag}. \end{itemize} @@ -2127,7 +2127,7 @@ \indexlibrary{\idxcode{operator++}!\idxcode{iota_view::iterator}} \begin{itemdecl} -constexpr iterator operator++(int) requires Incrementable; +constexpr iterator operator++(int) requires incrementable; \end{itemdecl} \begin{itemdescr} From 67ac9c7d90d40ebf324f43f0c14047a3cd8997b8 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:44:36 -0700 Subject: [PATCH 38/84] [everywhere] Rename concept 'Iterator' to 'input_or_output_iterator'. --- source/algorithms.tex | 8 ++--- source/iterators.tex | 68 +++++++++++++++++++++---------------------- source/ranges.tex | 26 ++++++++--------- 3 files changed, 51 insertions(+), 51 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index c8c00f41bf..4e8faecc6d 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1505,13 +1505,13 @@ ForwardIterator first, Size n, Generator gen); namespace ranges { - template S, copy_constructible F> + template S, copy_constructible F> requires invocable && writable> constexpr O generate(O first, S last, F gen); template requires invocable && OutputRange> constexpr safe_iterator_t generate(R&& r, F gen); - template + template requires invocable && writable> constexpr O generate_n(O first, iter_difference_t n, F gen); } @@ -4910,13 +4910,13 @@ ForwardIterator generate_n(ExecutionPolicy&& exec, ForwardIterator first, Size n, Generator gen); -template S, copy_constructible F> +template S, copy_constructible F> requires invocable && writable> constexpr O ranges::generate(O first, S last, F gen); template requires invocable && OutputRange> constexpr safe_iterator_t ranges::generate(R&& r, F gen); -template +template requires invocable && writable> constexpr O ranges::generate_n(O first, iter_difference_t n, F gen); \end{itemdecl} diff --git a/source/iterators.tex b/source/iterators.tex index f414cdd38b..9ecd0e300b 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -101,9 +101,9 @@ template concept incrementable = @\seebelow@; - // \ref{iterator.concept.iterator}, concept \libconcept{Iterator} + // \ref{iterator.concept.iterator}, concept \libconcept{input_or_output_iterator} template - concept Iterator = @\seebelow@; + concept input_or_output_iterator = @\seebelow@; // \ref{iterator.concept.sentinel}, concept \libconcept{Sentinel} template @@ -232,27 +232,27 @@ // \ref{range.iter.ops}, range iterator operations namespace ranges { // \ref{range.iter.op.advance}, \tcode{ranges::advance} - template + template constexpr void advance(I& i, iter_difference_t n); - template S> + template S> constexpr void advance(I& i, S bound); - template S> + template S> constexpr iter_difference_t advance(I& i, iter_difference_t n, S bound); // \ref{range.iter.op.distance}, \tcode{ranges::distance} - template S> + template S> constexpr iter_difference_t distance(I first, S last); template constexpr range_difference_t distance(R&& r); // \ref{range.iter.op.next}, \tcode{ranges::next} - template + template constexpr I next(I x); - template + template constexpr I next(I x, iter_difference_t n); - template S> + template S> constexpr I next(I x, S bound); - template S> + template S> constexpr I next(I x, iter_difference_t n, S bound); // \ref{range.iter.op.prev}, \tcode{ranges::prev} @@ -366,7 +366,7 @@ template class move_sentinel; // \ref{iterators.common}, common iterators - template S> + template S> requires (!same_as) class common_iterator; @@ -381,7 +381,7 @@ inline constexpr default_sentinel_t default_sentinel{}; // \ref{iterators.counted}, counted iterators - template class counted_iterator; + template class counted_iterator; template struct incrementable_traits>; @@ -522,7 +522,7 @@ \libconcept{ContiguousIterator}\iref{iterator.concept.contiguous}, respectively. The generic term \defn{iterator} refers to any type that models the -\libconcept{Iterator} concept\iref{iterator.concept.iterator}. +\libconcept{input_or_output_iterator} concept\iref{iterator.concept.iterator}. \pnum Forward iterators meet all the requirements of input @@ -1466,11 +1466,11 @@ algorithms with types that model \libconcept{incrementable}. \end{note} -\rSec3[iterator.concept.iterator]{Concept \libconcept{Iterator}} +\rSec3[iterator.concept.iterator]{Concept \libconcept{input_or_output_iterator}} \pnum -The \libconcept{Iterator} concept forms the basis -of the iterator concept taxonomy; every iterator models \libconcept{Iterator}. +The \libconcept{input_or_output_iterator} concept forms the basis +of the iterator concept taxonomy; every iterator models \libconcept{input_or_output_iterator}. This concept specifies operations for dereferencing and incrementing an iterator. Most algorithms will require additional operations to compare iterators with sentinels\iref{iterator.concept.sentinel}, to @@ -1478,10 +1478,10 @@ to provide a richer set of iterator movements (\ref{iterator.concept.forward}, \ref{iterator.concept.bidir}, \ref{iterator.concept.random.access}). -\indexlibrary{\idxcode{Iterator}}% +\indexlibrary{\idxcode{input_or_output_iterator}}% \begin{codeblock} template - concept Iterator = + concept input_or_output_iterator = requires(I i) { { *i } -> @\placeholder{can-reference}@; } && @@ -1491,14 +1491,14 @@ \pnum \begin{note} Unlike the \oldconcept{Iterator} requirements, -the \libconcept{Iterator} concept does not require copyability. +the \libconcept{input_or_output_iterator} concept does not require copyability. \end{note} \rSec3[iterator.concept.sentinel]{Concept \libconcept{Sentinel}} \pnum The \libconcept{Sentinel} concept specifies the relationship -between an \libconcept{Iterator} type and a \libconcept{semiregular} type +between an \libconcept{input_or_output_iterator} type and a \libconcept{semiregular} type whose values denote a range. \indexlibrary{\idxcode{Sentinel}}% @@ -1506,7 +1506,7 @@ template concept Sentinel = semiregular && - Iterator && + input_or_output_iterator && @\placeholder{weakly-equality-comparable-with}@; // See \ref{concept.equalitycomparable} \end{itemdecl} @@ -1536,7 +1536,7 @@ \pnum The \libconcept{SizedSentinel} concept specifies -requirements on an \libconcept{Iterator} and a \libconcept{Sentinel} +requirements on an \libconcept{input_or_output_iterator} and a \libconcept{Sentinel} that allow the use of the \tcode{-} operator to compute the distance between them in constant time. @@ -1618,7 +1618,7 @@ \begin{codeblock} template concept InputIterator = - Iterator && + input_or_output_iterator && readable && requires { typename @\placeholdernc{ITER_CONCEPT}@(I); } && derived_from<@\placeholdernc{ITER_CONCEPT}@(I), input_iterator_tag>; @@ -1638,7 +1638,7 @@ \begin{codeblock} template concept OutputIterator = - Iterator && + input_or_output_iterator && writable && requires(I i, T&& t) { *i++ = std::forward(t); // not required to be equality-preserving @@ -2838,7 +2838,7 @@ \indexlibrary{\idxcode{advance}}% \begin{itemdecl} -template +template constexpr void ranges::advance(I& i, iter_difference_t n); \end{itemdecl} @@ -2861,7 +2861,7 @@ \indexlibrary{\idxcode{advance}}% \begin{itemdecl} -template S> +template S> constexpr void ranges::advance(I& i, S bound); \end{itemdecl} @@ -2884,7 +2884,7 @@ \indexlibrary{\idxcode{advance}}% \begin{itemdecl} -template S> +template S> constexpr iter_difference_t ranges::advance(I& i, iter_difference_t n, S bound); \end{itemdecl} @@ -2926,7 +2926,7 @@ \rSec3[range.iter.op.distance]{\tcode{ranges::distance}} \indexlibrary{\idxcode{distance}}% \begin{itemdecl} -template S> +template S> constexpr iter_difference_t ranges::distance(I first, S last); \end{itemdecl} @@ -2971,7 +2971,7 @@ \indexlibrary{\idxcode{next}}% \begin{itemdecl} -template +template constexpr I ranges::next(I x); \end{itemdecl} @@ -2982,7 +2982,7 @@ \indexlibrary{\idxcode{next}}% \begin{itemdecl} -template +template constexpr I ranges::next(I x, iter_difference_t n); \end{itemdecl} @@ -2993,7 +2993,7 @@ \indexlibrary{\idxcode{next}}% \begin{itemdecl} -template S> +template S> constexpr I ranges::next(I x, S bound); \end{itemdecl} @@ -3004,7 +3004,7 @@ \indexlibrary{\idxcode{next}}% \begin{itemdecl} -template S> +template S> constexpr I ranges::next(I x, iter_difference_t n, S bound); \end{itemdecl} @@ -4652,7 +4652,7 @@ \indexlibrary{\idxcode{common_iterator}}% \begin{codeblock} namespace std { - template S> + template S> requires (!same_as) class common_iterator { public: @@ -5071,7 +5071,7 @@ \indexlibrary{\idxcode{counted_iterator}}% \begin{codeblock} namespace std { - template + template class counted_iterator { public: using iterator_type = I; diff --git a/source/ranges.tex b/source/ranges.tex index f084762026..7a832a3652 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -112,7 +112,7 @@ // \ref{range.subrange}, sub-ranges enum class subrange_kind : bool { unsized, sized }; - template S = I, subrange_kind K = @\seebelow@> + template S = I, subrange_kind K = @\seebelow@> requires (K == subrange_kind::sized || !SizedSentinel) class subrange; @@ -317,11 +317,11 @@ \item Otherwise, if \tcode{E} is an lvalue, \tcode{\placeholdernc{decay-copy}(E.begin())} - if it is a valid expression and its type \tcode{I} models \tcode{Iterator}. + if it is a valid expression and its type \tcode{I} models \tcode{input_or_output_iterator}. \item Otherwise, \tcode{\placeholdernc{decay-copy}(begin(E))} if it is a - valid expression and its type \tcode{I} models \tcode{Iterator} with overload + valid expression and its type \tcode{I} models \tcode{input_or_output_iterator} with overload resolution performed in a context that includes the declarations: \begin{codeblock} template void begin(T&&) = delete; @@ -341,7 +341,7 @@ \pnum \begin{note} Whenever \tcode{ranges::begin(E)} is a valid expression, its type models -\tcode{Iterator}. +\tcode{input_or_output_iterator}. \end{note} \rSec2[range.access.end]{\tcode{ranges::end}} @@ -404,7 +404,7 @@ \pnum \begin{note} Whenever \tcode{ranges::cbegin(E)} is a valid expression, its type models -\tcode{Iterator}. +\tcode{input_or_output_iterator}. \end{note} \rSec2[range.access.cend]{\tcode{ranges::cend}} @@ -437,11 +437,11 @@ \begin{itemize} \item If \tcode{E} is an lvalue, \tcode{\placeholdernc{decay-copy}(E.rbegin())} - if it is a valid expression and its type \tcode{I} models \tcode{Iterator}. + if it is a valid expression and its type \tcode{I} models \tcode{input_or_output_iterator}. \item Otherwise, \tcode{\placeholdernc{decay-copy}(rbegin(E))} if it is a valid - expression and its type \tcode{I} models \tcode{Iterator} with overload + expression and its type \tcode{I} models \tcode{input_or_output_iterator} with overload resolution performed in a context that includes the declaration: \begin{codeblock} template void rbegin(T&&) = delete; @@ -466,7 +466,7 @@ \pnum \begin{note} Whenever \tcode{ranges::rbegin(E)} is a valid expression, its type models -\tcode{Iterator}. +\tcode{input_or_output_iterator}. \end{note} \rSec2[range.access.rend]{\tcode{ranges::rend}} @@ -530,7 +530,7 @@ \pnum \begin{note} Whenever \tcode{ranges::crbegin(E)} is a valid expression, its -type models \tcode{Iterator}. +type models \tcode{input_or_output_iterator}. \end{note} \rSec2[range.access.crend]{\tcode{ranges::crend}} @@ -703,7 +703,7 @@ Ranges are an abstraction that allow a \Cpp{} program to operate on elements of data structures uniformly. Calling \tcode{ranges::begin} on a range returns an object -whose type models \libconcept{Iterator}\iref{iterator.concept.iterator}. +whose type models \libconcept{input_or_output_iterator}\iref{iterator.concept.iterator}. Calling \tcode{ranges::end} on a range returns an object whose type \tcode{S}, together with the type \tcode{I} of the object returned by \tcode{ranges::begin}, models \tcode{\libconcept{Sentinel}}. @@ -1236,7 +1236,7 @@ !Range && @\placeholdernc{pair-like}@ && Sentinel, tuple_element_t<0, T>>; - template S = I, subrange_kind K = + template S = I, subrange_kind K = SizedSentinel ? subrange_kind::sized : subrange_kind::unsized> requires (K == subrange_kind::sized || !SizedSentinel) class subrange : public view_interface> { @@ -1301,7 +1301,7 @@ friend constexpr S end(subrange&& r) { return r.end(); } }; - template S> + template S> subrange(I, S, @\placeholdernc{make-unsigned-like-t}@(iter_difference_t)) -> subrange; @@ -5251,7 +5251,7 @@ Then the expression \tcode{views::counted(E, F)} is expression-equivalent to: \begin{itemize} -\item If \tcode{T} models \libconcept{Iterator} and +\item If \tcode{T} models \libconcept{input_or_output_iterator} and \tcode{decltype((F))} models \tcode{\libconcept{convertible_to}>}, \begin{itemize} \item \tcode{subrange\{E, E + static_cast>(F)\}} From 188762bdc3760910a5ff3e960910977a460e0cc3 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:47:31 -0700 Subject: [PATCH 39/84] [everywhere] Rename concept 'Sentinel' to 'sentinel_for'. --- source/algorithms.tex | 316 +++++++++++++++++++++--------------------- source/iterators.tex | 70 +++++----- source/ranges.tex | 26 ++-- source/utilities.tex | 12 +- 4 files changed, 212 insertions(+), 212 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 4e8faecc6d..0ca370f968 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -619,7 +619,7 @@ ForwardIterator first, ForwardIterator last, Predicate pred); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr bool all_of(I first, S last, Pred pred, Proj proj = {}); template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr bool any_of(I first, S last, Pred pred, Proj proj = {}); template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr bool none_of(I first, S last, Pred pred, Proj proj = {}); template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryInvocable> Fun> constexpr for_each_result for_each(I first, S last, Fun f, Proj proj = {}); @@ -725,21 +725,21 @@ Predicate pred); namespace ranges { - template S, class T, class Proj = identity> + template S, class T, class Proj = identity> requires IndirectRelation, const T*> constexpr I find(I first, S last, const T& value, Proj proj = {}); template requires IndirectRelation, Proj>, const T*> constexpr safe_iterator_t find(R&& r, const T& value, Proj proj = {}); - template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr I find_if(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> constexpr safe_iterator_t find_if(R&& r, Pred pred, Proj proj = {}); - template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr I find_if_not(I first, S last, Pred pred, Proj proj = {}); template S1, ForwardIterator I2, Sentinel S2, + template S1, ForwardIterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires IndirectlyComparable constexpr subrange @@ -810,7 +810,7 @@ BinaryPredicate pred); namespace ranges { - template S1, ForwardIterator I2, Sentinel S2, + template S1, ForwardIterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectRelation, projected> Pred = ranges::equal_to> @@ -845,7 +845,7 @@ BinaryPredicate pred); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, IndirectRelation> Pred = ranges::equal_to> constexpr I adjacent_find(I first, S last, Pred pred = {}, Proj proj = {}); @@ -872,7 +872,7 @@ ForwardIterator first, ForwardIterator last, Predicate pred); namespace ranges { - template S, class T, class Proj = identity> + template S, class T, class Proj = identity> requires IndirectRelation, const T*> constexpr iter_difference_t count(I first, S last, const T& value, Proj proj = {}); @@ -880,7 +880,7 @@ requires IndirectRelation, Proj>, const T*> constexpr range_difference_t count(R&& r, const T& value, Proj proj = {}); - template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr iter_difference_t count_if(I first, S last, Pred pred, Proj proj = {}); @@ -951,7 +951,7 @@ } }; - template S1, InputIterator I2, Sentinel S2, + template S1, InputIterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectRelation, projected> Pred = ranges::equal_to> @@ -1002,7 +1002,7 @@ BinaryPredicate pred); namespace ranges { - template S1, InputIterator I2, Sentinel S2, + template S1, InputIterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires IndirectlyComparable constexpr bool equal(I1 first1, S1 last1, I2 first2, S2 last2, @@ -1031,8 +1031,8 @@ BinaryPredicate pred); namespace ranges { - template S1, ForwardIterator I2, - Sentinel S2, class Pred = ranges::equal_to, class Proj1 = identity, + template S1, ForwardIterator I2, + sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires IndirectlyComparable constexpr bool is_permutation(I1 first1, S1 last1, I2 first2, S2 last2, @@ -1069,8 +1069,8 @@ BinaryPredicate pred); namespace ranges { - template S1, ForwardIterator I2, - Sentinel S2, class Pred = ranges::equal_to, + template S1, ForwardIterator I2, + sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires IndirectlyComparable constexpr subrange @@ -1107,7 +1107,7 @@ BinaryPredicate pred); namespace ranges { - template S, class T, + template S, class T, class Pred = ranges::equal_to, class Proj = identity> requires IndirectlyComparable constexpr subrange @@ -1154,7 +1154,7 @@ } }; - template S, weakly_incrementable O> + template S, weakly_incrementable O> requires IndirectlyCopyable constexpr copy_result copy(I first, S last, O result); @@ -1196,7 +1196,7 @@ template using copy_if_result = copy_result; - template S, weakly_incrementable O, class Proj = identity, + template S, weakly_incrementable O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr copy_if_result @@ -1217,7 +1217,7 @@ template using copy_backward_result = copy_result; - template S1, BidirectionalIterator I2> + template S1, BidirectionalIterator I2> requires IndirectlyCopyable constexpr copy_backward_result copy_backward(I1 first, S1 last, I2 result); @@ -1241,7 +1241,7 @@ template using move_result = copy_result; - template S, weakly_incrementable O> + template S, weakly_incrementable O> requires IndirectlyMovable constexpr move_result move(I first, S last, O result); @@ -1260,7 +1260,7 @@ template using move_backward_result = copy_result; - template S1, BidirectionalIterator I2> + template S1, BidirectionalIterator I2> requires IndirectlyMovable constexpr move_backward_result move_backward(I1 first, S1 last, I2 result); @@ -1283,7 +1283,7 @@ template using swap_ranges_result = mismatch_result; - template S1, InputIterator I2, Sentinel S2> + template S1, InputIterator I2, sentinel_for S2> requires IndirectlySwappable constexpr swap_ranges_result swap_ranges(I1 first1, S1 last1, I2 first2, S2 last2); @@ -1325,7 +1325,7 @@ template using unary_transform_result = copy_result; - template S, weakly_incrementable O, + template S, weakly_incrementable O, copy_constructible F, class Proj = identity> requires writable>> constexpr unary_transform_result @@ -1357,7 +1357,7 @@ } }; - template S1, InputIterator I2, Sentinel S2, + template S1, InputIterator I2, sentinel_for S2, weakly_incrementable O, copy_constructible F, class Proj1 = identity, class Proj2 = identity> requires writable, @@ -1391,7 +1391,7 @@ Predicate pred, const T& new_value); namespace ranges { - template S, class T1, class T2, class Proj = identity> + template S, class T1, class T2, class Proj = identity> requires writable && IndirectRelation, const T1*> constexpr I @@ -1401,7 +1401,7 @@ IndirectRelation, Proj>, const T1*> constexpr safe_iterator_t replace(R&& r, const T1& old_value, const T2& new_value, Proj proj = {}); - template S, class T, class Proj = identity, + template S, class T, class Proj = identity, IndirectUnaryPredicate> Pred> requires writable constexpr I replace_if(I first, S last, Pred pred, const T& new_value, Proj proj = {}); @@ -1436,7 +1436,7 @@ template using replace_copy_result = copy_result; - template S, class T1, class T2, OutputIterator O, + template S, class T1, class T2, OutputIterator O, class Proj = identity> requires IndirectlyCopyable && IndirectRelation, const T1*> @@ -1454,7 +1454,7 @@ template using replace_copy_if_result = copy_result; - template S, class T, OutputIterator O, + template S, class T, OutputIterator O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr replace_copy_if_result @@ -1482,7 +1482,7 @@ ForwardIterator first, Size n, const T& value); namespace ranges { - template O, Sentinel S> + template O, sentinel_for S> constexpr O fill(O first, S last, const T& value); template R> constexpr safe_iterator_t fill(R&& r, const T& value); @@ -1505,7 +1505,7 @@ ForwardIterator first, Size n, Generator gen); namespace ranges { - template S, copy_constructible F> + template S, copy_constructible F> requires invocable && writable> constexpr O generate(O first, S last, F gen); template @@ -1533,7 +1533,7 @@ Predicate pred); namespace ranges { - template S, class T, class Proj = identity> + template S, class T, class Proj = identity> requires IndirectRelation, const T*> constexpr subrange remove(I first, S last, const T& value, Proj proj = {}); template @@ -1541,7 +1541,7 @@ IndirectRelation, Proj>, const T*> constexpr safe_subrange_t remove(R&& r, const T& value, Proj proj = {}); - template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr subrange remove_if(I first, S last, Pred pred, Proj proj = {}); template using remove_copy_result = copy_result; - template S, weakly_incrementable O, class T, + template S, weakly_incrementable O, class T, class Proj = identity> requires IndirectlyCopyable && IndirectRelation, const T*> @@ -1591,7 +1591,7 @@ template using remove_copy_if_result = copy_result; - template S, weakly_incrementable O, + template S, weakly_incrementable O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr remove_copy_if_result @@ -1618,7 +1618,7 @@ BinaryPredicate pred); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, IndirectRelation> C = ranges::equal_to> constexpr subrange unique(I first, S last, C comp = {}, Proj proj = {}); template using unique_copy_result = copy_result; - template S, weakly_incrementable O, + template S, weakly_incrementable O, class Proj = identity, IndirectRelation> C = ranges::equal_to> requires IndirectlyCopyable && (ForwardIterator || @@ -1678,7 +1678,7 @@ BidirectionalIterator first, BidirectionalIterator last); namespace ranges { - template S> + template S> requires Permutable constexpr I reverse(I first, S last); template @@ -1700,7 +1700,7 @@ template using reverse_copy_result = copy_result; - template S, weakly_incrementable O> + template S, weakly_incrementable O> requires IndirectlyCopyable constexpr reverse_copy_result reverse_copy(I first, S last, O result); @@ -1722,7 +1722,7 @@ ForwardIterator last); namespace ranges { - template S> + template S> constexpr subrange rotate(I first, I middle, S last); template requires Permutable> @@ -1743,7 +1743,7 @@ template using rotate_copy_result = copy_result; - template S, weakly_incrementable O> + template S, weakly_incrementable O> requires IndirectlyCopyable constexpr rotate_copy_result rotate_copy(I first, I middle, S last, O result); @@ -1767,7 +1767,7 @@ UniformRandomBitGenerator&& g); namespace ranges { - template S, class Gen> + template S, class Gen> requires Permutable && UniformRandomBitGenerator> I shuffle(I first, S last, Gen&& g); @@ -1813,7 +1813,7 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -1838,7 +1838,7 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable I stable_sort(I first, S last, Comp comp = {}, Proj proj = {}); @@ -1868,7 +1868,7 @@ RandomAccessIterator last, Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -1909,7 +1909,7 @@ namespace ranges { template using partial_sort_copy_result = copy_result; - template S1, RandomAccessIterator I2, Sentinel S2, + template S1, RandomAccessIterator I2, sentinel_for S2, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires IndirectlyCopyable && Sortable && IndirectStrictWeakOrder, projected> @@ -1941,7 +1941,7 @@ Compare comp); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr bool is_sorted(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Proj = identity, + template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I is_sorted_until(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -2015,7 +2015,7 @@ const T& value, Compare comp); namespace ranges { - template S, class T, class Proj = identity, + template S, class T, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I lower_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); @@ -2036,7 +2036,7 @@ const T& value, Compare comp); namespace ranges { - template S, class T, class Proj = identity, + template S, class T, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I upper_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); template S, class T, class Proj = identity, + template S, class T, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr subrange equal_range(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); @@ -2077,7 +2077,7 @@ const T& value, Compare comp); namespace ranges { - template S, class T, class Proj = identity, + template S, class T, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr bool binary_search(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); @@ -2096,7 +2096,7 @@ ForwardIterator first, ForwardIterator last, Predicate pred); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr bool is_partitioned(I first, S last, Pred pred, Proj proj = {}); template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr subrange partition(I first, S last, Pred pred, Proj proj = {}); @@ -2137,7 +2137,7 @@ Predicate pred); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> requires Permutable subrange stable_partition(I first, S last, Pred pred, Proj proj = {}); @@ -2183,7 +2183,7 @@ } }; - template S, weakly_incrementable O1, weakly_incrementable O2, + template S, weakly_incrementable O1, weakly_incrementable O2, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable && IndirectlyCopyable constexpr partition_copy_result @@ -2204,7 +2204,7 @@ Predicate pred); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr I partition_point(I first, S last, Pred pred, Proj proj = {}); template using merge_result = binary_transform_result; - template S1, InputIterator I2, Sentinel S2, + template S1, InputIterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -2279,7 +2279,7 @@ BidirectionalIterator last, Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable I inplace_merge(I first, I middle, S last, Comp comp = {}, Proj proj = {}); @@ -2310,7 +2310,7 @@ Compare comp); namespace ranges { - template S1, InputIterator I2, Sentinel S2, + template S1, InputIterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectStrictWeakOrder, projected> Comp = ranges::less> @@ -2353,7 +2353,7 @@ template using set_union_result = binary_transform_result; - template S1, InputIterator I2, Sentinel S2, + template S1, InputIterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -2397,7 +2397,7 @@ template using set_intersection_result = binary_transform_result; - template S1, InputIterator I2, Sentinel S2, + template S1, InputIterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -2441,7 +2441,7 @@ template using set_difference_result = copy_result; - template S1, InputIterator I2, Sentinel S2, + template S1, InputIterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -2485,7 +2485,7 @@ template using set_symmetric_difference_result = binary_transform_result; - template S1, InputIterator I2, Sentinel S2, + template S1, InputIterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -2509,7 +2509,7 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -2527,7 +2527,7 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -2545,7 +2545,7 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -2563,7 +2563,7 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -2588,7 +2588,7 @@ Compare comp); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr bool is_heap(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Proj = identity, + template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I is_heap_until(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Proj = identity, + template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I min_element(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Proj = identity, + template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I max_element(I first, S last, Comp comp = {}, Proj proj = {}); template using minmax_element_result = minmax_result; - template S, class Proj = identity, + template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr minmax_element_result minmax_element(I first, S last, Comp comp = {}, Proj proj = {}); @@ -2815,7 +2815,7 @@ Compare comp); namespace ranges { - template S1, InputIterator I2, Sentinel S2, + template S1, InputIterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectStrictWeakOrder, projected> Comp = ranges::less> @@ -2858,7 +2858,7 @@ I in; }; - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr next_permutation_result @@ -2881,7 +2881,7 @@ template using prev_permutation_result = next_permutation_result; - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr prev_permutation_result @@ -2907,7 +2907,7 @@ bool all_of(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr bool ranges::all_of(I first, S last, Pred pred, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr bool ranges::any_of(I first, S last, Pred pred, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr bool ranges::none_of(I first, S last, Pred pred, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryInvocable> Fun> constexpr ranges::for_each_result ranges::for_each(I first, S last, Fun f, Proj proj = {}); @@ -3223,21 +3223,21 @@ ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class T, class Proj = identity> +template S, class T, class Proj = identity> requires IndirectRelation, const T*> constexpr I ranges::find(I first, S last, const T& value, Proj proj = {}); template requires IndirectRelation, Proj>, const T*> constexpr safe_iterator_t ranges::find(R&& r, const T& value, Proj proj = {}); -template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr I ranges::find_if(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> constexpr safe_iterator_t ranges::find_if(R&& r, Pred pred, Proj proj = {}); -template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr I ranges::find_if_not(I first, S last, Pred pred, Proj proj = {}); template S1, ForwardIterator I2, Sentinel S2, +template S1, ForwardIterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires IndirectlyComparable constexpr subrange @@ -3383,7 +3383,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); -template S1, ForwardIterator I2, Sentinel S2, +template S1, ForwardIterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectRelation, projected> Pred = ranges::equal_to> @@ -3450,7 +3450,7 @@ ForwardIterator first, ForwardIterator last, BinaryPredicate pred); -template S, class Proj = identity, +template S, class Proj = identity, IndirectRelation> Pred = ranges::equal_to> constexpr I ranges::adjacent_find(I first, S last, Pred pred = {}, Proj proj = {}); template S, class T, class Proj = identity> +template S, class T, class Proj = identity> requires IndirectRelation, const T*> constexpr iter_difference_t ranges::count(I first, S last, const T& value, Proj proj = {}); @@ -3515,7 +3515,7 @@ requires IndirectRelation, Proj>, const T*> constexpr range_difference_t ranges::count(R&& r, const T& value, Proj proj = {}); -template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr iter_difference_t ranges::count_if(I first, S last, Pred pred, Proj proj = {}); @@ -3604,7 +3604,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); -template S1, InputIterator I2, Sentinel S2, +template S1, InputIterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectRelation, projected> Pred = ranges::equal_to> @@ -3697,7 +3697,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); -template S1, InputIterator I2, Sentinel S2, +template S1, InputIterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires IndirectlyComparable constexpr bool ranges::equal(I1 first1, S1 last1, I2 first2, S2 last2, @@ -3828,8 +3828,8 @@ \indexlibrary{\idxcode{is_permutation}}% \begin{itemdecl} -template S1, ForwardIterator I2, - Sentinel S2, class Pred = ranges::equal_to, class Proj1 = identity, +template S1, ForwardIterator I2, + sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires IndirectlyComparable constexpr bool ranges::is_permutation(I1 first1, S1 last1, I2 first2, S2 last2, @@ -3916,8 +3916,8 @@ \indexlibrary{\idxcode{search}}% \begin{itemdecl} -template S1, ForwardIterator I2, - Sentinel S2, class Pred = ranges::equal_to, +template S1, ForwardIterator I2, + sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires IndirectlyComparable constexpr subrange @@ -4004,7 +4004,7 @@ \indexlibrary{\idxcode{search_n}}% \begin{itemdecl} -template S, class T, +template S, class T, class Pred = ranges::equal_to, class Proj = identity> requires IndirectlyComparable constexpr subrange @@ -4061,7 +4061,7 @@ constexpr OutputIterator copy(InputIterator first, InputIterator last, OutputIterator result); -template S, weakly_incrementable O> +template S, weakly_incrementable O> requires IndirectlyCopyable constexpr ranges::copy_result ranges::copy(I first, S last, O result); template @@ -4181,7 +4181,7 @@ ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 result, Predicate pred); -template S, weakly_incrementable O, class Proj = identity, +template S, weakly_incrementable O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr ranges::copy_if_result @@ -4253,7 +4253,7 @@ BidirectionalIterator1 last, BidirectionalIterator2 result); -template S1, BidirectionalIterator I2> +template S1, BidirectionalIterator I2> requires IndirectlyCopyable constexpr ranges::copy_backward_result ranges::copy_backward(I1 first, S1 last, I2 result); @@ -4305,7 +4305,7 @@ constexpr OutputIterator move(InputIterator first, InputIterator last, OutputIterator result); -template S, weakly_incrementable O> +template S, weakly_incrementable O> requires IndirectlyMovable constexpr ranges::move_result ranges::move(I first, S last, O result); @@ -4395,7 +4395,7 @@ move_backward(BidirectionalIterator1 first, BidirectionalIterator1 last, BidirectionalIterator2 result); -template S1, BidirectionalIterator I2> +template S1, BidirectionalIterator I2> requires IndirectlyMovable constexpr ranges::move_backward_result ranges::move_backward(I1 first, S1 last, I2 result); @@ -4462,7 +4462,7 @@ ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2); -template S1, InputIterator I2, Sentinel S2> +template S1, InputIterator I2, sentinel_for S2> requires IndirectlySwappable constexpr ranges::swap_ranges_result ranges::swap_ranges(I1 first1, S1 last1, I2 first2, S2 last2); @@ -4565,7 +4565,7 @@ ForwardIterator2 first2, ForwardIterator result, BinaryOperation binary_op); -template S, weakly_incrementable O, +template S, weakly_incrementable O, copy_constructible F, class Proj = identity> requires writable>> constexpr ranges::unary_transform_result @@ -4575,7 +4575,7 @@ requires writable, Proj>>> constexpr ranges::unary_transform_result, O> ranges::transform(R&& r, O result, F op, Proj proj = {}); -template S1, InputIterator I2, Sentinel S2, +template S1, InputIterator I2, sentinel_for S2, weakly_incrementable O, copy_constructible F, class Proj1 = identity, class Proj2 = identity> requires writable, @@ -4684,7 +4684,7 @@ ForwardIterator first, ForwardIterator last, Predicate pred, const T& new_value); -template S, class T1, class T2, class Proj = identity> +template S, class T1, class T2, class Proj = identity> requires writable && IndirectRelation, const T1*> constexpr I @@ -4694,7 +4694,7 @@ IndirectRelation, Proj>, const T1*> constexpr safe_iterator_t ranges::replace(R&& r, const T1& old_value, const T2& new_value, Proj proj = {}); -template S, class T, class Proj = identity, +template S, class T, class Proj = identity, IndirectUnaryPredicate> Pred> requires writable constexpr I ranges::replace_if(I first, S last, Pred pred, const T& new_value, Proj proj = {}); @@ -4763,7 +4763,7 @@ ForwardIterator2 result, Predicate pred, const T& new_value); -template S, class T1, class T2, OutputIterator O, +template S, class T1, class T2, OutputIterator O, class Proj = identity> requires IndirectlyCopyable && IndirectRelation, const T1*> @@ -4778,7 +4778,7 @@ ranges::replace_copy(R&& r, O result, const T1& old_value, const T2& new_value, Proj proj = {}); -template S, class T, OutputIterator O, +template S, class T, OutputIterator O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr ranges::replace_copy_if_result @@ -4857,7 +4857,7 @@ ForwardIterator first, Size n, const T& value); -template O, Sentinel S> +template O, sentinel_for S> constexpr O ranges::fill(O first, S last, const T& value); template R> constexpr safe_iterator_t ranges::fill(R&& r, const T& value); @@ -4910,7 +4910,7 @@ ForwardIterator generate_n(ExecutionPolicy&& exec, ForwardIterator first, Size n, Generator gen); -template S, copy_constructible F> +template S, copy_constructible F> requires invocable && writable> constexpr O ranges::generate(O first, S last, F gen); template @@ -4966,7 +4966,7 @@ ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class T, class Proj = identity> +template S, class T, class Proj = identity> requires IndirectRelation, const T*> constexpr subrange ranges::remove(I first, S last, const T& value, Proj proj = {}); template @@ -4974,7 +4974,7 @@ IndirectRelation, Proj>, const T*> constexpr safe_subrange_t ranges::remove(R&& r, const T& value, Proj proj = {}); -template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr subrange ranges::remove_if(I first, S last, Pred pred, Proj proj = {}); template S, weakly_incrementable O, class T, +template S, weakly_incrementable O, class T, class Proj = identity> requires IndirectlyCopyable && IndirectRelation, const T*> @@ -5068,7 +5068,7 @@ IndirectRelation, Proj>, const T*> constexpr ranges::remove_copy_result, O> ranges::remove_copy(R&& r, O result, const T& value, Proj proj = {}); -template S, weakly_incrementable O, +template S, weakly_incrementable O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr ranges::remove_copy_if_result @@ -5145,7 +5145,7 @@ ForwardIterator first, ForwardIterator last, BinaryPredicate pred); -template S, class Proj = identity, +template S, class Proj = identity, IndirectRelation> C = ranges::equal_to> constexpr subrange ranges::unique(I first, S last, C comp = {}, Proj proj = {}); template S, weakly_incrementable O, +template S, weakly_incrementable O, class Proj = identity, IndirectRelation> C = ranges::equal_to> requires IndirectlyCopyable && (ForwardIterator || @@ -5322,7 +5322,7 @@ void reverse(ExecutionPolicy&& exec, BidirectionalIterator first, BidirectionalIterator last); -template S> +template S> requires Permutable constexpr I ranges::reverse(I first, S last); template @@ -5365,7 +5365,7 @@ BidirectionalIterator first, BidirectionalIterator last, ForwardIterator result); -template S, weakly_incrementable O> +template S, weakly_incrementable O> requires IndirectlyCopyable constexpr ranges::reverse_copy_result ranges::reverse_copy(I first, S last, O result); @@ -5417,7 +5417,7 @@ rotate(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator middle, ForwardIterator last); -template S> +template S> constexpr subrange ranges::rotate(I first, I middle, S last); \end{itemdecl} @@ -5482,7 +5482,7 @@ ForwardIterator1 first, ForwardIterator1 middle, ForwardIterator1 last, ForwardIterator2 result); - template S, weakly_incrementable O> + template S, weakly_incrementable O> requires IndirectlyCopyable constexpr ranges::rotate_copy_result ranges::rotate_copy(I first, I middle, S last, O result); @@ -5613,7 +5613,7 @@ RandomAccessIterator last, UniformRandomBitGenerator&& g); -template S, class Gen> +template S, class Gen> requires Permutable && UniformRandomBitGenerator> I ranges::shuffle(I first, S last, Gen&& g); @@ -5844,7 +5844,7 @@ RandomAccessIterator first, RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -5903,7 +5903,7 @@ RandomAccessIterator first, RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable I ranges::stable_sort(I first, S last, Comp comp = {}, Proj proj = {}); @@ -5975,7 +5975,7 @@ RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -6066,7 +6066,7 @@ RandomAccessIterator result_last, Compare comp); -template S1, RandomAccessIterator I2, Sentinel S2, +template S1, RandomAccessIterator I2, sentinel_for S2, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires IndirectlyCopyable && Sortable && IndirectStrictWeakOrder, projected> @@ -6204,7 +6204,7 @@ \indexlibrary{\idxcode{is_sorted}}% \begin{itemdecl} -template S, class Proj = identity, +template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr bool ranges::is_sorted(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I ranges::is_sorted_until(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -6374,7 +6374,7 @@ lower_bound(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); -template S, class T, class Proj = identity, +template S, class T, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I ranges::lower_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); @@ -6422,7 +6422,7 @@ upper_bound(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); -template S, class T, class Proj = identity, +template S, class T, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I ranges::upper_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); template S, class T, class Proj = identity, +template S, class T, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr subrange ranges::equal_range(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); @@ -6534,7 +6534,7 @@ binary_search(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); -template S, class T, class Proj = identity, +template S, class T, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr bool ranges::binary_search(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); @@ -6584,7 +6584,7 @@ bool is_partitioned(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr bool ranges::is_partitioned(I first, S last, Pred pred, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr subrange ranges::partition(I first, S last, Pred pred, Proj proj = {}); @@ -6688,7 +6688,7 @@ stable_partition(ExecutionPolicy&& exec, BidirectionalIterator first, BidirectionalIterator last, Predicate pred); -template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> requires Permutable subrange ranges::stable_partition(I first, S last, Pred pred, Proj proj = {}); @@ -6760,7 +6760,7 @@ ForwardIterator first, ForwardIterator last, ForwardIterator1 out_true, ForwardIterator2 out_false, Predicate pred); -template S, weakly_incrementable O1, weakly_incrementable O2, +template S, weakly_incrementable O1, weakly_incrementable O2, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable && IndirectlyCopyable constexpr ranges::partition_copy_result @@ -6822,7 +6822,7 @@ constexpr ForwardIterator partition_point(ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr I ranges::partition_point(I first, S last, Pred pred, Proj proj = {}); template S1, InputIterator I2, Sentinel S2, +template S1, InputIterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -6978,7 +6978,7 @@ BidirectionalIterator middle, BidirectionalIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable I ranges::inplace_merge(I first, I middle, S last, Comp comp = {}, Proj proj = {}); @@ -7078,7 +7078,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, Compare comp); -template S1, InputIterator I2, Sentinel S2, +template S1, InputIterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectStrictWeakOrder, projected> Comp = ranges::less> @@ -7152,7 +7152,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, ForwardIterator result, Compare comp); -template S1, InputIterator I2, Sentinel S2, +template S1, InputIterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -7247,7 +7247,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, ForwardIterator result, Compare comp); -template S1, InputIterator I2, Sentinel S2, +template S1, InputIterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -7340,7 +7340,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, ForwardIterator result, Compare comp); -template S1, InputIterator I2, Sentinel S2, +template S1, InputIterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -7434,7 +7434,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, ForwardIterator result, Compare comp); -template S1, InputIterator I2, Sentinel S2, +template S1, InputIterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -7541,7 +7541,7 @@ constexpr void push_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -7592,7 +7592,7 @@ constexpr void pop_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -7650,7 +7650,7 @@ constexpr void make_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -7699,7 +7699,7 @@ constexpr void sort_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -7804,7 +7804,7 @@ \indexlibrary{\idxcode{is_heap}}% \begin{itemdecl} -template S, class Proj = identity, +template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr bool ranges::is_heap(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I ranges::is_heap_until(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I ranges::min_element(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I ranges::max_element(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr ranges::minmax_result ranges::minmax_element(I first, S last, Comp comp = {}, Proj proj = {}); @@ -8306,7 +8306,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, Compare comp); -template S1, InputIterator I2, Sentinel S2, +template S1, InputIterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectStrictWeakOrder, projected> Comp = ranges::less> @@ -8428,7 +8428,7 @@ constexpr bool next_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr ranges::next_permutation_result @@ -8487,7 +8487,7 @@ constexpr bool prev_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr ranges::prev_permutation_result diff --git a/source/iterators.tex b/source/iterators.tex index 9ecd0e300b..8c016fe8b0 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -105,9 +105,9 @@ template concept input_or_output_iterator = @\seebelow@; - // \ref{iterator.concept.sentinel}, concept \libconcept{Sentinel} + // \ref{iterator.concept.sentinel}, concept \libconcept{sentinel_for} template - concept Sentinel = @\seebelow@; + concept sentinel_for = @\seebelow@; // \ref{iterator.concept.sizedsentinel}, concept \libconcept{SizedSentinel} template @@ -234,13 +234,13 @@ // \ref{range.iter.op.advance}, \tcode{ranges::advance} template constexpr void advance(I& i, iter_difference_t n); - template S> + template S> constexpr void advance(I& i, S bound); - template S> + template S> constexpr iter_difference_t advance(I& i, iter_difference_t n, S bound); // \ref{range.iter.op.distance}, \tcode{ranges::distance} - template S> + template S> constexpr iter_difference_t distance(I first, S last); template constexpr range_difference_t distance(R&& r); @@ -250,9 +250,9 @@ constexpr I next(I x); template constexpr I next(I x, iter_difference_t n); - template S> + template S> constexpr I next(I x, S bound); - template S> + template S> constexpr I next(I x, iter_difference_t n, S bound); // \ref{range.iter.op.prev}, \tcode{ranges::prev} @@ -366,7 +366,7 @@ template class move_sentinel; // \ref{iterators.common}, common iterators - template S> + template S> requires (!same_as) class common_iterator; @@ -1494,17 +1494,17 @@ the \libconcept{input_or_output_iterator} concept does not require copyability. \end{note} -\rSec3[iterator.concept.sentinel]{Concept \libconcept{Sentinel}} +\rSec3[iterator.concept.sentinel]{Concept \libconcept{sentinel_for}} \pnum -The \libconcept{Sentinel} concept specifies the relationship +The \libconcept{sentinel_for} concept specifies the relationship between an \libconcept{input_or_output_iterator} type and a \libconcept{semiregular} type whose values denote a range. -\indexlibrary{\idxcode{Sentinel}}% +\indexlibrary{\idxcode{sentinel_for}}% \begin{itemdecl} template - concept Sentinel = + concept sentinel_for = semiregular && input_or_output_iterator && @\placeholder{weakly-equality-comparable-with}@; // See \ref{concept.equalitycomparable} @@ -1514,7 +1514,7 @@ \pnum Let \tcode{s} and \tcode{i} be values of type \tcode{S} and \tcode{I} such that \range{i}{s} denotes a range. Types -\tcode{S} and \tcode{I} model \tcode{\libconcept{Sentinel}} only if +\tcode{S} and \tcode{I} model \tcode{\libconcept{sentinel_for}} only if \begin{itemize} \item \tcode{i == s} is well-defined. @@ -1536,7 +1536,7 @@ \pnum The \libconcept{SizedSentinel} concept specifies -requirements on an \libconcept{input_or_output_iterator} and a \libconcept{Sentinel} +requirements on an \libconcept{input_or_output_iterator} and a \libconcept{sentinel_for} that allow the use of the \tcode{-} operator to compute the distance between them in constant time. @@ -1545,7 +1545,7 @@ \begin{itemdecl} template concept SizedSentinel = - Sentinel && + sentinel_for && !disable_sized_sentinel, remove_cv_t> && requires(const I& i, const S& s) { { s - i } -> same_as>; @@ -1674,7 +1674,7 @@ InputIterator && derived_from<@\placeholdernc{ITER_CONCEPT}@(I), forward_iterator_tag> && incrementable && - Sentinel; + sentinel_for; \end{codeblock} \pnum @@ -2861,7 +2861,7 @@ \indexlibrary{\idxcode{advance}}% \begin{itemdecl} -template S> +template S> constexpr void ranges::advance(I& i, S bound); \end{itemdecl} @@ -2884,7 +2884,7 @@ \indexlibrary{\idxcode{advance}}% \begin{itemdecl} -template S> +template S> constexpr iter_difference_t ranges::advance(I& i, iter_difference_t n, S bound); \end{itemdecl} @@ -2926,7 +2926,7 @@ \rSec3[range.iter.op.distance]{\tcode{ranges::distance}} \indexlibrary{\idxcode{distance}}% \begin{itemdecl} -template S> +template S> constexpr iter_difference_t ranges::distance(I first, S last); \end{itemdecl} @@ -2993,7 +2993,7 @@ \indexlibrary{\idxcode{next}}% \begin{itemdecl} -template S> +template S> constexpr I ranges::next(I x, S bound); \end{itemdecl} @@ -3004,7 +3004,7 @@ \indexlibrary{\idxcode{next}}% \begin{itemdecl} -template S> +template S> constexpr I ranges::next(I x, iter_difference_t n, S bound); \end{itemdecl} @@ -4086,7 +4086,7 @@ constexpr move_iterator& operator-=(difference_type n); constexpr reference operator[](difference_type n) const; - template S> + template S> friend constexpr bool operator==(const move_iterator& x, const move_sentinel& y); template S> @@ -4357,7 +4357,7 @@ template constexpr bool operator==(const move_iterator& x, const move_iterator& y); -template S> +template S> friend constexpr bool operator==(const move_iterator& x, const move_sentinel& y); \end{itemdecl} @@ -4528,9 +4528,9 @@ \pnum Class template \tcode{move_sentinel} is a sentinel adaptor useful for denoting ranges together with \tcode{move_iterator}. When an input iterator type -\tcode{I} and sentinel type \tcode{S} model \tcode{\libconcept{Sentinel}}, +\tcode{I} and sentinel type \tcode{S} model \tcode{\libconcept{sentinel_for}}, \tcode{move_sentinel} and \tcode{move_iterator} model -\tcode{Sentinel, move_iterator{>}} as well. +\tcode{sentinel_for, move_iterator{>}} as well. \pnum \begin{example} @@ -4538,7 +4538,7 @@ \tcode{copy_if} using \tcode{move_iterator} and \tcode{move_sentinel}: \begin{codeblock} -template S, weakly_incrementable O, +template S, weakly_incrementable O, IndirectUnaryPredicate Pred> requires IndirectlyMovable void move_if(I first, S last, O out, Pred pred) { @@ -4652,7 +4652,7 @@ \indexlibrary{\idxcode{common_iterator}}% \begin{codeblock} namespace std { - template S> + template S> requires (!same_as) class common_iterator { public: @@ -4677,12 +4677,12 @@ common_iterator& operator++(); decltype(auto) operator++(int); - template S2> - requires Sentinel + template S2> + requires sentinel_for friend bool operator==( const common_iterator& x, const common_iterator& y); - template S2> - requires Sentinel && equality_comparable_with + template S2> + requires sentinel_for && equality_comparable_with friend bool operator==( const common_iterator& x, const common_iterator& y); @@ -4924,8 +4924,8 @@ \indexlibrarymember{operator==}{common_iterator}% \begin{itemdecl} -template S2> - requires Sentinel +template S2> + requires sentinel_for friend bool operator==( const common_iterator& x, const common_iterator& y); \end{itemdecl} @@ -4945,8 +4945,8 @@ \indexlibrarymember{operator==}{common_iterator}% \begin{itemdecl} -template S2> - requires Sentinel && equality_comparable_with +template S2> + requires sentinel_for && equality_comparable_with friend bool operator==( const common_iterator& x, const common_iterator& y); \end{itemdecl} diff --git a/source/ranges.tex b/source/ranges.tex index 7a832a3652..17dec879b9 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -112,7 +112,7 @@ // \ref{range.subrange}, sub-ranges enum class subrange_kind : bool { unsized, sized }; - template S = I, subrange_kind K = @\seebelow@> + template S = I, subrange_kind K = @\seebelow@> requires (K == subrange_kind::sized || !SizedSentinel) class subrange; @@ -360,12 +360,12 @@ Otherwise, if \tcode{E} is an lvalue, \tcode{\placeholdernc{decay-copy}(E.end())} if it is a valid expression and its type \tcode{S} models - \tcode{Sentinel}. + \tcode{sentinel_for}. \item Otherwise, \tcode{\placeholdernc{decay-copy}(end(E))} if it is a valid expression and its type \tcode{S} models - \tcode{Sentinel} with overload + \tcode{sentinel_for} with overload resolution performed in a context that includes the declarations: \begin{codeblock} template void end(T&&) = delete; @@ -387,7 +387,7 @@ Whenever \tcode{ranges::end(E)} is a valid expression, the types \tcode{S} and \tcode{I} of \tcode{ranges::end(E)} and \tcode{ranges::begin(E)} -model \tcode{\libconcept{Sentinel}}. +model \tcode{\libconcept{sentinel_for}}. \end{note} \rSec2[range.access.cbegin]{\tcode{ranges::cbegin}} @@ -424,7 +424,7 @@ Whenever \tcode{ranges::cend(E)} is a valid expression, the types \tcode{S} and \tcode{I} of \tcode{ranges::cend(E)} and \tcode{ranges::cbegin(E)} -model \tcode{\libconcept{Sentinel}}. +model \tcode{\libconcept{sentinel_for}}. \end{note} \rSec2[range.access.rbegin]{\tcode{ranges::rbegin}} @@ -480,12 +480,12 @@ \item If \tcode{E} is an lvalue, \tcode{\placeholdernc{decay-copy}(E.rend())} if it is a valid expression and its type \tcode{S} models - \tcode{Sentinel<\brk{}decltype(ranges::rbegin(E))>}. + \tcode{sentinel_for<\brk{}decltype(ranges::rbegin(E))>}. \item Otherwise, \tcode{\placeholdernc{decay-copy}(rend(E))} if it is a valid expression and its type \tcode{S} models - \tcode{Sentinel} with overload + \tcode{sentinel_for} with overload resolution performed in a context that includes the declaration: \begin{codeblock} template void rend(T&&) = delete; @@ -512,7 +512,7 @@ Whenever \tcode{ranges::rend(E)} is a valid expression, the types \tcode{S} and \tcode{I} of \tcode{ranges::rend(E)} and \tcode{ranges::rbegin(E)} -model \tcode{\libconcept{Sentinel}}. +model \tcode{\libconcept{sentinel_for}}. \end{note} \rSec2[range.access.crbegin]{\tcode{ranges::crbegin}} @@ -550,7 +550,7 @@ Whenever \tcode{ranges::crend(E)} is a valid expression, the types \tcode{S} and \tcode{I} of \tcode{ranges::crend(E)} and \tcode{ranges::crbegin(E)} -model \tcode{\libconcept{Sentinel}}. +model \tcode{\libconcept{sentinel_for}}. \end{note} \rSec2[range.prim.size]{\tcode{ranges::size}} @@ -706,7 +706,7 @@ whose type models \libconcept{input_or_output_iterator}\iref{iterator.concept.iterator}. Calling \tcode{ranges::end} on a range returns an object whose type \tcode{S}, together with the type \tcode{I} of the object returned by \tcode{ranges::begin}, -models \tcode{\libconcept{Sentinel}}. +models \tcode{\libconcept{sentinel_for}}. The library formalizes the interfaces, semantics, and complexity of ranges to enable algorithms and range adaptors that work efficiently on different types of sequences. @@ -1234,9 +1234,9 @@ template concept @\placeholdernc{iterator-sentinel-pair}@ = // \expos !Range && @\placeholdernc{pair-like}@ && - Sentinel, tuple_element_t<0, T>>; + sentinel_for, tuple_element_t<0, T>>; - template S = I, subrange_kind K = + template S = I, subrange_kind K = SizedSentinel ? subrange_kind::sized : subrange_kind::unsized> requires (K == subrange_kind::sized || !SizedSentinel) class subrange : public view_interface> { @@ -1301,7 +1301,7 @@ friend constexpr S end(subrange&& r) { return r.end(); } }; - template S> + template S> subrange(I, S, @\placeholdernc{make-unsigned-like-t}@(iter_difference_t)) -> subrange; diff --git a/source/utilities.tex b/source/utilities.tex index 475a9a7e7d..af0a6ada7f 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -6529,7 +6529,7 @@ namespace ranges { template using uninitialized_copy_result = copy_result; - template S1, + template S1, @\placeholdernc{no-throw-forward-iterator}@ O, @\placeholdernc{no-throw-sentinel}@ S2> requires constructible_from, iter_reference_t> uninitialized_copy_result @@ -6565,7 +6565,7 @@ namespace ranges { template using uninitialized_move_result = uninitialized_copy_result; - template S1, + template S1, @\placeholdernc{no-throw-forward-iterator}@ O, @\placeholdernc{no-throw-sentinel}@ S2> requires constructible_from, iter_rvalue_reference_t> uninitialized_move_result @@ -7947,7 +7947,7 @@ \begin{itemdecl} template -concept @\placeholdernc{no-throw-sentinel}@ = Sentinel; // exposition only +concept @\placeholdernc{no-throw-sentinel}@ = sentinel_for; // exposition only \end{itemdecl} \begin{itemdescr} @@ -7959,7 +7959,7 @@ \pnum \begin{note} -This concept allows some \libconcept{Sentinel}\iref{iterator.concept.sentinel} +This concept allows some \libconcept{sentinel_for}\iref{iterator.concept.sentinel} operations to throw exceptions. \end{note} \end{itemdescr} @@ -8205,7 +8205,7 @@ \indexlibrary{\idxcode{uninitialized_copy}}% \begin{itemdecl} namespace ranges { - template S1, + template S1, @\placeholdernc{no-throw-forward-iterator}@ O, @\placeholdernc{no-throw-sentinel}@ S2> requires constructible_from, iter_reference_t> uninitialized_copy_result @@ -8310,7 +8310,7 @@ \indexlibrary{\idxcode{uninitialized_move}}% \begin{itemdecl} namespace ranges { - template S1, + template S1, @\placeholdernc{no-throw-forward-iterator}@ O, @\placeholdernc{no-throw-sentinel}@ S2> requires constructible_from, iter_rvalue_reference_t> uninitialized_move_result From 6c4f52782f5c89d23f2be162c184b48b719bd912 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 15:48:44 -0700 Subject: [PATCH 40/84] [everywhere] Rename concept 'SizedSentinel' to 'sized_sentinel_for'. --- source/algorithms.tex | 6 +++--- source/iterators.tex | 46 +++++++++++++++++++++---------------------- source/ranges.tex | 44 ++++++++++++++++++++--------------------- 3 files changed, 48 insertions(+), 48 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 0ca370f968..8dedcccf3d 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -3749,7 +3749,7 @@ \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} for the overloads in namespace \tcode{std}, or \item - pairwise model \libconcept{SizedSentinel}\iref{iterator.concept.sizedsentinel} + pairwise model \libconcept{sized_sentinel_for}\iref{iterator.concept.sizedsentinel} for the overloads in namespace \tcode{ranges}, \end{itemize} and \tcode{last1 - first1 != last2 - first2}, @@ -3857,8 +3857,8 @@ \complexity No applications of the corresponding predicate and projections if: \begin{itemize} -\item \tcode{S1} and \tcode{I1} model \libconcept{SizedSentinel}, -\item \tcode{S2} and \tcode{I2} model \libconcept{SizedSentinel}, and +\item \tcode{S1} and \tcode{I1} model \libconcept{sized_sentinel_for}, +\item \tcode{S2} and \tcode{I2} model \libconcept{sized_sentinel_for}, and \item \tcode{last1 - first1 != last2 - first2}. \end{itemize} Otherwise, exactly \tcode{last1 - first1} applications diff --git a/source/iterators.tex b/source/iterators.tex index 8c016fe8b0..01da1c9f0b 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -109,12 +109,12 @@ template concept sentinel_for = @\seebelow@; - // \ref{iterator.concept.sizedsentinel}, concept \libconcept{SizedSentinel} + // \ref{iterator.concept.sizedsentinel}, concept \libconcept{sized_sentinel_for} template inline constexpr bool disable_sized_sentinel = false; template - concept SizedSentinel = @\seebelow@; + concept sized_sentinel_for = @\seebelow@; // \ref{iterator.concept.input}, concept \libconcept{InputIterator} template @@ -311,7 +311,7 @@ constexpr reverse_iterator make_reverse_iterator(Iterator i); template - requires (!SizedSentinel) + requires (!sized_sentinel_for) inline constexpr bool disable_sized_sentinel, reverse_iterator> = true; @@ -1532,19 +1532,19 @@ to \tcode{i}. Consequently, \tcode{i == s} is no longer required to be well-defined. -\rSec3[iterator.concept.sizedsentinel]{Concept \libconcept{SizedSentinel}} +\rSec3[iterator.concept.sizedsentinel]{Concept \libconcept{sized_sentinel_for}} \pnum -The \libconcept{SizedSentinel} concept specifies +The \libconcept{sized_sentinel_for} concept specifies requirements on an \libconcept{input_or_output_iterator} and a \libconcept{sentinel_for} that allow the use of the \tcode{-} operator to compute the distance between them in constant time. -\indexlibrary{\idxcode{SizedSentinel}}% +\indexlibrary{\idxcode{sized_sentinel_for}}% \begin{itemdecl} template - concept SizedSentinel = + concept sized_sentinel_for = sentinel_for && !disable_sized_sentinel, remove_cv_t> && requires(const I& i, const S& s) { @@ -1559,7 +1559,7 @@ a sentinel of type \tcode{S} such that \range{i}{s} denotes a range. Let $N$ be the smallest number of applications of \tcode{++i} necessary to make \tcode{bool(i == s)} be \tcode{true}. -\tcode{S} and \tcode{I} model \tcode{\libconcept{SizedSentinel}} only if +\tcode{S} and \tcode{I} model \tcode{\libconcept{sized_sentinel_for}} only if \begin{itemize} \item If $N$ is representable by \tcode{iter_difference_t}, @@ -1590,12 +1590,12 @@ \pnum \begin{note} \tcode{disable_sized_sentinel} allows use of sentinels and iterators with -the library that satisfy but do not in fact model \libconcept{SizedSentinel}. +the library that satisfy but do not in fact model \libconcept{sized_sentinel_for}. \end{note} \pnum \begin{example} -The \libconcept{SizedSentinel} concept is modeled by pairs of +The \libconcept{sized_sentinel_for} concept is modeled by pairs of \libconcept{RandomAccessIterator}s\iref{iterator.concept.random.access} and by counted iterators and their sentinels\iref{counted.iterator}. \end{example} @@ -1768,7 +1768,7 @@ BidirectionalIterator && derived_from<@\placeholdernc{ITER_CONCEPT}@(I), random_access_iterator_tag> && totally_ordered && - SizedSentinel && + sized_sentinel_for && requires(I i, const I j, const iter_difference_t n) { { i += n } -> same_as; { j + n } -> same_as; @@ -2875,7 +2875,7 @@ \begin{itemize} \item If \tcode{I} and \tcode{S} model \tcode{\libconcept{assignable_from}}, equivalent to \tcode{i = std::move(bound)}. -\item Otherwise, if \tcode{S} and \tcode{I} model \tcode{\libconcept{SizedSentinel}}, +\item Otherwise, if \tcode{S} and \tcode{I} model \tcode{\libconcept{sized_sentinel_for}}, equivalent to \tcode{ranges::advance(i, bound - i)}. \item Otherwise, while \tcode{bool(i != bound)} is \tcode{true}, increments \tcode{i}. @@ -2900,7 +2900,7 @@ \pnum \effects \begin{itemize} -\item If \tcode{S} and \tcode{I} model \tcode{\libconcept{SizedSentinel}}: +\item If \tcode{S} and \tcode{I} model \tcode{\libconcept{sized_sentinel_for}}: \begin{itemize} \item If \brk{}$|\tcode{n}| \ge |\tcode{bound - i}|$, equivalent to \tcode{ranges::advance(i, bound)}. @@ -2936,11 +2936,11 @@ \range{first}{last} denotes a range, or \range{last}{first} denotes a range and \tcode{S} and \tcode{I} model -\tcode{same_as \&\& SizedSentinel}. +\tcode{same_as \&\& sized_sentinel_for}. \pnum \effects -If \tcode{S} and \tcode{I} model \tcode{\libconcept{SizedSentinel}}, +If \tcode{S} and \tcode{I} model \tcode{\libconcept{sized_sentinel_for}}, returns \tcode{(last - first)}; otherwise, returns the number of increments needed to get from \tcode{first} @@ -4089,10 +4089,10 @@ template S> friend constexpr bool operator==(const move_iterator& x, const move_sentinel& y); - template S> + template S> friend constexpr iter_difference_t operator-(const move_sentinel& x, const move_iterator& y); - template S> + template S> friend constexpr iter_difference_t operator-(const move_iterator& x, const move_sentinel& y); friend constexpr iter_rvalue_reference_t @@ -4458,10 +4458,10 @@ constexpr auto operator-(const move_iterator& x, const move_iterator& y) -> decltype(x.base() - y.base()); -template S> +template S> friend constexpr iter_difference_t operator-(const move_sentinel& x, const move_iterator& y); -template S> +template S> friend constexpr iter_difference_t operator-(const move_iterator& x, const move_sentinel& y); \end{itemdecl} @@ -4686,8 +4686,8 @@ friend bool operator==( const common_iterator& x, const common_iterator& y); - template I2, SizedSentinel S2> - requires SizedSentinel + template I2, sized_sentinel_for S2> + requires sized_sentinel_for friend iter_difference_t operator-( const common_iterator& x, const common_iterator& y); @@ -4966,8 +4966,8 @@ \indexlibrarymember{operator-}{common_iterator}% \begin{itemdecl} -template I2, SizedSentinel S2> - requires SizedSentinel +template I2, sized_sentinel_for S2> + requires sized_sentinel_for friend iter_difference_t operator-( const common_iterator& x, const common_iterator& y); \end{itemdecl} diff --git a/source/ranges.tex b/source/ranges.tex index 17dec879b9..cfb20fd76a 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -113,7 +113,7 @@ enum class subrange_kind : bool { unsized, sized }; template S = I, subrange_kind K = @\seebelow@> - requires (K == subrange_kind::sized || !SizedSentinel) + requires (K == subrange_kind::sized || !sized_sentinel_for) class subrange; // \ref{range.dangling}, dangling iterator handling @@ -593,7 +593,7 @@ if it is a valid expression and the types \tcode{I} and \tcode{S} of \tcode{ranges::begin(E)} and \tcode{ranges::end(E)} (respectively) model both - \tcode{\libconcept{SizedSentinel}}\iref{iterator.concept.sizedsentinel} and + \tcode{\libconcept{sized_sentinel_for}}\iref{iterator.concept.sizedsentinel} and \tcode{\libconcept{ForwardIterator}}. However, \tcode{E} is evaluated only once. @@ -1131,11 +1131,11 @@ } constexpr auto size() requires ForwardRange && - SizedSentinel, iterator_t> { + sized_sentinel_for, iterator_t> { return ranges::end(derived()) - ranges::begin(derived()); } constexpr auto size() const requires ForwardRange && - SizedSentinel, iterator_t> { + sized_sentinel_for, iterator_t> { return ranges::end(derived()) - ranges::begin(derived()); } @@ -1237,12 +1237,12 @@ sentinel_for, tuple_element_t<0, T>>; template S = I, subrange_kind K = - SizedSentinel ? subrange_kind::sized : subrange_kind::unsized> - requires (K == subrange_kind::sized || !SizedSentinel) + sized_sentinel_for ? subrange_kind::sized : subrange_kind::unsized> + requires (K == subrange_kind::sized || !sized_sentinel_for) class subrange : public view_interface> { private: static constexpr bool StoreSize = // \expos - K == subrange_kind::sized && !SizedSentinel; + K == subrange_kind::sized && !sized_sentinel_for; I begin_ = I(); // \expos S end_ = S(); // \expos @\placeholdernc{make-unsigned-like-t}@(iter_difference_t) size_ = 0; // \expos; present only @@ -1315,7 +1315,7 @@ template<@\placeholder{forwarding-range}@ R> subrange(R&&) -> subrange, sentinel_t, - (SizedRange || SizedSentinel, iterator_t>) + (SizedRange || sized_sentinel_for, iterator_t>) ? subrange_kind::sized : subrange_kind::unsized>; template<@\placeholder{forwarding-range}@ R> @@ -1369,7 +1369,7 @@ Accepting the length of the range and storing it to later return from \tcode{size()} enables \tcode{subrange} to model \libconcept{SizedRange} even when it stores an iterator and sentinel that do not model -\libconcept{SizedSentinel}. +\libconcept{sized_sentinel_for}. \end{note} \end{itemdescr} @@ -1994,7 +1994,7 @@ \remarks The expression in the \grammarterm{requires-clause} is equivalent to \begin{codeblock} (same_as && Advanceable) || (integral && integral) || - SizedSentinel + sized_sentinel_for \end{codeblock} \end{itemdescr} @@ -2364,9 +2364,9 @@ friend constexpr bool operator==(const iterator& x, const sentinel& y); friend constexpr iter_difference_t operator-(const iterator& x, const sentinel& y) - requires SizedSentinel; + requires sized_sentinel_for; friend constexpr iter_difference_t operator-(const sentinel& x, const iterator& y) - requires SizedSentinel; + requires sized_sentinel_for; }; } \end{codeblock} @@ -2393,7 +2393,7 @@ \begin{itemdecl} friend constexpr iter_difference_t operator-(const iterator& x, const sentinel& y) - requires SizedSentinel; + requires sized_sentinel_for; \end{itemdecl} \begin{itemdescr} @@ -2403,7 +2403,7 @@ \begin{itemdecl} friend constexpr iter_difference_t operator-(const sentinel& x, const iterator& y) - requires SizedSentinel; + requires sized_sentinel_for; \end{itemdecl} \begin{itemdescr} @@ -3593,10 +3593,10 @@ friend constexpr range_difference_t operator-(const iterator& x, const sentinel& y) - requires SizedSentinel, iterator_t>; + requires sized_sentinel_for, iterator_t>; friend constexpr range_difference_t operator-(const sentinel& y, const iterator& x) - requires SizedSentinel, iterator_t>; + requires sized_sentinel_for, iterator_t>; }; } \end{codeblock} @@ -3646,7 +3646,7 @@ \begin{itemdecl} friend constexpr range_difference_t operator-(const iterator& x, const sentinel& y) - requires SizedSentinel, iterator_t>; + requires sized_sentinel_for, iterator_t>; \end{itemdecl} \begin{itemdescr} @@ -3658,7 +3658,7 @@ \begin{itemdecl} friend constexpr range_difference_t operator-(const sentinel& y, const iterator& x) - requires SizedSentinel, iterator_t>; + requires sized_sentinel_for, iterator_t>; \end{itemdecl} \begin{itemdescr} @@ -5968,10 +5968,10 @@ friend constexpr difference_type operator-(const iterator& x, const sentinel_t& y) - requires SizedSentinel, iterator_t>; + requires sized_sentinel_for, iterator_t>; friend constexpr difference_type operator-(const sentinel_t& x, const iterator& y) - requires SizedSentinel, iterator_t>; + requires sized_sentinel_for, iterator_t>; }; } \end{codeblock} @@ -6225,7 +6225,7 @@ \begin{itemdecl} friend constexpr difference_type operator-(const iterator& x, const sentinel_t& y) - requires SizedSentinel, iterator_t>; + requires sized_sentinel_for, iterator_t>; \end{itemdecl} \begin{itemdescr} @@ -6237,7 +6237,7 @@ \begin{itemdecl} friend constexpr difference_type operator-(const sentinel_t& x, const iterator& y) - requires SizedSentinel, iterator_t>; + requires sized_sentinel_for, iterator_t>; \end{itemdecl} \begin{itemdescr} From 472bb1a259fe54e7e0228a722823a7c5ccd667f9 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:01:11 -0700 Subject: [PATCH 41/84] [everywhere] Rename concept 'InputIterator' to 'input_iterator'. --- source/algorithms.tex | 152 +++++++++++++++++++++--------------------- source/iterators.tex | 42 ++++++------ source/ranges.tex | 4 +- source/utilities.tex | 20 +++--- 4 files changed, 109 insertions(+), 109 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 8dedcccf3d..fd5d89465b 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -619,7 +619,7 @@ ForwardIterator first, ForwardIterator last, Predicate pred); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr bool all_of(I first, S last, Pred pred, Proj proj = {}); template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr bool any_of(I first, S last, Pred pred, Proj proj = {}); template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr bool none_of(I first, S last, Pred pred, Proj proj = {}); template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryInvocable> Fun> constexpr for_each_result for_each(I first, S last, Fun f, Proj proj = {}); @@ -725,21 +725,21 @@ Predicate pred); namespace ranges { - template S, class T, class Proj = identity> + template S, class T, class Proj = identity> requires IndirectRelation, const T*> constexpr I find(I first, S last, const T& value, Proj proj = {}); template requires IndirectRelation, Proj>, const T*> constexpr safe_iterator_t find(R&& r, const T& value, Proj proj = {}); - template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr I find_if(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> constexpr safe_iterator_t find_if(R&& r, Pred pred, Proj proj = {}); - template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr I find_if_not(I first, S last, Pred pred, Proj proj = {}); template S1, ForwardIterator I2, sentinel_for S2, + template S1, ForwardIterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectRelation, projected> Pred = ranges::equal_to> @@ -872,7 +872,7 @@ ForwardIterator first, ForwardIterator last, Predicate pred); namespace ranges { - template S, class T, class Proj = identity> + template S, class T, class Proj = identity> requires IndirectRelation, const T*> constexpr iter_difference_t count(I first, S last, const T& value, Proj proj = {}); @@ -880,7 +880,7 @@ requires IndirectRelation, Proj>, const T*> constexpr range_difference_t count(R&& r, const T& value, Proj proj = {}); - template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr iter_difference_t count_if(I first, S last, Pred pred, Proj proj = {}); @@ -951,7 +951,7 @@ } }; - template S1, InputIterator I2, sentinel_for S2, + template S1, input_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectRelation, projected> Pred = ranges::equal_to> @@ -1002,7 +1002,7 @@ BinaryPredicate pred); namespace ranges { - template S1, InputIterator I2, sentinel_for S2, + template S1, input_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires IndirectlyComparable constexpr bool equal(I1 first1, S1 last1, I2 first2, S2 last2, @@ -1154,7 +1154,7 @@ } }; - template S, weakly_incrementable O> + template S, weakly_incrementable O> requires IndirectlyCopyable constexpr copy_result copy(I first, S last, O result); @@ -1177,7 +1177,7 @@ template using copy_n_result = copy_result; - template + template requires IndirectlyCopyable constexpr copy_n_result copy_n(I first, iter_difference_t n, O result); @@ -1196,7 +1196,7 @@ template using copy_if_result = copy_result; - template S, weakly_incrementable O, class Proj = identity, + template S, weakly_incrementable O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr copy_if_result @@ -1241,7 +1241,7 @@ template using move_result = copy_result; - template S, weakly_incrementable O> + template S, weakly_incrementable O> requires IndirectlyMovable constexpr move_result move(I first, S last, O result); @@ -1283,7 +1283,7 @@ template using swap_ranges_result = mismatch_result; - template S1, InputIterator I2, sentinel_for S2> + template S1, input_iterator I2, sentinel_for S2> requires IndirectlySwappable constexpr swap_ranges_result swap_ranges(I1 first1, S1 last1, I2 first2, S2 last2); @@ -1325,7 +1325,7 @@ template using unary_transform_result = copy_result; - template S, weakly_incrementable O, + template S, weakly_incrementable O, copy_constructible F, class Proj = identity> requires writable>> constexpr unary_transform_result @@ -1357,7 +1357,7 @@ } }; - template S1, InputIterator I2, sentinel_for S2, + template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, copy_constructible F, class Proj1 = identity, class Proj2 = identity> requires writable, @@ -1391,7 +1391,7 @@ Predicate pred, const T& new_value); namespace ranges { - template S, class T1, class T2, class Proj = identity> + template S, class T1, class T2, class Proj = identity> requires writable && IndirectRelation, const T1*> constexpr I @@ -1401,7 +1401,7 @@ IndirectRelation, Proj>, const T1*> constexpr safe_iterator_t replace(R&& r, const T1& old_value, const T2& new_value, Proj proj = {}); - template S, class T, class Proj = identity, + template S, class T, class Proj = identity, IndirectUnaryPredicate> Pred> requires writable constexpr I replace_if(I first, S last, Pred pred, const T& new_value, Proj proj = {}); @@ -1436,7 +1436,7 @@ template using replace_copy_result = copy_result; - template S, class T1, class T2, OutputIterator O, + template S, class T1, class T2, OutputIterator O, class Proj = identity> requires IndirectlyCopyable && IndirectRelation, const T1*> @@ -1454,7 +1454,7 @@ template using replace_copy_if_result = copy_result; - template S, class T, OutputIterator O, + template S, class T, OutputIterator O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr replace_copy_if_result @@ -1576,7 +1576,7 @@ template using remove_copy_result = copy_result; - template S, weakly_incrementable O, class T, + template S, weakly_incrementable O, class T, class Proj = identity> requires IndirectlyCopyable && IndirectRelation, const T*> @@ -1591,7 +1591,7 @@ template using remove_copy_if_result = copy_result; - template S, weakly_incrementable O, + template S, weakly_incrementable O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr remove_copy_if_result @@ -1652,11 +1652,11 @@ template using unique_copy_result = copy_result; - template S, weakly_incrementable O, + template S, weakly_incrementable O, class Proj = identity, IndirectRelation> C = ranges::equal_to> requires IndirectlyCopyable && (ForwardIterator || - (InputIterator && same_as, iter_value_t>) || + (input_iterator && same_as, iter_value_t>) || IndirectlyCopyableStorable) constexpr unique_copy_result unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); @@ -1664,7 +1664,7 @@ IndirectRelation, Proj>> C = ranges::equal_to> requires IndirectlyCopyable, O> && (ForwardIterator> || - (InputIterator && same_as, iter_value_t>) || + (input_iterator && same_as, iter_value_t>) || IndirectlyCopyableStorable, O>) constexpr unique_copy_result, O> unique_copy(R&& r, O result, C comp = {}, Proj proj = {}); @@ -1909,7 +1909,7 @@ namespace ranges { template using partial_sort_copy_result = copy_result; - template S1, RandomAccessIterator I2, sentinel_for S2, + template S1, RandomAccessIterator I2, sentinel_for S2, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires IndirectlyCopyable && Sortable && IndirectStrictWeakOrder, projected> @@ -2096,7 +2096,7 @@ ForwardIterator first, ForwardIterator last, Predicate pred); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr bool is_partitioned(I first, S last, Pred pred, Proj proj = {}); template S, weakly_incrementable O1, weakly_incrementable O2, + template S, weakly_incrementable O1, weakly_incrementable O2, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable && IndirectlyCopyable constexpr partition_copy_result @@ -2244,7 +2244,7 @@ template using merge_result = binary_transform_result; - template S1, InputIterator I2, sentinel_for S2, + template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -2310,7 +2310,7 @@ Compare comp); namespace ranges { - template S1, InputIterator I2, sentinel_for S2, + template S1, input_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectStrictWeakOrder, projected> Comp = ranges::less> @@ -2353,7 +2353,7 @@ template using set_union_result = binary_transform_result; - template S1, InputIterator I2, sentinel_for S2, + template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -2397,7 +2397,7 @@ template using set_intersection_result = binary_transform_result; - template S1, InputIterator I2, sentinel_for S2, + template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -2441,7 +2441,7 @@ template using set_difference_result = copy_result; - template S1, InputIterator I2, sentinel_for S2, + template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -2485,7 +2485,7 @@ template using set_symmetric_difference_result = binary_transform_result; - template S1, InputIterator I2, sentinel_for S2, + template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -2815,7 +2815,7 @@ Compare comp); namespace ranges { - template S1, InputIterator I2, sentinel_for S2, + template S1, input_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectStrictWeakOrder, projected> Comp = ranges::less> @@ -2907,7 +2907,7 @@ bool all_of(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr bool ranges::all_of(I first, S last, Pred pred, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr bool ranges::any_of(I first, S last, Pred pred, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr bool ranges::none_of(I first, S last, Pred pred, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryInvocable> Fun> constexpr ranges::for_each_result ranges::for_each(I first, S last, Fun f, Proj proj = {}); @@ -3223,21 +3223,21 @@ ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class T, class Proj = identity> +template S, class T, class Proj = identity> requires IndirectRelation, const T*> constexpr I ranges::find(I first, S last, const T& value, Proj proj = {}); template requires IndirectRelation, Proj>, const T*> constexpr safe_iterator_t ranges::find(R&& r, const T& value, Proj proj = {}); -template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr I ranges::find_if(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> constexpr safe_iterator_t ranges::find_if(R&& r, Pred pred, Proj proj = {}); -template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr I ranges::find_if_not(I first, S last, Pred pred, Proj proj = {}); template S1, ForwardIterator I2, sentinel_for S2, +template S1, ForwardIterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectRelation, projected> Pred = ranges::equal_to> @@ -3507,7 +3507,7 @@ count_if(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class T, class Proj = identity> +template S, class T, class Proj = identity> requires IndirectRelation, const T*> constexpr iter_difference_t ranges::count(I first, S last, const T& value, Proj proj = {}); @@ -3515,7 +3515,7 @@ requires IndirectRelation, Proj>, const T*> constexpr range_difference_t ranges::count(R&& r, const T& value, Proj proj = {}); -template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr iter_difference_t ranges::count_if(I first, S last, Pred pred, Proj proj = {}); @@ -3604,7 +3604,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); -template S1, InputIterator I2, sentinel_for S2, +template S1, input_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectRelation, projected> Pred = ranges::equal_to> @@ -3697,7 +3697,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); -template S1, InputIterator I2, sentinel_for S2, +template S1, input_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires IndirectlyComparable constexpr bool ranges::equal(I1 first1, S1 last1, I2 first2, S2 last2, @@ -4061,7 +4061,7 @@ constexpr OutputIterator copy(InputIterator first, InputIterator last, OutputIterator result); -template S, weakly_incrementable O> +template S, weakly_incrementable O> requires IndirectlyCopyable constexpr ranges::copy_result ranges::copy(I first, S last, O result); template @@ -4139,7 +4139,7 @@ ForwardIterator1 first, Size n, ForwardIterator2 result); -template +template requires IndirectlyCopyable constexpr ranges::copy_n_result ranges::copy_n(I first, iter_difference_t n, O result); @@ -4181,7 +4181,7 @@ ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 result, Predicate pred); -template S, weakly_incrementable O, class Proj = identity, +template S, weakly_incrementable O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr ranges::copy_if_result @@ -4305,7 +4305,7 @@ constexpr OutputIterator move(InputIterator first, InputIterator last, OutputIterator result); -template S, weakly_incrementable O> +template S, weakly_incrementable O> requires IndirectlyMovable constexpr ranges::move_result ranges::move(I first, S last, O result); @@ -4462,7 +4462,7 @@ ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2); -template S1, InputIterator I2, sentinel_for S2> +template S1, input_iterator I2, sentinel_for S2> requires IndirectlySwappable constexpr ranges::swap_ranges_result ranges::swap_ranges(I1 first1, S1 last1, I2 first2, S2 last2); @@ -4565,7 +4565,7 @@ ForwardIterator2 first2, ForwardIterator result, BinaryOperation binary_op); -template S, weakly_incrementable O, +template S, weakly_incrementable O, copy_constructible F, class Proj = identity> requires writable>> constexpr ranges::unary_transform_result @@ -4575,7 +4575,7 @@ requires writable, Proj>>> constexpr ranges::unary_transform_result, O> ranges::transform(R&& r, O result, F op, Proj proj = {}); -template S1, InputIterator I2, sentinel_for S2, +template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, copy_constructible F, class Proj1 = identity, class Proj2 = identity> requires writable, @@ -4684,7 +4684,7 @@ ForwardIterator first, ForwardIterator last, Predicate pred, const T& new_value); -template S, class T1, class T2, class Proj = identity> +template S, class T1, class T2, class Proj = identity> requires writable && IndirectRelation, const T1*> constexpr I @@ -4694,7 +4694,7 @@ IndirectRelation, Proj>, const T1*> constexpr safe_iterator_t ranges::replace(R&& r, const T1& old_value, const T2& new_value, Proj proj = {}); -template S, class T, class Proj = identity, +template S, class T, class Proj = identity, IndirectUnaryPredicate> Pred> requires writable constexpr I ranges::replace_if(I first, S last, Pred pred, const T& new_value, Proj proj = {}); @@ -4763,7 +4763,7 @@ ForwardIterator2 result, Predicate pred, const T& new_value); -template S, class T1, class T2, OutputIterator O, +template S, class T1, class T2, OutputIterator O, class Proj = identity> requires IndirectlyCopyable && IndirectRelation, const T1*> @@ -4778,7 +4778,7 @@ ranges::replace_copy(R&& r, O result, const T1& old_value, const T2& new_value, Proj proj = {}); -template S, class T, OutputIterator O, +template S, class T, OutputIterator O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr ranges::replace_copy_if_result @@ -5057,7 +5057,7 @@ ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 result, Predicate pred); -template S, weakly_incrementable O, class T, +template S, weakly_incrementable O, class T, class Proj = identity> requires IndirectlyCopyable && IndirectRelation, const T*> @@ -5068,7 +5068,7 @@ IndirectRelation, Proj>, const T*> constexpr ranges::remove_copy_result, O> ranges::remove_copy(R&& r, O result, const T& value, Proj proj = {}); -template S, weakly_incrementable O, +template S, weakly_incrementable O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr ranges::remove_copy_if_result @@ -5223,11 +5223,11 @@ ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 result, BinaryPredicate pred); -template S, weakly_incrementable O, +template S, weakly_incrementable O, class Proj = identity, IndirectRelation> C = ranges::equal_to> requires IndirectlyCopyable && (ForwardIterator || - (InputIterator && same_as, iter_value_t>) || + (input_iterator && same_as, iter_value_t>) || IndirectlyCopyableStorable) constexpr ranges::unique_copy_result ranges::unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); @@ -5235,7 +5235,7 @@ IndirectRelation, Proj>> C = ranges::equal_to> requires IndirectlyCopyable, O> && (ForwardIterator> || - (InputIterator && same_as, iter_value_t>) || + (input_iterator && same_as, iter_value_t>) || IndirectlyCopyableStorable, O>) constexpr ranges::unique_copy_result, O> ranges::unique_copy(R&& r, O result, C comp = {}, Proj proj = {}); @@ -6066,7 +6066,7 @@ RandomAccessIterator result_last, Compare comp); -template S1, RandomAccessIterator I2, sentinel_for S2, +template S1, RandomAccessIterator I2, sentinel_for S2, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires IndirectlyCopyable && Sortable && IndirectStrictWeakOrder, projected> @@ -6584,7 +6584,7 @@ bool is_partitioned(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr bool ranges::is_partitioned(I first, S last, Pred pred, Proj proj = {}); template S, weakly_incrementable O1, weakly_incrementable O2, +template S, weakly_incrementable O1, weakly_incrementable O2, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable && IndirectlyCopyable constexpr ranges::partition_copy_result @@ -6887,7 +6887,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, ForwardIterator result, Compare comp); -template S1, InputIterator I2, sentinel_for S2, +template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -7078,7 +7078,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, Compare comp); -template S1, InputIterator I2, sentinel_for S2, +template S1, input_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectStrictWeakOrder, projected> Comp = ranges::less> @@ -7152,7 +7152,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, ForwardIterator result, Compare comp); -template S1, InputIterator I2, sentinel_for S2, +template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -7247,7 +7247,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, ForwardIterator result, Compare comp); -template S1, InputIterator I2, sentinel_for S2, +template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -7340,7 +7340,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, ForwardIterator result, Compare comp); -template S1, InputIterator I2, sentinel_for S2, +template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -7434,7 +7434,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, ForwardIterator result, Compare comp); -template S1, InputIterator I2, sentinel_for S2, +template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires Mergeable @@ -8306,7 +8306,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, Compare comp); -template S1, InputIterator I2, sentinel_for S2, +template S1, input_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectStrictWeakOrder, projected> Comp = ranges::less> diff --git a/source/iterators.tex b/source/iterators.tex index 01da1c9f0b..216a586534 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -116,9 +116,9 @@ template concept sized_sentinel_for = @\seebelow@; - // \ref{iterator.concept.input}, concept \libconcept{InputIterator} + // \ref{iterator.concept.input}, concept \libconcept{input_iterator} template - concept InputIterator = @\seebelow@; + concept input_iterator = @\seebelow@; // \ref{iterator.concept.output}, concept \libconcept{OutputIterator} template @@ -373,7 +373,7 @@ template struct incrementable_traits>; - template + template struct iterator_traits>; // \ref{default.sentinels}, default sentinels @@ -386,7 +386,7 @@ template struct incrementable_traits>; - template + template struct iterator_traits>; // \ref{unreachable.sentinels}, unreachable sentinels @@ -513,7 +513,7 @@ \pnum The six categories of iterators correspond to the iterator concepts -\libconcept{InputIterator}\iref{iterator.concept.input}, +\libconcept{input_iterator}\iref{iterator.concept.input}, \libconcept{OutputIterator}\iref{iterator.concept.output}, \libconcept{ForwardIterator}\iref{iterator.concept.forward}, \libconcept{BidirectionalIterator}\iref{iterator.concept.bidir} @@ -1601,23 +1601,23 @@ \end{example} \end{itemdescr} -\rSec3[iterator.concept.input]{Concept \libconcept{InputIterator}} +\rSec3[iterator.concept.input]{Concept \libconcept{input_iterator}} \pnum -The \libconcept{InputIterator} concept defines requirements for a type +The \libconcept{input_iterator} concept defines requirements for a type whose referenced values can be read (from the requirement for \libconcept{readable}\iref{iterator.concept.readable}) and which can be both pre- and post-incremented. \begin{note} Unlike the \oldconcept{InputIterator} requirements\iref{input.iterators}, -the \libconcept{InputIterator} concept does not need +the \libconcept{input_iterator} concept does not need equality comparison since iterators are typically compared to sentinels. \end{note} -\indexlibrary{\idxcode{InputIterator}}% +\indexlibrary{\idxcode{input_iterator}}% \begin{codeblock} template - concept InputIterator = + concept input_iterator = input_or_output_iterator && readable && requires { typename @\placeholdernc{ITER_CONCEPT}@(I); } && @@ -1671,7 +1671,7 @@ \begin{codeblock} template concept ForwardIterator = - InputIterator && + input_iterator && derived_from<@\placeholdernc{ITER_CONCEPT}@(I), forward_iterator_tag> && incrementable && sentinel_for; @@ -2575,8 +2575,8 @@ template concept Mergeable = - InputIterator && - InputIterator && + input_iterator && + input_iterator && weakly_incrementable && IndirectlyCopyable && IndirectlyCopyable && @@ -4126,7 +4126,7 @@ \pnum The template parameter \tcode{Iterator} shall either meet the \oldconcept{InputIterator} requirements\iref{input.iterators} -or model \libconcept{InputIterator}\iref{iterator.concept.input}. +or model \libconcept{input_iterator}\iref{iterator.concept.input}. Additionally, if any of the bidirectional traversal functions are instantiated, the template parameter shall either meet the \oldconcept{BidirectionalIterator} requirements\iref{bidirectional.iterators} @@ -4538,7 +4538,7 @@ \tcode{copy_if} using \tcode{move_iterator} and \tcode{move_sentinel}: \begin{codeblock} -template S, weakly_incrementable O, +template S, weakly_incrementable O, IndirectUnaryPredicate Pred> requires IndirectlyMovable void move_if(I first, S last, O out, Pred pred) { @@ -4693,7 +4693,7 @@ friend iter_rvalue_reference_t iter_move(const common_iterator& i) noexcept(noexcept(ranges::iter_move(declval()))) - requires InputIterator; + requires input_iterator; template I2, class S2> friend void iter_swap(const common_iterator& x, const common_iterator& y) noexcept(noexcept(ranges::iter_swap(declval(), declval()))); @@ -4707,7 +4707,7 @@ using difference_type = iter_difference_t; }; - template + template struct iterator_traits> { using iterator_concept = @\seebelow@; using iterator_category = @\seebelow@; @@ -4991,7 +4991,7 @@ \begin{itemdecl} friend iter_rvalue_reference_t iter_move(const common_iterator& i) noexcept(noexcept(ranges::iter_move(declval()))) - requires InputIterator; + requires input_iterator; \end{itemdecl} \begin{itemdescr} @@ -5137,7 +5137,7 @@ friend constexpr iter_rvalue_reference_t iter_move(const counted_iterator& i) noexcept(noexcept(ranges::iter_move(i.current))) - requires InputIterator; + requires input_iterator; template I2> friend constexpr void iter_swap(const counted_iterator& x, const counted_iterator& y) noexcept(noexcept(ranges::iter_swap(x.current, y.current))); @@ -5152,7 +5152,7 @@ using difference_type = iter_difference_t; }; - template + template struct iterator_traits> : iterator_traits { using pointer = void; }; @@ -5526,7 +5526,7 @@ friend constexpr iter_rvalue_reference_t iter_move(const counted_iterator& i) noexcept(noexcept(ranges::iter_move(i.current))) - requires InputIterator; + requires input_iterator; \end{itemdecl} \begin{itemdescr} diff --git a/source/ranges.tex b/source/ranges.tex index cfb20fd76a..e75005a56e 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1001,7 +1001,7 @@ template concept InputRange = - Range && InputIterator>; + Range && input_iterator>; template concept ForwardRange = @@ -1076,7 +1076,7 @@ same_as, iterator_t> && same_as, sentinel_t>; -template +template concept @\placeholder{has-arrow}@ = // \expos is_pointer_v || requires(I i) { i.operator->(); }; diff --git a/source/utilities.tex b/source/utilities.tex index af0a6ada7f..e8464189a0 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -6529,7 +6529,7 @@ namespace ranges { template using uninitialized_copy_result = copy_result; - template S1, + template S1, @\placeholdernc{no-throw-forward-iterator}@ O, @\placeholdernc{no-throw-sentinel}@ S2> requires constructible_from, iter_reference_t> uninitialized_copy_result @@ -6541,7 +6541,7 @@ template using uninitialized_copy_n_result = uninitialized_copy_result; - template S> + template S> requires constructible_from, iter_reference_t> uninitialized_copy_n_result uninitialized_copy_n(I ifirst, iter_difference_t n, O ofirst, S olast); @@ -6565,7 +6565,7 @@ namespace ranges { template using uninitialized_move_result = uninitialized_copy_result; - template S1, + template S1, @\placeholdernc{no-throw-forward-iterator}@ O, @\placeholdernc{no-throw-sentinel}@ S2> requires constructible_from, iter_rvalue_reference_t> uninitialized_move_result @@ -6577,7 +6577,7 @@ template using uninitialized_move_n_result = uninitialized_copy_result; - template S> requires constructible_from, iter_rvalue_reference_t> uninitialized_move_n_result @@ -7925,7 +7925,7 @@ \begin{itemdecl} template concept @\placeholdernc{no-throw-input-iterator}@ = // exposition only - InputIterator && + input_iterator && is_lvalue_reference_v> && same_as>, iter_value_t>; \end{itemdecl} @@ -7940,7 +7940,7 @@ \pnum \begin{note} -This concept allows some \libconcept{InputIterator}\iref{iterator.concept.input} +This concept allows some \libconcept{input_iterator}\iref{iterator.concept.input} operations to throw exceptions. \end{note} \end{itemdescr} @@ -8205,7 +8205,7 @@ \indexlibrary{\idxcode{uninitialized_copy}}% \begin{itemdecl} namespace ranges { - template S1, + template S1, @\placeholdernc{no-throw-forward-iterator}@ O, @\placeholdernc{no-throw-sentinel}@ S2> requires constructible_from, iter_reference_t> uninitialized_copy_result @@ -8260,7 +8260,7 @@ \indexlibrary{\idxcode{uninitialized_copy_n}}% \begin{itemdecl} namespace ranges { - template S> + template S> requires constructible_from, iter_reference_t> uninitialized_copy_n_result uninitialized_copy_n(I ifirst, iter_difference_t n, O ofirst, S olast); @@ -8310,7 +8310,7 @@ \indexlibrary{\idxcode{uninitialized_move}}% \begin{itemdecl} namespace ranges { - template S1, + template S1, @\placeholdernc{no-throw-forward-iterator}@ O, @\placeholdernc{no-throw-sentinel}@ S2> requires constructible_from, iter_rvalue_reference_t> uninitialized_move_result @@ -8370,7 +8370,7 @@ \indexlibrary{\idxcode{uninitialized_move_n}}% \begin{itemdecl} namespace ranges { - template S> + template S> requires constructible_from, iter_rvalue_reference_t> uninitialized_move_n_result uninitialized_move_n(I ifirst, iter_difference_t n, O ofirst, S olast); From a6f0a90539e889572ac59fbdb216b34aad6f9581 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:05:02 -0700 Subject: [PATCH 42/84] [everywhere] Rename concept 'OutputIterator' to 'output_iterator'. --- source/algorithms.tex | 24 ++++++++++++------------ source/iterators.tex | 16 ++++++++-------- source/ranges.tex | 4 ++-- source/utilities.tex | 10 +++++----- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index fd5d89465b..90301951f1 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1436,14 +1436,14 @@ template using replace_copy_result = copy_result; - template S, class T1, class T2, OutputIterator O, + template S, class T1, class T2, output_iterator O, class Proj = identity> requires IndirectlyCopyable && IndirectRelation, const T1*> constexpr replace_copy_result replace_copy(I first, S last, O result, const T1& old_value, const T2& new_value, Proj proj = {}); - template O, + template O, class Proj = identity> requires IndirectlyCopyable, O> && IndirectRelation, Proj>, const T1*> @@ -1454,13 +1454,13 @@ template using replace_copy_if_result = copy_result; - template S, class T, OutputIterator O, + template S, class T, output_iterator O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr replace_copy_if_result replace_copy_if(I first, S last, O result, Pred pred, const T& new_value, Proj proj = {}); - template O, class Proj = identity, + template O, class Proj = identity, IndirectUnaryPredicate, Proj>> Pred> requires IndirectlyCopyable, O> constexpr replace_copy_if_result, O> @@ -1482,11 +1482,11 @@ ForwardIterator first, Size n, const T& value); namespace ranges { - template O, sentinel_for S> + template O, sentinel_for S> constexpr O fill(O first, S last, const T& value); template R> constexpr safe_iterator_t fill(R&& r, const T& value); - template O> + template O> constexpr O fill_n(O first, iter_difference_t n, const T& value); } @@ -4763,14 +4763,14 @@ ForwardIterator2 result, Predicate pred, const T& new_value); -template S, class T1, class T2, OutputIterator O, +template S, class T1, class T2, output_iterator O, class Proj = identity> requires IndirectlyCopyable && IndirectRelation, const T1*> constexpr ranges::replace_copy_result ranges::replace_copy(I first, S last, O result, const T1& old_value, const T2& new_value, Proj proj = {}); -template O, +template O, class Proj = identity> requires IndirectlyCopyable, O> && IndirectRelation, Proj>, const T1*> @@ -4778,13 +4778,13 @@ ranges::replace_copy(R&& r, O result, const T1& old_value, const T2& new_value, Proj proj = {}); -template S, class T, OutputIterator O, +template S, class T, output_iterator O, class Proj = identity, IndirectUnaryPredicate> Pred> requires IndirectlyCopyable constexpr ranges::replace_copy_if_result ranges::replace_copy_if(I first, S last, O result, Pred pred, const T& new_value, Proj proj = {}); -template O, class Proj = identity, +template O, class Proj = identity, IndirectUnaryPredicate, Proj>> Pred> requires IndirectlyCopyable, O> constexpr ranges::replace_copy_if_result, O> @@ -4857,11 +4857,11 @@ ForwardIterator first, Size n, const T& value); -template O, sentinel_for S> +template O, sentinel_for S> constexpr O ranges::fill(O first, S last, const T& value); template R> constexpr safe_iterator_t ranges::fill(R&& r, const T& value); -template O> +template O> constexpr O ranges::fill_n(O first, iter_difference_t n, const T& value); \end{itemdecl} diff --git a/source/iterators.tex b/source/iterators.tex index 216a586534..b8a5b0ed5b 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -120,9 +120,9 @@ template concept input_iterator = @\seebelow@; - // \ref{iterator.concept.output}, concept \libconcept{OutputIterator} + // \ref{iterator.concept.output}, concept \libconcept{output_iterator} template - concept OutputIterator = @\seebelow@; + concept output_iterator = @\seebelow@; // \ref{iterator.concept.forward}, concept \libconcept{ForwardIterator} template @@ -514,7 +514,7 @@ \pnum The six categories of iterators correspond to the iterator concepts \libconcept{input_iterator}\iref{iterator.concept.input}, -\libconcept{OutputIterator}\iref{iterator.concept.output}, +\libconcept{output_iterator}\iref{iterator.concept.output}, \libconcept{ForwardIterator}\iref{iterator.concept.forward}, \libconcept{BidirectionalIterator}\iref{iterator.concept.bidir} \libconcept{RandomAccessIterator}\iref{iterator.concept.random.access}, @@ -1624,20 +1624,20 @@ derived_from<@\placeholdernc{ITER_CONCEPT}@(I), input_iterator_tag>; \end{codeblock} -\rSec3[iterator.concept.output]{Concept \libconcept{OutputIterator}} +\rSec3[iterator.concept.output]{Concept \libconcept{output_iterator}} \pnum -The \libconcept{OutputIterator} concept defines requirements for a type that +The \libconcept{output_iterator} concept defines requirements for a type that can be used to write values (from the requirement for \libconcept{writable}\iref{iterator.concept.writable}) and which can be both pre- and post-incremented. \begin{note} Output iterators are not required to model \libconcept{equality_comparable}. \end{note} -\indexlibrary{\idxcode{OutputIterator}}% +\indexlibrary{\idxcode{output_iterator}}% \begin{codeblock} template - concept OutputIterator = + concept output_iterator = input_or_output_iterator && writable && requires(I i, T&& t) { @@ -1647,7 +1647,7 @@ \pnum Let \tcode{E} be an expression such that \tcode{decltype((E))} is \tcode{T}, and let \tcode{i} be a -dereferenceable object of type \tcode{I}. \tcode{I} and \tcode{T} model \tcode{\libconcept{OutputIterator}} only if +dereferenceable object of type \tcode{I}. \tcode{I} and \tcode{T} model \tcode{\libconcept{output_iterator}} only if \tcode{*i++ = E;} has effects equivalent to: \begin{codeblock} *i = E; diff --git a/source/ranges.tex b/source/ranges.tex index e75005a56e..d1cfc00334 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -985,7 +985,7 @@ \pnum The \libconcept{OutputRange} concept specifies requirements of a \libconcept{Range} type for which \tcode{ranges::begin} returns -a model of \libconcept{OutputIterator}\iref{iterator.concept.output}. +a model of \libconcept{output_iterator}\iref{iterator.concept.output}. \libconcept{InputRange}, \libconcept{ForwardRange}, \libconcept{BidirectionalRange}, and \libconcept{RandomAccessRange} are defined similarly. @@ -997,7 +997,7 @@ \begin{itemdecl} template concept OutputRange = - Range && OutputIterator, T>; + Range && output_iterator, T>; template concept InputRange = diff --git a/source/utilities.tex b/source/utilities.tex index e8464189a0..5fdcafa1a5 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -20233,11 +20233,11 @@ \pnum \constraints -\tcode{Out} satisfies \tcode{OutputIterator}. +\tcode{Out} satisfies \tcode{output_iterator}. \pnum \expects -\tcode{Out} models \tcode{OutputIterator}. +\tcode{Out} models \tcode{output_iterator}. \pnum \effects @@ -20290,11 +20290,11 @@ \pnum \constraints -\tcode{Out} satisfies \tcode{OutputIterator}. +\tcode{Out} satisfies \tcode{output_iterator}. \pnum \expects -\tcode{Out} models \tcode{OutputIterator}, and +\tcode{Out} models \tcode{output_iterator}, and \tcode{formatter<}$\tcode{T}_i$\tcode{, charT>} meets the \newoldconcept{Formatter} requirements\iref{formatter.requirements} for each $\tcode{T}_i$ in \tcode{Args}. @@ -20738,7 +20738,7 @@ consisting of the formatting arguments and the output iterator. \pnum -\tcode{Out} shall model \tcode{OutputIterator}. +\tcode{Out} shall model \tcode{output_iterator}. \pnum \indexlibrary{\idxcode{format_context}}% From 6dbef624e382aef72a25e5e8f89f24d4b9d62497 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:15:28 -0700 Subject: [PATCH 43/84] [everywhere] Rename concept 'ForwardIterator' to 'forward_iterator'. --- source/algorithms.tex | 76 +++++++++++++++++++++---------------------- source/iterators.tex | 28 ++++++++-------- source/ranges.tex | 18 +++++----- source/utilities.tex | 4 +-- 4 files changed, 63 insertions(+), 63 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 90301951f1..0bbdf3b711 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -772,7 +772,7 @@ BinaryPredicate pred); namespace ranges { - template S1, ForwardIterator I2, sentinel_for S2, + template S1, forward_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires IndirectlyComparable constexpr subrange @@ -810,7 +810,7 @@ BinaryPredicate pred); namespace ranges { - template S1, ForwardIterator I2, sentinel_for S2, + template S1, forward_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectRelation, projected> Pred = ranges::equal_to> @@ -845,7 +845,7 @@ BinaryPredicate pred); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, IndirectRelation> Pred = ranges::equal_to> constexpr I adjacent_find(I first, S last, Pred pred = {}, Proj proj = {}); @@ -1031,7 +1031,7 @@ BinaryPredicate pred); namespace ranges { - template S1, ForwardIterator I2, + template S1, forward_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires IndirectlyComparable @@ -1069,7 +1069,7 @@ BinaryPredicate pred); namespace ranges { - template S1, ForwardIterator I2, + template S1, forward_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires IndirectlyComparable @@ -1107,7 +1107,7 @@ BinaryPredicate pred); namespace ranges { - template S, class T, + template S, class T, class Pred = ranges::equal_to, class Proj = identity> requires IndirectlyComparable constexpr subrange @@ -1655,7 +1655,7 @@ template S, weakly_incrementable O, class Proj = identity, IndirectRelation> C = ranges::equal_to> requires IndirectlyCopyable && - (ForwardIterator || + (forward_iterator || (input_iterator && same_as, iter_value_t>) || IndirectlyCopyableStorable) constexpr unique_copy_result @@ -1663,7 +1663,7 @@ template, Proj>> C = ranges::equal_to> requires IndirectlyCopyable, O> && - (ForwardIterator> || + (forward_iterator> || (input_iterator && same_as, iter_value_t>) || IndirectlyCopyableStorable, O>) constexpr unique_copy_result, O> @@ -1743,7 +1743,7 @@ template using rotate_copy_result = copy_result; - template S, weakly_incrementable O> + template S, weakly_incrementable O> requires IndirectlyCopyable constexpr rotate_copy_result rotate_copy(I first, I middle, S last, O result); @@ -1941,7 +1941,7 @@ Compare comp); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr bool is_sorted(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Proj = identity, + template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I is_sorted_until(I first, S last, Comp comp = {}, Proj proj = {}); template S, class T, class Proj = identity, + template S, class T, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I lower_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); @@ -2036,7 +2036,7 @@ const T& value, Compare comp); namespace ranges { - template S, class T, class Proj = identity, + template S, class T, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I upper_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); template S, class T, class Proj = identity, + template S, class T, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr subrange equal_range(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); @@ -2077,7 +2077,7 @@ const T& value, Compare comp); namespace ranges { - template S, class T, class Proj = identity, + template S, class T, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr bool binary_search(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); @@ -2204,7 +2204,7 @@ Predicate pred); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr I partition_point(I first, S last, Pred pred, Proj proj = {}); template S, class Proj = identity, + template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I min_element(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Proj = identity, + template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I max_element(I first, S last, Comp comp = {}, Proj proj = {}); template using minmax_element_result = minmax_result; - template S, class Proj = identity, + template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr minmax_element_result minmax_element(I first, S last, Comp comp = {}, Proj proj = {}); @@ -3298,7 +3298,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); -template S1, ForwardIterator I2, sentinel_for S2, +template S1, forward_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires IndirectlyComparable constexpr subrange @@ -3383,7 +3383,7 @@ ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); -template S1, ForwardIterator I2, sentinel_for S2, +template S1, forward_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, IndirectRelation, projected> Pred = ranges::equal_to> @@ -3450,7 +3450,7 @@ ForwardIterator first, ForwardIterator last, BinaryPredicate pred); -template S, class Proj = identity, +template S, class Proj = identity, IndirectRelation> Pred = ranges::equal_to> constexpr I ranges::adjacent_find(I first, S last, Pred pred = {}, Proj proj = {}); template S1, ForwardIterator I2, +template S1, forward_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires IndirectlyComparable @@ -3916,7 +3916,7 @@ \indexlibrary{\idxcode{search}}% \begin{itemdecl} -template S1, ForwardIterator I2, +template S1, forward_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires IndirectlyComparable @@ -4004,7 +4004,7 @@ \indexlibrary{\idxcode{search_n}}% \begin{itemdecl} -template S, class T, +template S, class T, class Pred = ranges::equal_to, class Proj = identity> requires IndirectlyComparable constexpr subrange @@ -5226,7 +5226,7 @@ template S, weakly_incrementable O, class Proj = identity, IndirectRelation> C = ranges::equal_to> requires IndirectlyCopyable && - (ForwardIterator || + (forward_iterator || (input_iterator && same_as, iter_value_t>) || IndirectlyCopyableStorable) constexpr ranges::unique_copy_result @@ -5234,7 +5234,7 @@ template, Proj>> C = ranges::equal_to> requires IndirectlyCopyable, O> && - (ForwardIterator> || + (forward_iterator> || (input_iterator && same_as, iter_value_t>) || IndirectlyCopyableStorable, O>) constexpr ranges::unique_copy_result, O> @@ -5482,7 +5482,7 @@ ForwardIterator1 first, ForwardIterator1 middle, ForwardIterator1 last, ForwardIterator2 result); - template S, weakly_incrementable O> + template S, weakly_incrementable O> requires IndirectlyCopyable constexpr ranges::rotate_copy_result ranges::rotate_copy(I first, I middle, S last, O result); @@ -6204,7 +6204,7 @@ \indexlibrary{\idxcode{is_sorted}}% \begin{itemdecl} -template S, class Proj = identity, +template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr bool ranges::is_sorted(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I ranges::is_sorted_until(I first, S last, Comp comp = {}, Proj proj = {}); template S, class T, class Proj = identity, +template S, class T, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I ranges::lower_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); @@ -6422,7 +6422,7 @@ upper_bound(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); -template S, class T, class Proj = identity, +template S, class T, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I ranges::upper_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); template S, class T, class Proj = identity, +template S, class T, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr subrange ranges::equal_range(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); @@ -6534,7 +6534,7 @@ binary_search(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); -template S, class T, class Proj = identity, +template S, class T, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr bool ranges::binary_search(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); @@ -6822,7 +6822,7 @@ constexpr ForwardIterator partition_point(ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> constexpr I ranges::partition_point(I first, S last, Pred pred, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I ranges::min_element(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I ranges::max_element(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr ranges::minmax_result ranges::minmax_element(I first, S last, Comp comp = {}, Proj proj = {}); diff --git a/source/iterators.tex b/source/iterators.tex index b8a5b0ed5b..956b956e2d 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -124,9 +124,9 @@ template concept output_iterator = @\seebelow@; - // \ref{iterator.concept.forward}, concept \libconcept{ForwardIterator} + // \ref{iterator.concept.forward}, concept \libconcept{forward_iterator} template - concept ForwardIterator = @\seebelow@; + concept forward_iterator = @\seebelow@; // \ref{iterator.concept.bidir}, concept \libconcept{BidirectionalIterator} template @@ -515,7 +515,7 @@ The six categories of iterators correspond to the iterator concepts \libconcept{input_iterator}\iref{iterator.concept.input}, \libconcept{output_iterator}\iref{iterator.concept.output}, -\libconcept{ForwardIterator}\iref{iterator.concept.forward}, +\libconcept{forward_iterator}\iref{iterator.concept.forward}, \libconcept{BidirectionalIterator}\iref{iterator.concept.bidir} \libconcept{RandomAccessIterator}\iref{iterator.concept.random.access}, and @@ -1660,17 +1660,17 @@ They should be single-pass algorithms. \end{note} -\rSec3[iterator.concept.forward]{Concept \libconcept{ForwardIterator}} +\rSec3[iterator.concept.forward]{Concept \libconcept{forward_iterator}} \pnum -The \libconcept{ForwardIterator} concept adds +The \libconcept{forward_iterator} concept adds copyability, equality comparison, and the multi-pass guarantee, specified below. -\indexlibrary{\idxcode{ForwardIterator}}% +\indexlibrary{\idxcode{forward_iterator}}% \begin{codeblock} template - concept ForwardIterator = + concept forward_iterator = input_iterator && derived_from<@\placeholdernc{ITER_CONCEPT}@(I), forward_iterator_tag> && incrementable && @@ -1722,7 +1722,7 @@ \begin{codeblock} template concept BidirectionalIterator = - ForwardIterator && + forward_iterator && derived_from<@\placeholdernc{ITER_CONCEPT}@(I), bidirectional_iterator_tag> && requires(I i) { { --i } -> same_as; @@ -2559,7 +2559,7 @@ \begin{codeblock} template concept Permutable = - ForwardIterator && + forward_iterator && IndirectlyMovableStorable && IndirectlySwappable; \end{codeblock} @@ -4266,7 +4266,7 @@ \begin{itemdescr} \pnum \effects -If \tcode{Iterator} models \libconcept{ForwardIterator}, equivalent to: +If \tcode{Iterator} models \libconcept{forward_iterator}, equivalent to: \begin{codeblock} move_iterator tmp = *this; ++current; @@ -4727,7 +4727,7 @@ \begin{itemize} \item \tcode{iterator_concept} denotes \tcode{forward_iterator_tag} -if \tcode{I} models \libconcept{ForwardIterator}; +if \tcode{I} models \libconcept{forward_iterator}; otherwise it denotes \tcode{input_iterator_tag}. \item @@ -4911,7 +4911,7 @@ \pnum \effects -If \tcode{I} models \libconcept{ForwardIterator}, equivalent to: +If \tcode{I} models \libconcept{forward_iterator}, equivalent to: \begin{codeblock} common_iterator tmp = *this; ++*this; @@ -5096,7 +5096,7 @@ constexpr counted_iterator& operator++(); decltype(auto) operator++(int); constexpr counted_iterator operator++(int) - requires ForwardIterator; + requires forward_iterator; constexpr counted_iterator& operator--() requires BidirectionalIterator; constexpr counted_iterator operator--(int) @@ -5308,7 +5308,7 @@ \indexlibrarymember{operator++}{counted_iterator}% \begin{itemdecl} constexpr counted_iterator operator++(int) - requires ForwardIterator; + requires forward_iterator; \end{itemdecl} \begin{itemdescr} diff --git a/source/ranges.tex b/source/ranges.tex index d1cfc00334..b6e5b17a8a 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -594,7 +594,7 @@ the types \tcode{I} and \tcode{S} of \tcode{ranges::begin(E)} and \tcode{ranges::end(E)} (respectively) model both \tcode{\libconcept{sized_sentinel_for}}\iref{iterator.concept.sizedsentinel} and - \tcode{\libconcept{ForwardIterator}}. + \tcode{\libconcept{forward_iterator}}. However, \tcode{E} is evaluated only once. \item @@ -630,7 +630,7 @@ \tcode{bool(ranges::begin(E) == ranges::end(E))} except that \tcode{E} is only evaluated once, if \tcode{EQ} is a valid expression and - the type of \tcode{ranges::begin(E)} models \libconcept{ForwardIterator}. + the type of \tcode{ranges::begin(E)} models \libconcept{forward_iterator}. \item Otherwise, \tcode{ranges::empty(E)} is ill-formed. @@ -782,18 +782,18 @@ are amortized constant time and non-modifying, and \item if the type of \tcode{ranges::begin(E)} models -\libconcept{ForwardIterator}, \tcode{ranges::begin(E)} is equality-preserving. +\libconcept{forward_iterator}, \tcode{ranges::begin(E)} is equality-preserving. \end{itemize} \pnum \begin{note} Equality preservation of both \tcode{ranges::begin} and \tcode{ranges::end} enables passing a \libconcept{Range} whose iterator -type models \libconcept{ForwardIterator} to multiple +type models \libconcept{forward_iterator} to multiple algorithms and making multiple passes over the range by repeated calls to \tcode{ranges::begin} and \tcode{ranges::end}. Since \tcode{ranges::begin} is not required to be equality-preserving -when the return type does not model \libconcept{ForwardIterator}, repeated calls +when the return type does not model \libconcept{forward_iterator}, repeated calls might not return equal values or might not be well-defined; \tcode{ranges::begin} should be called at most once for such a range. \end{note} @@ -855,7 +855,7 @@ \item \tcode{ranges::size(t)} is \bigoh{1}, does not modify \tcode{t}, and is equal to \tcode{ranges::distance(t)}, and -\item if \tcode{iterator_t} models \libconcept{ForwardIterator}, +\item if \tcode{iterator_t} models \libconcept{forward_iterator}, \tcode{ranges::size(t)} is well-defined regardless of the evaluation of \tcode{ranges::begin(t)}. \begin{note} @@ -863,7 +863,7 @@ well-defined after evaluating \tcode{ranges::begin(t)}. For example, \tcode{ranges::size(t)} might be well-defined for a \libconcept{SizedRange} whose iterator type -does not model \libconcept{ForwardIterator} +does not model \libconcept{forward_iterator} only if evaluated before the first call to \tcode{ranges::begin(t)}. \end{note} \end{itemize} @@ -1005,7 +1005,7 @@ template concept ForwardRange = - InputRange && ForwardIterator>; + InputRange && forward_iterator>; template concept BidirectionalRange = @@ -1466,7 +1466,7 @@ \pnum \begin{note} -If \tcode{I} does not model \libconcept{ForwardIterator}, \tcode{next} +If \tcode{I} does not model \libconcept{forward_iterator}, \tcode{next} can invalidate \tcode{*this}. \end{note} \end{itemdescr} diff --git a/source/utilities.tex b/source/utilities.tex index 5fdcafa1a5..a97d367ee2 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -7983,14 +7983,14 @@ template concept @\placeholdernc{no-throw-forward-iterator}@ = // exposition only @\placeholder{no-throw-input-iterator}@ && - ForwardIterator && + forward_iterator && @\placeholdernc{no-throw-sentinel}@; \end{itemdecl} \begin{itemdescr} \pnum \begin{note} -This concept allows some \libconcept{ForwardIterator}\iref{iterator.concept.forward} +This concept allows some \libconcept{forward_iterator}\iref{iterator.concept.forward} operations to throw exceptions. \end{note} \end{itemdescr} From 8b751a65605bd6214cea68b34453eded4699b893 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:19:38 -0700 Subject: [PATCH 44/84] [everywhere] Rename concept 'BidirectionalIterator' to 'bidirectional_iterator'. --- source/algorithms.tex | 42 +++++++++++++++++++-------------------- source/iterators.tex | 46 +++++++++++++++++++++---------------------- source/ranges.tex | 10 +++++----- 3 files changed, 49 insertions(+), 49 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 0bbdf3b711..255e9746c1 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1217,11 +1217,11 @@ template using copy_backward_result = copy_result; - template S1, BidirectionalIterator I2> + template S1, bidirectional_iterator I2> requires IndirectlyCopyable constexpr copy_backward_result copy_backward(I1 first, S1 last, I2 result); - template + template requires IndirectlyCopyable, I> constexpr copy_backward_result, I> copy_backward(R&& r, I result); @@ -1260,11 +1260,11 @@ template using move_backward_result = copy_result; - template S1, BidirectionalIterator I2> + template S1, bidirectional_iterator I2> requires IndirectlyMovable constexpr move_backward_result move_backward(I1 first, S1 last, I2 result); - template + template requires IndirectlyMovable, I> constexpr move_backward_result, I> move_backward(R&& r, I result); @@ -1678,7 +1678,7 @@ BidirectionalIterator first, BidirectionalIterator last); namespace ranges { - template S> + template S> requires Permutable constexpr I reverse(I first, S last); template @@ -1700,7 +1700,7 @@ template using reverse_copy_result = copy_result; - template S, weakly_incrementable O> + template S, weakly_incrementable O> requires IndirectlyCopyable constexpr reverse_copy_result reverse_copy(I first, S last, O result); @@ -2137,7 +2137,7 @@ Predicate pred); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, IndirectUnaryPredicate> Pred> requires Permutable subrange stable_partition(I first, S last, Pred pred, Proj proj = {}); @@ -2279,7 +2279,7 @@ BidirectionalIterator last, Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable I inplace_merge(I first, I middle, S last, Comp comp = {}, Proj proj = {}); @@ -2858,7 +2858,7 @@ I in; }; - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr next_permutation_result @@ -2881,7 +2881,7 @@ template using prev_permutation_result = next_permutation_result; - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr prev_permutation_result @@ -4253,11 +4253,11 @@ BidirectionalIterator1 last, BidirectionalIterator2 result); -template S1, BidirectionalIterator I2> +template S1, bidirectional_iterator I2> requires IndirectlyCopyable constexpr ranges::copy_backward_result ranges::copy_backward(I1 first, S1 last, I2 result); -template +template requires IndirectlyCopyable, I> constexpr ranges::copy_backward_result, I> ranges::copy_backward(R&& r, I result); @@ -4395,11 +4395,11 @@ move_backward(BidirectionalIterator1 first, BidirectionalIterator1 last, BidirectionalIterator2 result); -template S1, BidirectionalIterator I2> +template S1, bidirectional_iterator I2> requires IndirectlyMovable constexpr ranges::move_backward_result ranges::move_backward(I1 first, S1 last, I2 result); -template +template requires IndirectlyMovable, I> constexpr ranges::move_backward_result, I> ranges::move_backward(R&& r, I result); @@ -5322,7 +5322,7 @@ void reverse(ExecutionPolicy&& exec, BidirectionalIterator first, BidirectionalIterator last); -template S> +template S> requires Permutable constexpr I ranges::reverse(I first, S last); template @@ -5365,7 +5365,7 @@ BidirectionalIterator first, BidirectionalIterator last, ForwardIterator result); -template S, weakly_incrementable O> +template S, weakly_incrementable O> requires IndirectlyCopyable constexpr ranges::reverse_copy_result ranges::reverse_copy(I first, S last, O result); @@ -6668,7 +6668,7 @@ At most $N / 2$ swaps if the type of \tcode{first} meets the \oldconcept{BidirectionalIterator} requirements for the overloads in namespace \tcode{std} or - models \libconcept{BidirectionalIterator} + models \libconcept{bidirectional_iterator} for the overloads in namespace \tcode{ranges}, and at most $N$ swaps otherwise. \item @@ -6688,7 +6688,7 @@ stable_partition(ExecutionPolicy&& exec, BidirectionalIterator first, BidirectionalIterator last, Predicate pred); -template S, class Proj = identity, +template S, class Proj = identity, IndirectUnaryPredicate> Pred> requires Permutable subrange ranges::stable_partition(I first, S last, Pred pred, Proj proj = {}); @@ -6978,7 +6978,7 @@ BidirectionalIterator middle, BidirectionalIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable I ranges::inplace_merge(I first, I middle, S last, Comp comp = {}, Proj proj = {}); @@ -8428,7 +8428,7 @@ constexpr bool next_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr ranges::next_permutation_result @@ -8487,7 +8487,7 @@ constexpr bool prev_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr ranges::prev_permutation_result diff --git a/source/iterators.tex b/source/iterators.tex index 956b956e2d..0bf9240469 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -128,9 +128,9 @@ template concept forward_iterator = @\seebelow@; - // \ref{iterator.concept.bidir}, concept \libconcept{BidirectionalIterator} + // \ref{iterator.concept.bidir}, concept \libconcept{bidirectional_iterator} template - concept BidirectionalIterator = @\seebelow@; + concept bidirectional_iterator = @\seebelow@; // \ref{iterator.concept.random.access}, concept \libconcept{RandomAccessIterator} template @@ -256,11 +256,11 @@ constexpr I next(I x, iter_difference_t n, S bound); // \ref{range.iter.op.prev}, \tcode{ranges::prev} - template + template constexpr I prev(I x); - template + template constexpr I prev(I x, iter_difference_t n); - template + template constexpr I prev(I x, iter_difference_t n, I bound); } @@ -516,7 +516,7 @@ \libconcept{input_iterator}\iref{iterator.concept.input}, \libconcept{output_iterator}\iref{iterator.concept.output}, \libconcept{forward_iterator}\iref{iterator.concept.forward}, -\libconcept{BidirectionalIterator}\iref{iterator.concept.bidir} +\libconcept{bidirectional_iterator}\iref{iterator.concept.bidir} \libconcept{RandomAccessIterator}\iref{iterator.concept.random.access}, and \libconcept{ContiguousIterator}\iref{iterator.concept.contiguous}, @@ -1712,16 +1712,16 @@ allow the use of multi-pass one-directional algorithms with forward iterators. \end{note} -\rSec3[iterator.concept.bidir]{Concept \libconcept{BidirectionalIterator}} +\rSec3[iterator.concept.bidir]{Concept \libconcept{bidirectional_iterator}} \pnum -The \libconcept{BidirectionalIterator} concept adds the ability +The \libconcept{bidirectional_iterator} concept adds the ability to move an iterator backward as well as forward. -\indexlibrary{\idxcode{BidirectionalIterator}}% +\indexlibrary{\idxcode{bidirectional_iterator}}% \begin{codeblock} template - concept BidirectionalIterator = + concept bidirectional_iterator = forward_iterator && derived_from<@\placeholdernc{ITER_CONCEPT}@(I), bidirectional_iterator_tag> && requires(I i) { @@ -1737,7 +1737,7 @@ \pnum Let \tcode{a} and \tcode{b} be equal objects of type \tcode{I}. -\tcode{I} models \libconcept{BidirectionalIterator} only if: +\tcode{I} models \libconcept{bidirectional_iterator} only if: \begin{itemize} \item If \tcode{a} and \tcode{b} are decrementable, @@ -1765,7 +1765,7 @@ \begin{codeblock} template concept RandomAccessIterator = - BidirectionalIterator && + bidirectional_iterator && derived_from<@\placeholdernc{ITER_CONCEPT}@(I), random_access_iterator_tag> && totally_ordered && sized_sentinel_for && @@ -2845,7 +2845,7 @@ \begin{itemdescr} \pnum \expects -If \tcode{I} does not model \libconcept{BidirectionalIterator}, +If \tcode{I} does not model \libconcept{bidirectional_iterator}, \tcode{n} is not negative. \pnum @@ -2894,7 +2894,7 @@ If \tcode{n > 0}, \range{i}{bound} denotes a range. If \tcode{n == 0}, \range{i}{bound} or \range{bound}{i} denotes a range. If \tcode{n < 0}, \range{bound}{i} denotes a range, -\tcode{I} models \libconcept{BidirectionalIterator}, and +\tcode{I} models \libconcept{bidirectional_iterator}, and \tcode{I} and \tcode{S} model \tcode{\libconcept{same_as}}. \pnum @@ -3016,7 +3016,7 @@ \rSec3[range.iter.op.prev]{\tcode{ranges::prev}} \indexlibrary{\idxcode{prev}}% \begin{itemdecl} -template +template constexpr I ranges::prev(I x); \end{itemdecl} @@ -3027,7 +3027,7 @@ \indexlibrary{\idxcode{prev}}% \begin{itemdecl} -template +template constexpr I ranges::prev(I x, iter_difference_t n); \end{itemdecl} @@ -3038,7 +3038,7 @@ \indexlibrary{\idxcode{prev}}% \begin{itemdecl} -template +template constexpr I ranges::prev(I x, iter_difference_t n, I bound); \end{itemdecl} @@ -3133,7 +3133,7 @@ shall either meet the requirements of a \oldconcept{BidirectionalIterator}\iref{bidirectional.iterators} or model -\libconcept{BidirectionalIterator}\iref{iterator.concept.bidir}. +\libconcept{bidirectional_iterator}\iref{iterator.concept.bidir}. \pnum Additionally, @@ -4130,7 +4130,7 @@ Additionally, if any of the bidirectional traversal functions are instantiated, the template parameter shall either meet the \oldconcept{BidirectionalIterator} requirements\iref{bidirectional.iterators} -or model \libconcept{BidirectionalIterator}\iref{iterator.concept.bidir}. +or model \libconcept{bidirectional_iterator}\iref{iterator.concept.bidir}. If any of the random access traversal functions are instantiated, the template parameter shall either meet the \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} @@ -5098,9 +5098,9 @@ constexpr counted_iterator operator++(int) requires forward_iterator; constexpr counted_iterator& operator--() - requires BidirectionalIterator; + requires bidirectional_iterator; constexpr counted_iterator operator--(int) - requires BidirectionalIterator; + requires bidirectional_iterator; constexpr counted_iterator operator+(iter_difference_t n) const requires RandomAccessIterator; @@ -5324,7 +5324,7 @@ \indexlibrarymember{operator{-}-}{counted_iterator}% \begin{itemdecl} constexpr counted_iterator& operator--(); - requires BidirectionalIterator + requires bidirectional_iterator \end{itemdecl} \begin{itemdescr} @@ -5340,7 +5340,7 @@ \indexlibrarymember{operator{-}-}{counted_iterator}% \begin{itemdecl} constexpr counted_iterator operator--(int) - requires BidirectionalIterator; + requires bidirectional_iterator; \end{itemdecl} \begin{itemdescr} diff --git a/source/ranges.tex b/source/ranges.tex index b6e5b17a8a..88d96141c8 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -453,7 +453,7 @@ Otherwise, \tcode{make_reverse_iterator(ranges::end(E))} if both \tcode{ranges::begin(E)} and \tcode{ranges::end(\brk{}E)} are valid expressions of the same type \tcode{I} which models - \libconcept{BidirectionalIterator}\iref{iterator.concept.bidir}. + \libconcept{bidirectional_iterator}\iref{iterator.concept.bidir}. \item Otherwise, \tcode{ranges::rbegin(E)} is ill-formed. @@ -497,7 +497,7 @@ Otherwise, \tcode{make_reverse_iterator(ranges::begin(E))} if both \tcode{ranges::begin(E)} and \tcode{ranges::\brk{}end(E)} are valid expressions of the same type \tcode{I} which models - \libconcept{BidirectionalIterator}\iref{iterator.concept.bidir}. + \libconcept{bidirectional_iterator}\iref{iterator.concept.bidir}. \item Otherwise, \tcode{ranges::rend(E)} is ill-formed. @@ -1009,7 +1009,7 @@ template concept BidirectionalRange = - ForwardRange && BidirectionalIterator>; + ForwardRange && bidirectional_iterator>; template concept RandomAccessRange = @@ -1294,7 +1294,7 @@ [[nodiscard]] constexpr subrange next(iter_difference_t n = 1) const; [[nodiscard]] constexpr subrange prev(iter_difference_t n = 1) const - requires BidirectionalIterator; + requires bidirectional_iterator; constexpr subrange& advance(iter_difference_t n); friend constexpr I begin(subrange&& r) { return r.begin(); } @@ -1474,7 +1474,7 @@ \indexlibrary{\idxcode{prev}!\idxcode{subrange}}% \begin{itemdecl} [[nodiscard]] constexpr subrange prev(iter_difference_t n = 1) const - requires BidirectionalIterator; + requires bidirectional_iterator; \end{itemdecl} \begin{itemdescr} From 6cb800bc7e6f2aa06c03b4d46cb43621c62bacbd Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:23:35 -0700 Subject: [PATCH 45/84] [everywhere] Rename concept 'RandomAccessIterator' to 'random_access_iterator'. --- source/algorithms.tex | 48 ++++++++++++++++++------------------- source/iterators.tex | 56 +++++++++++++++++++++---------------------- source/ranges.tex | 6 ++--- 3 files changed, 55 insertions(+), 55 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 255e9746c1..27a81afcfa 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1767,7 +1767,7 @@ UniformRandomBitGenerator&& g); namespace ranges { - template S, class Gen> + template S, class Gen> requires Permutable && UniformRandomBitGenerator> I shuffle(I first, S last, Gen&& g); @@ -1813,7 +1813,7 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -1838,7 +1838,7 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable I stable_sort(I first, S last, Comp comp = {}, Proj proj = {}); @@ -1868,7 +1868,7 @@ RandomAccessIterator last, Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -1909,7 +1909,7 @@ namespace ranges { template using partial_sort_copy_result = copy_result; - template S1, RandomAccessIterator I2, sentinel_for S2, + template S1, random_access_iterator I2, sentinel_for S2, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires IndirectlyCopyable && Sortable && IndirectStrictWeakOrder, projected> @@ -1993,7 +1993,7 @@ RandomAccessIterator last, Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -2509,7 +2509,7 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -2527,7 +2527,7 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -2545,7 +2545,7 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -2563,7 +2563,7 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -2588,7 +2588,7 @@ Compare comp); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr bool is_heap(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Proj = identity, + template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I is_heap_until(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Gen> +template S, class Gen> requires Permutable && UniformRandomBitGenerator> I ranges::shuffle(I first, S last, Gen&& g); @@ -5844,7 +5844,7 @@ RandomAccessIterator first, RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -5903,7 +5903,7 @@ RandomAccessIterator first, RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable I ranges::stable_sort(I first, S last, Comp comp = {}, Proj proj = {}); @@ -5975,7 +5975,7 @@ RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -6066,7 +6066,7 @@ RandomAccessIterator result_last, Compare comp); -template S1, RandomAccessIterator I2, sentinel_for S2, +template S1, random_access_iterator I2, sentinel_for S2, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires IndirectlyCopyable && Sortable && IndirectStrictWeakOrder, projected> @@ -6285,7 +6285,7 @@ RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -7541,7 +7541,7 @@ constexpr void push_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -7592,7 +7592,7 @@ constexpr void pop_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -7650,7 +7650,7 @@ constexpr void make_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -7699,7 +7699,7 @@ constexpr void sort_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +template S, class Comp = ranges::less, class Proj = identity> requires Sortable constexpr I @@ -7804,7 +7804,7 @@ \indexlibrary{\idxcode{is_heap}}% \begin{itemdecl} -template S, class Proj = identity, +template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr bool ranges::is_heap(I first, S last, Comp comp = {}, Proj proj = {}); template S, class Proj = identity, +template S, class Proj = identity, IndirectStrictWeakOrder> Comp = ranges::less> constexpr I ranges::is_heap_until(I first, S last, Comp comp = {}, Proj proj = {}); template concept bidirectional_iterator = @\seebelow@; - // \ref{iterator.concept.random.access}, concept \libconcept{RandomAccessIterator} + // \ref{iterator.concept.random.access}, concept \libconcept{random_access_iterator} template - concept RandomAccessIterator = @\seebelow@; + concept random_access_iterator = @\seebelow@; // \ref{iterator.concept.contiguous}, concept \libconcept{ContiguousIterator} template @@ -517,7 +517,7 @@ \libconcept{output_iterator}\iref{iterator.concept.output}, \libconcept{forward_iterator}\iref{iterator.concept.forward}, \libconcept{bidirectional_iterator}\iref{iterator.concept.bidir} -\libconcept{RandomAccessIterator}\iref{iterator.concept.random.access}, +\libconcept{random_access_iterator}\iref{iterator.concept.random.access}, and \libconcept{ContiguousIterator}\iref{iterator.concept.contiguous}, respectively. @@ -1596,7 +1596,7 @@ \pnum \begin{example} The \libconcept{sized_sentinel_for} concept is modeled by pairs of -\libconcept{RandomAccessIterator}s\iref{iterator.concept.random.access} and by +\libconcept{random_access_iterator}s\iref{iterator.concept.random.access} and by counted iterators and their sentinels\iref{counted.iterator}. \end{example} \end{itemdescr} @@ -1753,18 +1753,18 @@ \tcode{bool(--(++a) == b)}. \end{itemize} -\rSec3[iterator.concept.random.access]{Concept \libconcept{RandomAccessIterator}} +\rSec3[iterator.concept.random.access]{Concept \libconcept{random_access_iterator}} \pnum -The \libconcept{RandomAccessIterator} concept adds support for +The \libconcept{random_access_iterator} concept adds support for constant-time advancement with \tcode{+=}, \tcode{+}, \tcode{-=}, and \tcode{-}, as well as the computation of distance in constant time with \tcode{-}. Random access iterators also support array notation via subscripting. -\indexlibrary{\idxcode{RandomAccessIterator}}% +\indexlibrary{\idxcode{random_access_iterator}}% \begin{codeblock} template - concept RandomAccessIterator = + concept random_access_iterator = bidirectional_iterator && derived_from<@\placeholdernc{ITER_CONCEPT}@(I), random_access_iterator_tag> && totally_ordered && @@ -1785,7 +1785,7 @@ after \tcode{n} applications of \tcode{++a}, let \tcode{D} be \tcode{iter_difference_t}, and let \tcode{n} denote a value of type \tcode{D}. -\tcode{I} models \libconcept{RandomAccessIterator} only if +\tcode{I} models \libconcept{random_access_iterator} only if \begin{itemize} \item \tcode{(a += n)} is equal to \tcode{b}. @@ -1817,7 +1817,7 @@ \begin{codeblock} template concept @\libconcept{ContiguousIterator}@ = - RandomAccessIterator && + random_access_iterator && derived_from<@\placeholdernc{ITER_CONCEPT}@(I), contiguous_iterator_tag> && is_lvalue_reference_v> && same_as, remove_cvref_t>> && @@ -2800,8 +2800,8 @@ possible for a concrete iterator type. \begin{example} \tcode{ranges::advance} uses the \tcode{+} operator to move a -\libconcept{RandomAccessIterator} forward \tcode{n} steps in constant time. -For an iterator type that does not model \libconcept{RandomAccessIterator}, +\libconcept{random_access_iterator} forward \tcode{n} steps in constant time. +For an iterator type that does not model \libconcept{random_access_iterator}, \tcode{ranges::advance} instead performs \tcode{n} individual increments with the \tcode{++} operator. \end{example} @@ -2851,7 +2851,7 @@ \pnum \effects \begin{itemize} -\item If \tcode{I} models \libconcept{RandomAccessIterator}, +\item If \tcode{I} models \libconcept{random_access_iterator}, equivalent to \tcode{i += n}. \item Otherwise, if \tcode{n} is non-negative, increments \tcode{i} by \tcode{n}. @@ -3108,7 +3108,7 @@ \begin{itemize} \item \tcode{random_access_iterator_tag} if \tcode{Iterator} models -\libconcept{RandomAccessIterator}, and +\libconcept{random_access_iterator}, and \item \tcode{bidirectional_iterator_tag} otherwise. \end{itemize} @@ -3141,7 +3141,7 @@ shall either meet the requirements of a \oldconcept{RandomAccessIterator}\iref{random.access.iterators} or model -\libconcept{RandomAccessIterator}\iref{iterator.concept.random.access} +\libconcept{random_access_iterator}\iref{iterator.concept.random.access} if the definitions of any of the members \begin{itemize} \item @@ -4135,7 +4135,7 @@ template parameter shall either meet the \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} or model -\libconcept{RandomAccessIterator}\iref{iterator.concept.random.access}. +\libconcept{random_access_iterator}\iref{iterator.concept.random.access}. \rSec3[move.iter.cons]{Construction and assignment} @@ -5103,15 +5103,15 @@ requires bidirectional_iterator; constexpr counted_iterator operator+(iter_difference_t n) const - requires RandomAccessIterator; + requires random_access_iterator; friend constexpr counted_iterator operator+( iter_difference_t n, const counted_iterator& x) - requires RandomAccessIterator; + requires random_access_iterator; constexpr counted_iterator& operator+=(iter_difference_t n) - requires RandomAccessIterator; + requires random_access_iterator; constexpr counted_iterator operator-(iter_difference_t n) const - requires RandomAccessIterator; + requires random_access_iterator; template I2> friend constexpr iter_difference_t operator-( const counted_iterator& x, const counted_iterator& y); @@ -5120,10 +5120,10 @@ friend constexpr iter_difference_t operator-( default_sentinel_t, const counted_iterator& y); constexpr counted_iterator& operator-=(iter_difference_t n) - requires RandomAccessIterator; + requires random_access_iterator; constexpr decltype(auto) operator[](iter_difference_t n) const - requires RandomAccessIterator; + requires random_access_iterator; template I2> friend constexpr bool operator==( @@ -5256,7 +5256,7 @@ \indexlibrarymember{operator[]}{counted_iterator}% \begin{itemdecl} constexpr decltype(auto) operator[](iter_difference_t n) const - requires RandomAccessIterator; + requires random_access_iterator; \end{itemdecl} \begin{itemdescr} @@ -5356,7 +5356,7 @@ \indexlibrarymember{operator+}{counted_iterator}% \begin{itemdecl} constexpr counted_iterator operator+(iter_difference_t n) const - requires RandomAccessIterator; + requires random_access_iterator; \end{itemdecl} \begin{itemdescr} @@ -5368,7 +5368,7 @@ \begin{itemdecl} friend constexpr counted_iterator operator+( iter_difference_t n, const counted_iterator& x) - requires RandomAccessIterator; + requires random_access_iterator; \end{itemdecl} \begin{itemdescr} @@ -5379,7 +5379,7 @@ \indexlibrarymember{operator+=}{counted_iterator}% \begin{itemdecl} constexpr counted_iterator& operator+=(iter_difference_t n) - requires RandomAccessIterator; + requires random_access_iterator; \end{itemdecl} \begin{itemdescr} @@ -5398,7 +5398,7 @@ \indexlibrarymember{operator-}{counted_iterator}% \begin{itemdecl} constexpr counted_iterator operator-(iter_difference_t n) const - requires RandomAccessIterator; + requires random_access_iterator; \end{itemdecl} \begin{itemdescr} @@ -5449,7 +5449,7 @@ \indexlibrarymember{operator-=}{counted_iterator}% \begin{itemdecl} constexpr counted_iterator& operator-=(iter_difference_t n) - requires RandomAccessIterator; + requires random_access_iterator; \end{itemdecl} \begin{itemdescr} diff --git a/source/ranges.tex b/source/ranges.tex index 88d96141c8..b5a100e42f 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -729,7 +729,7 @@ return objects of the same type. Random access ranges are ranges for which \tcode{ranges::begin} returns a type that models -\libconcept{RandomAccessIterator}\iref{iterator.concept.random.access}. +\libconcept{random_access_iterator}\iref{iterator.concept.random.access}. (Contiguous, bidirectional, forward, input, and output ranges are defined similarly.) Viewable ranges can be converted to views. @@ -1013,7 +1013,7 @@ template concept RandomAccessRange = - BidirectionalRange && RandomAccessIterator>; + BidirectionalRange && random_access_iterator>; \end{itemdecl} \pnum @@ -5255,7 +5255,7 @@ \tcode{decltype((F))} models \tcode{\libconcept{convertible_to}>}, \begin{itemize} \item \tcode{subrange\{E, E + static_cast>(F)\}} - if \tcode{T} models \libconcept{RandomAccessIterator}. + if \tcode{T} models \libconcept{random_access_iterator}. \item Otherwise, \tcode{subrange\{counted_iterator\{E, F\}, default_sentinel\}}. \end{itemize} From a3b0585c092fbc6a1fc6b75d43f05c430601208a Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:24:01 -0700 Subject: [PATCH 46/84] [everywhere] Rename concept 'ContiguousIterator' to 'contiguous_iterator'. --- source/containers.tex | 4 ++-- source/iterators.tex | 16 ++++++++-------- source/numerics.tex | 4 ++-- source/ranges.tex | 8 ++++---- source/strings.tex | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 085159a376..45344b96e2 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -465,7 +465,7 @@ whose member types \tcode{iterator} and \tcode{const_iterator} meet the \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} and -model \libconcept{ContiguousIterator}\iref{iterator.concept.contiguous}. +model \libconcept{contiguous_iterator}\iref{iterator.concept.contiguous}. \pnum \tref{container.opt} lists operations that are provided @@ -10814,7 +10814,7 @@ \begin{itemdescr} \pnum The types -model \libconcept{ContiguousIterator}\iref{iterator.concept.contiguous}, +model \libconcept{contiguous_iterator}\iref{iterator.concept.contiguous}, meet the \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators}, and diff --git a/source/iterators.tex b/source/iterators.tex index edfd1c7724..8d15036463 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -136,9 +136,9 @@ template concept random_access_iterator = @\seebelow@; - // \ref{iterator.concept.contiguous}, concept \libconcept{ContiguousIterator} + // \ref{iterator.concept.contiguous}, concept \libconcept{contiguous_iterator} template - concept ContiguousIterator = @\seebelow@; + concept contiguous_iterator = @\seebelow@; // \ref{indirectcallable}, indirect callable requirements // \ref{indirectcallable.indirectinvocable}, indirect callables @@ -519,7 +519,7 @@ \libconcept{bidirectional_iterator}\iref{iterator.concept.bidir} \libconcept{random_access_iterator}\iref{iterator.concept.random.access}, and -\libconcept{ContiguousIterator}\iref{iterator.concept.contiguous}, +\libconcept{contiguous_iterator}\iref{iterator.concept.contiguous}, respectively. The generic term \defn{iterator} refers to any type that models the \libconcept{input_or_output_iterator} concept\iref{iterator.concept.iterator}. @@ -1807,16 +1807,16 @@ \item \tcode{bool(a <= b)} is \tcode{true}. \end{itemize} -\rSec3[iterator.concept.contiguous]{Concept \libconcept{ContiguousIterator}} +\rSec3[iterator.concept.contiguous]{Concept \libconcept{contiguous_iterator}} \pnum -The \libconcept{ContiguousIterator} concept provides a guarantee that +The \libconcept{contiguous_iterator} concept provides a guarantee that the denoted elements are stored contiguously in memory. -\indexlibrary{\idxcode{ContiguousIterator}}% +\indexlibrary{\idxcode{contiguous_iterator}}% \begin{codeblock} template - concept @\libconcept{ContiguousIterator}@ = + concept @\libconcept{contiguous_iterator}@ = random_access_iterator && derived_from<@\placeholdernc{ITER_CONCEPT}@(I), contiguous_iterator_tag> && is_lvalue_reference_v> && @@ -1832,7 +1832,7 @@ such that \tcode{b} is reachable from \tcode{a} and \tcode{c} is reachable from \tcode{b}, and let \tcode{D} be \tcode{iter_difference_t}. -The type \tcode{I} models \libconcept{ContiguousIterator} only if +The type \tcode{I} models \libconcept{contiguous_iterator} only if \begin{itemize} \item \tcode{to_address(a) == addressof(*a)}, \item \tcode{to_address(b) == to_address(a) + D(b - a)}, and diff --git a/source/numerics.tex b/source/numerics.tex index 5ee9e4164e..0dc3e4bd9b 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -8715,12 +8715,12 @@ In the \tcode{begin} and \tcode{end} function templates that follow, \unspec{1} is a type that meets the requirements of a mutable \oldconcept{RandomAccessIterator}\iref{random.access.iterators} -and models \libconcept{ContiguousIterator}\iref{iterator.concept.contiguous}, +and models \libconcept{contiguous_iterator}\iref{iterator.concept.contiguous}, whose \tcode{value_type} is the template parameter \tcode{T} and whose \tcode{reference} type is \tcode{T\&}. \unspec{2} is a type that meets the requirements of a constant \oldconcept{RandomAccessIterator} -and models \libconcept{ContiguousIterator}, +and models \libconcept{contiguous_iterator}, whose \tcode{value_type} is the template parameter \tcode{T} and whose \tcode{reference} type is \tcode{const T\&}. diff --git a/source/ranges.tex b/source/ranges.tex index b5a100e42f..116c9cc05d 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -660,7 +660,7 @@ \item Otherwise, if \tcode{ranges::begin(E)} is a valid expression whose type models - \tcode{ContiguousIterator}, + \tcode{contiguous_iterator}, \tcode{to_address(ranges::begin(E))}. \item @@ -1025,7 +1025,7 @@ \begin{itemdecl} template concept ContiguousRange = - RandomAccessRange && ContiguousIterator> && + RandomAccessRange && contiguous_iterator> && requires(T& t) { { ranges::data(t) } -> same_as>>; }; @@ -1122,11 +1122,11 @@ return !ranges::empty(derived()); } - constexpr auto data() requires ContiguousIterator> { + constexpr auto data() requires contiguous_iterator> { return to_address(ranges::begin(derived())); } constexpr auto data() const - requires Range && ContiguousIterator> { + requires Range && contiguous_iterator> { return to_address(ranges::begin(derived())); } diff --git a/source/strings.tex b/source/strings.tex index 718d27f744..a0c3c16f35 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -4092,7 +4092,7 @@ A type that meets the requirements of a constant \oldconcept{RandomAccessIterator}\iref{random.access.iterators}, -models \libconcept{ContiguousIterator}\iref{iterator.concept.contiguous}, and +models \libconcept{contiguous_iterator}\iref{iterator.concept.contiguous}, and meets the constexpr iterator requirements\iref{iterator.requirements.general}, whose \tcode{value_type} is the template parameter \tcode{charT}. From 59bb331a58e383724d6750bdda025a7d16bcb9a8 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:24:26 -0700 Subject: [PATCH 47/84] [everywhere] Rename concept 'IndirectUnaryInvocable' to 'indirectly_unary_invocable'. --- source/algorithms.tex | 8 ++++---- source/iterators.tex | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 27a81afcfa..1f14449785 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -686,11 +686,11 @@ }; template S, class Proj = identity, - IndirectUnaryInvocable> Fun> + indirectly_unary_invocable> Fun> constexpr for_each_result for_each(I first, S last, Fun f, Proj proj = {}); template, Proj>> Fun> + indirectly_unary_invocable, Proj>> Fun> constexpr for_each_result, Fun> for_each(R&& r, Fun f, Proj proj = {}); } @@ -3082,11 +3082,11 @@ \indexlibrary{\idxcode{for_each}}% \begin{itemdecl} template S, class Proj = identity, - IndirectUnaryInvocable> Fun> + indirectly_unary_invocable> Fun> constexpr ranges::for_each_result ranges::for_each(I first, S last, Fun f, Proj proj = {}); template, Proj>> Fun> + indirectly_unary_invocable, Proj>> Fun> constexpr ranges::for_each_result, Fun> ranges::for_each(R&& r, Fun f, Proj proj = {}); \end{itemdecl} diff --git a/source/iterators.tex b/source/iterators.tex index 8d15036463..b019092606 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -143,7 +143,7 @@ // \ref{indirectcallable}, indirect callable requirements // \ref{indirectcallable.indirectinvocable}, indirect callables template - concept IndirectUnaryInvocable = @\seebelow@; + concept indirectly_unary_invocable = @\seebelow@; template concept IndirectRegularUnaryInvocable = @\seebelow@; @@ -2313,7 +2313,7 @@ The indirect callable concepts are used to constrain those algorithms that accept callable objects~(\ref{func.def}) as arguments. -\indexlibrary{\idxcode{IndirectUnaryInvocable}}% +\indexlibrary{\idxcode{indirectly_unary_invocable}}% \indexlibrary{\idxcode{IndirectRegularUnaryInvocable}}% \indexlibrary{\idxcode{IndirectUnaryPredicate}}% \indexlibrary{\idxcode{IndirectRelation}}% @@ -2321,7 +2321,7 @@ \begin{codeblock} namespace std { template - concept IndirectUnaryInvocable = + concept indirectly_unary_invocable = readable && copy_constructible && invocable&> && From 351ac726a58721240005b74e0b0fca95d4134a0e Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:24:47 -0700 Subject: [PATCH 48/84] [everywhere] Rename concept 'IndirectRegularUnaryInvocable' to 'indirectly_regular_unary_invocable'. --- source/iterators.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/iterators.tex b/source/iterators.tex index b019092606..c5e431433d 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -146,7 +146,7 @@ concept indirectly_unary_invocable = @\seebelow@; template - concept IndirectRegularUnaryInvocable = @\seebelow@; + concept indirectly_regular_unary_invocable = @\seebelow@; template concept IndirectUnaryPredicate = @\seebelow@; @@ -162,7 +162,7 @@ using indirect_result_t = invoke_result_t...>; // \ref{projected}, projected - template Proj> + template Proj> struct projected; template @@ -2314,7 +2314,7 @@ that accept callable objects~(\ref{func.def}) as arguments. \indexlibrary{\idxcode{indirectly_unary_invocable}}% -\indexlibrary{\idxcode{IndirectRegularUnaryInvocable}}% +\indexlibrary{\idxcode{indirectly_regular_unary_invocable}}% \indexlibrary{\idxcode{IndirectUnaryPredicate}}% \indexlibrary{\idxcode{IndirectRelation}}% \indexlibrary{\idxcode{IndirectStrictWeakOrder}}% @@ -2332,7 +2332,7 @@ invoke_result_t>>; template - concept IndirectRegularUnaryInvocable = + concept indirectly_regular_unary_invocable = readable && copy_constructible && regular_invocable&> && @@ -2385,7 +2385,7 @@ \indexlibrary{\idxcode{projected}}% \begin{codeblock} namespace std { - template Proj> + template Proj> struct projected { using value_type = remove_cvref_t>; indirect_result_t operator*() const; // \notdef From 48be234669a6384e73ca0ec49909fa8bed5b115e Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:25:56 -0700 Subject: [PATCH 49/84] [everywhere] Rename concept 'IndirectUnaryPredicate' to 'indirect_unary_predicate'. --- source/algorithms.tex | 128 +++++++++++++++++++++--------------------- source/iterators.tex | 8 +-- source/ranges.tex | 12 ++-- 3 files changed, 74 insertions(+), 74 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 1f14449785..6928704d91 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -620,10 +620,10 @@ namespace ranges { template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr bool all_of(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> constexpr bool all_of(R&& r, Pred pred, Proj proj = {}); } @@ -636,10 +636,10 @@ namespace ranges { template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr bool any_of(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> constexpr bool any_of(R&& r, Pred pred, Proj proj = {}); } @@ -652,10 +652,10 @@ namespace ranges { template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr bool none_of(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> constexpr bool none_of(R&& r, Pred pred, Proj proj = {}); } @@ -733,17 +733,17 @@ constexpr safe_iterator_t find(R&& r, const T& value, Proj proj = {}); template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr I find_if(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> constexpr safe_iterator_t find_if(R&& r, Pred pred, Proj proj = {}); template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr I find_if_not(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> constexpr safe_iterator_t find_if_not(R&& r, Pred pred, Proj proj = {}); } @@ -881,11 +881,11 @@ constexpr range_difference_t count(R&& r, const T& value, Proj proj = {}); template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr iter_difference_t count_if(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> constexpr range_difference_t count_if(R&& r, Pred pred, Proj proj = {}); } @@ -1197,12 +1197,12 @@ using copy_if_result = copy_result; template S, weakly_incrementable O, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> requires IndirectlyCopyable constexpr copy_if_result copy_if(I first, S last, O result, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> requires IndirectlyCopyable, O> constexpr copy_if_result, O> copy_if(R&& r, O result, Pred pred, Proj proj = {}); @@ -1402,11 +1402,11 @@ constexpr safe_iterator_t replace(R&& r, const T1& old_value, const T2& new_value, Proj proj = {}); template S, class T, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> requires writable constexpr I replace_if(I first, S last, Pred pred, const T& new_value, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> requires writable, const T&> constexpr safe_iterator_t replace_if(R&& r, Pred pred, const T& new_value, Proj proj = {}); @@ -1455,13 +1455,13 @@ using replace_copy_if_result = copy_result; template S, class T, output_iterator O, - class Proj = identity, IndirectUnaryPredicate> Pred> + class Proj = identity, indirect_unary_predicate> Pred> requires IndirectlyCopyable constexpr replace_copy_if_result replace_copy_if(I first, S last, O result, Pred pred, const T& new_value, Proj proj = {}); template O, class Proj = identity, - IndirectUnaryPredicate, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> requires IndirectlyCopyable, O> constexpr replace_copy_if_result, O> replace_copy_if(R&& r, O result, Pred pred, const T& new_value, @@ -1542,10 +1542,10 @@ constexpr safe_subrange_t remove(R&& r, const T& value, Proj proj = {}); template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr subrange remove_if(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> requires Permutable> constexpr safe_subrange_t remove_if(R&& r, Pred pred, Proj proj = {}); @@ -1592,12 +1592,12 @@ using remove_copy_if_result = copy_result; template S, weakly_incrementable O, - class Proj = identity, IndirectUnaryPredicate> Pred> + class Proj = identity, indirect_unary_predicate> Pred> requires IndirectlyCopyable constexpr remove_copy_if_result remove_copy_if(I first, S last, O result, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> requires IndirectlyCopyable, O> constexpr remove_copy_if_result, O> remove_copy_if(R&& r, O result, Pred pred, Proj proj = {}); @@ -2097,10 +2097,10 @@ namespace ranges { template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr bool is_partitioned(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> constexpr bool is_partitioned(R&& r, Pred pred, Proj proj = {}); } @@ -2116,11 +2116,11 @@ namespace ranges { template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr subrange partition(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> requires Permutable> constexpr safe_subrange_t partition(R&& r, Pred pred, Proj proj = {}); @@ -2138,11 +2138,11 @@ namespace ranges { template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> requires Permutable subrange stable_partition(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> requires Permutable> safe_subrange_t stable_partition(R&& r, Pred pred, Proj proj = {}); } @@ -2184,14 +2184,14 @@ }; template S, weakly_incrementable O1, weakly_incrementable O2, - class Proj = identity, IndirectUnaryPredicate> Pred> + class Proj = identity, indirect_unary_predicate> Pred> requires IndirectlyCopyable && IndirectlyCopyable constexpr partition_copy_result partition_copy(I first, S last, O1 out_true, O2 out_false, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> requires IndirectlyCopyable, O1> && IndirectlyCopyable, O2> constexpr partition_copy_result, O1, O2> @@ -2205,10 +2205,10 @@ namespace ranges { template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr I partition_point(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> constexpr safe_iterator_t partition_point(R&& r, Pred pred, Proj proj = {}); } @@ -2908,10 +2908,10 @@ Predicate pred); template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr bool ranges::all_of(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> constexpr bool ranges::all_of(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -2942,10 +2942,10 @@ Predicate pred); template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr bool ranges::any_of(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> constexpr bool ranges::any_of(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -2975,10 +2975,10 @@ Predicate pred); template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr bool ranges::none_of(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> constexpr bool ranges::none_of(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -3231,17 +3231,17 @@ constexpr safe_iterator_t ranges::find(R&& r, const T& value, Proj proj = {}); template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr I ranges::find_if(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> constexpr safe_iterator_t ranges::find_if(R&& r, Pred pred, Proj proj = {}); template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr I ranges::find_if_not(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> constexpr safe_iterator_t ranges::find_if_not(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -3516,11 +3516,11 @@ constexpr range_difference_t ranges::count(R&& r, const T& value, Proj proj = {}); template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr iter_difference_t ranges::count_if(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> constexpr range_difference_t ranges::count_if(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -4182,12 +4182,12 @@ ForwardIterator2 result, Predicate pred); template S, weakly_incrementable O, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> requires IndirectlyCopyable constexpr ranges::copy_if_result ranges::copy_if(I first, S last, O result, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> requires IndirectlyCopyable, O> constexpr ranges::copy_if_result, O> ranges::copy_if(R&& r, O result, Pred pred, Proj proj = {}); @@ -4695,11 +4695,11 @@ constexpr safe_iterator_t ranges::replace(R&& r, const T1& old_value, const T2& new_value, Proj proj = {}); template S, class T, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> requires writable constexpr I ranges::replace_if(I first, S last, Pred pred, const T& new_value, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> requires writable, const T&> constexpr safe_iterator_t ranges::replace_if(R&& r, Pred pred, const T& new_value, Proj proj = {}); @@ -4779,13 +4779,13 @@ Proj proj = {}); template S, class T, output_iterator O, - class Proj = identity, IndirectUnaryPredicate> Pred> + class Proj = identity, indirect_unary_predicate> Pred> requires IndirectlyCopyable constexpr ranges::replace_copy_if_result ranges::replace_copy_if(I first, S last, O result, Pred pred, const T& new_value, Proj proj = {}); template O, class Proj = identity, - IndirectUnaryPredicate, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> requires IndirectlyCopyable, O> constexpr ranges::replace_copy_if_result, O> ranges::replace_copy_if(R&& r, O result, Pred pred, const T& new_value, @@ -4975,10 +4975,10 @@ constexpr safe_subrange_t ranges::remove(R&& r, const T& value, Proj proj = {}); template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr subrange ranges::remove_if(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> requires Permutable> constexpr safe_subrange_t ranges::remove_if(R&& r, Pred pred, Proj proj = {}); @@ -5069,12 +5069,12 @@ constexpr ranges::remove_copy_result, O> ranges::remove_copy(R&& r, O result, const T& value, Proj proj = {}); template S, weakly_incrementable O, - class Proj = identity, IndirectUnaryPredicate> Pred> + class Proj = identity, indirect_unary_predicate> Pred> requires IndirectlyCopyable constexpr ranges::remove_copy_if_result ranges::remove_copy_if(I first, S last, O result, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> requires IndirectlyCopyable, O> constexpr ranges::remove_copy_if_result, O> ranges::remove_copy_if(R&& r, O result, Pred pred, Proj proj = {}); @@ -6585,10 +6585,10 @@ ForwardIterator first, ForwardIterator last, Predicate pred); template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr bool ranges::is_partitioned(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> constexpr bool ranges::is_partitioned(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -6620,11 +6620,11 @@ ForwardIterator first, ForwardIterator last, Predicate pred); template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr subrange ranges::partition(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> requires Permutable> constexpr safe_subrange_t ranges::partition(R&& r, Pred pred, Proj proj = {}); @@ -6689,11 +6689,11 @@ BidirectionalIterator first, BidirectionalIterator last, Predicate pred); template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> requires Permutable subrange ranges::stable_partition(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> requires Permutable> safe_subrange_t ranges::stable_partition(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -6761,14 +6761,14 @@ ForwardIterator1 out_true, ForwardIterator2 out_false, Predicate pred); template S, weakly_incrementable O1, weakly_incrementable O2, - class Proj = identity, IndirectUnaryPredicate> Pred> + class Proj = identity, indirect_unary_predicate> Pred> requires IndirectlyCopyable && IndirectlyCopyable constexpr ranges::partition_copy_result ranges::partition_copy(I first, S last, O1 out_true, O2 out_false, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> requires IndirectlyCopyable, O1> && IndirectlyCopyable, O2> constexpr ranges::partition_copy_result, O1, O2> @@ -6823,10 +6823,10 @@ partition_point(ForwardIterator first, ForwardIterator last, Predicate pred); template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + indirect_unary_predicate> Pred> constexpr I ranges::partition_point(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> + indirect_unary_predicate, Proj>> Pred> constexpr safe_iterator_t ranges::partition_point(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} diff --git a/source/iterators.tex b/source/iterators.tex index c5e431433d..e8bb05f568 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -149,7 +149,7 @@ concept indirectly_regular_unary_invocable = @\seebelow@; template - concept IndirectUnaryPredicate = @\seebelow@; + concept indirect_unary_predicate = @\seebelow@; template concept IndirectRelation = @\seebelow@; @@ -2315,7 +2315,7 @@ \indexlibrary{\idxcode{indirectly_unary_invocable}}% \indexlibrary{\idxcode{indirectly_regular_unary_invocable}}% -\indexlibrary{\idxcode{IndirectUnaryPredicate}}% +\indexlibrary{\idxcode{indirect_unary_predicate}}% \indexlibrary{\idxcode{IndirectRelation}}% \indexlibrary{\idxcode{IndirectStrictWeakOrder}}% \begin{codeblock} @@ -2343,7 +2343,7 @@ invoke_result_t>>; template - concept IndirectUnaryPredicate = + concept indirect_unary_predicate = readable && copy_constructible && predicate&> && @@ -4539,7 +4539,7 @@ \begin{codeblock} template S, weakly_incrementable O, - IndirectUnaryPredicate Pred> + indirect_unary_predicate Pred> requires IndirectlyMovable void move_if(I first, S last, O out, Pred pred) { std::ranges::copy_if(move_iterator{first}, move_sentinel{last}, out, pred); diff --git a/source/ranges.tex b/source/ranges.tex index 116c9cc05d..ea254bf712 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -161,7 +161,7 @@ class ref_view; // \ref{range.filter}, filter view - template> Pred> + template> Pred> requires View && is_object_v class filter_view; @@ -183,7 +183,7 @@ // \ref{range.take.while}, take while view template requires InputRange && is_object_v && - IndirectUnaryPredicate> + indirect_unary_predicate> class take_while_view; namespace views { inline constexpr @\unspec@ take_while = @\unspec@; } @@ -197,7 +197,7 @@ // \ref{range.drop.while}, drop while view template requires InputRange && is_object_v && - IndirectUnaryPredicate> + indirect_unary_predicate> class drop_while_view; namespace views { inline constexpr @\unspec@ drop_while = @\unspec@; } @@ -2655,7 +2655,7 @@ \begin{codeblock} namespace std::ranges { - template> Pred> + template> Pred> requires View && is_object_v class filter_view : public view_interface> { private: @@ -3911,7 +3911,7 @@ namespace std::ranges { template requires InputRange && is_object_v && - IndirectUnaryPredicate> + indirect_unary_predicate> class take_while_view : public view_interface> { template class sentinel; // \expos @@ -4201,7 +4201,7 @@ namespace std::ranges { template requires InputRange && is_object_v && - IndirectUnaryPredicate> + indirect_unary_predicate> class drop_while_view : public view_interface> { public: drop_while_view() = default; From 51b895dea03ba08684980ec5d542ab355834ff22 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:27:42 -0700 Subject: [PATCH 50/84] [everywhere] Rename concept 'IndirectRelation' to 'indirect_relation'. --- source/algorithms.tex | 104 +++++++++++++++++++++--------------------- source/iterators.tex | 8 ++-- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 6928704d91..51ce63d94b 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -726,10 +726,10 @@ namespace ranges { template S, class T, class Proj = identity> - requires IndirectRelation, const T*> + requires indirect_relation, const T*> constexpr I find(I first, S last, const T& value, Proj proj = {}); template - requires IndirectRelation, Proj>, const T*> + requires indirect_relation, Proj>, const T*> constexpr safe_iterator_t find(R&& r, const T& value, Proj proj = {}); template S, class Proj = identity, @@ -812,14 +812,14 @@ namespace ranges { template S1, forward_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, - IndirectRelation, - projected> Pred = ranges::equal_to> + indirect_relation, + projected> Pred = ranges::equal_to> constexpr I1 find_first_of(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template, Proj1>, - projected, Proj2>> Pred = ranges::equal_to> + indirect_relation, Proj1>, + projected, Proj2>> Pred = ranges::equal_to> constexpr safe_iterator_t find_first_of(R1&& r1, R2&& r2, Pred pred = {}, @@ -846,11 +846,11 @@ namespace ranges { template S, class Proj = identity, - IndirectRelation> Pred = ranges::equal_to> + indirect_relation> Pred = ranges::equal_to> constexpr I adjacent_find(I first, S last, Pred pred = {}, Proj proj = {}); template, Proj>> Pred = ranges::equal_to> + indirect_relation, Proj>> Pred = ranges::equal_to> constexpr safe_iterator_t adjacent_find(R&& r, Pred pred = {}, Proj proj = {}); } @@ -873,11 +873,11 @@ namespace ranges { template S, class T, class Proj = identity> - requires IndirectRelation, const T*> + requires indirect_relation, const T*> constexpr iter_difference_t count(I first, S last, const T& value, Proj proj = {}); template - requires IndirectRelation, Proj>, const T*> + requires indirect_relation, Proj>, const T*> constexpr range_difference_t count(R&& r, const T& value, Proj proj = {}); template S, class Proj = identity, @@ -953,15 +953,15 @@ template S1, input_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, - IndirectRelation, - projected> Pred = ranges::equal_to> + indirect_relation, + projected> Pred = ranges::equal_to> constexpr mismatch_result mismatch(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template, Proj1>, - projected, Proj2>> Pred = ranges::equal_to> + indirect_relation, Proj1>, + projected, Proj2>> Pred = ranges::equal_to> constexpr mismatch_result, safe_iterator_t> mismatch(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -1393,12 +1393,12 @@ namespace ranges { template S, class T1, class T2, class Proj = identity> requires writable && - IndirectRelation, const T1*> + indirect_relation, const T1*> constexpr I replace(I first, S last, const T1& old_value, const T2& new_value, Proj proj = {}); template requires writable, const T2&> && - IndirectRelation, Proj>, const T1*> + indirect_relation, Proj>, const T1*> constexpr safe_iterator_t replace(R&& r, const T1& old_value, const T2& new_value, Proj proj = {}); template S, class T, class Proj = identity, @@ -1439,14 +1439,14 @@ template S, class T1, class T2, output_iterator O, class Proj = identity> requires IndirectlyCopyable && - IndirectRelation, const T1*> + indirect_relation, const T1*> constexpr replace_copy_result replace_copy(I first, S last, O result, const T1& old_value, const T2& new_value, Proj proj = {}); template O, class Proj = identity> requires IndirectlyCopyable, O> && - IndirectRelation, Proj>, const T1*> + indirect_relation, Proj>, const T1*> constexpr replace_copy_result, O> replace_copy(R&& r, O result, const T1& old_value, const T2& new_value, Proj proj = {}); @@ -1534,11 +1534,11 @@ namespace ranges { template S, class T, class Proj = identity> - requires IndirectRelation, const T*> + requires indirect_relation, const T*> constexpr subrange remove(I first, S last, const T& value, Proj proj = {}); template requires Permutable> && - IndirectRelation, Proj>, const T*> + indirect_relation, Proj>, const T*> constexpr safe_subrange_t remove(R&& r, const T& value, Proj proj = {}); template S, class Proj = identity, @@ -1579,12 +1579,12 @@ template S, weakly_incrementable O, class T, class Proj = identity> requires IndirectlyCopyable && - IndirectRelation, const T*> + indirect_relation, const T*> constexpr remove_copy_result remove_copy(I first, S last, O result, const T& value, Proj proj = {}); template requires IndirectlyCopyable, O> && - IndirectRelation, Proj>, const T*> + indirect_relation, Proj>, const T*> constexpr remove_copy_result, O> remove_copy(R&& r, O result, const T& value, Proj proj = {}); @@ -1619,10 +1619,10 @@ namespace ranges { template S, class Proj = identity, - IndirectRelation> C = ranges::equal_to> + indirect_relation> C = ranges::equal_to> constexpr subrange unique(I first, S last, C comp = {}, Proj proj = {}); template, Proj>> C = ranges::equal_to> + indirect_relation, Proj>> C = ranges::equal_to> requires Permutable> constexpr safe_subrange_t unique(R&& r, C comp = {}, Proj proj = {}); @@ -1653,7 +1653,7 @@ using unique_copy_result = copy_result; template S, weakly_incrementable O, - class Proj = identity, IndirectRelation> C = ranges::equal_to> + class Proj = identity, indirect_relation> C = ranges::equal_to> requires IndirectlyCopyable && (forward_iterator || (input_iterator && same_as, iter_value_t>) || @@ -1661,7 +1661,7 @@ constexpr unique_copy_result unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); template, Proj>> C = ranges::equal_to> + indirect_relation, Proj>> C = ranges::equal_to> requires IndirectlyCopyable, O> && (forward_iterator> || (input_iterator && same_as, iter_value_t>) || @@ -3224,10 +3224,10 @@ Predicate pred); template S, class T, class Proj = identity> - requires IndirectRelation, const T*> + requires indirect_relation, const T*> constexpr I ranges::find(I first, S last, const T& value, Proj proj = {}); template - requires IndirectRelation, Proj>, const T*> + requires indirect_relation, Proj>, const T*> constexpr safe_iterator_t ranges::find(R&& r, const T& value, Proj proj = {}); template S, class Proj = identity, @@ -3385,15 +3385,15 @@ template S1, forward_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, - IndirectRelation, - projected> Pred = ranges::equal_to> + indirect_relation, + projected> Pred = ranges::equal_to> constexpr I1 ranges::find_first_of(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template, Proj1>, - projected, Proj2>> Pred = ranges::equal_to> + indirect_relation, Proj1>, + projected, Proj2>> Pred = ranges::equal_to> constexpr safe_iterator_t ranges::find_first_of(R1&& r1, R2&& r2, Pred pred = {}, @@ -3451,10 +3451,10 @@ BinaryPredicate pred); template S, class Proj = identity, - IndirectRelation> Pred = ranges::equal_to> + indirect_relation> Pred = ranges::equal_to> constexpr I ranges::adjacent_find(I first, S last, Pred pred = {}, Proj proj = {}); template, Proj>> Pred = ranges::equal_to> + indirect_relation, Proj>> Pred = ranges::equal_to> constexpr safe_iterator_t ranges::adjacent_find(R&& r, Pred pred = {}, Proj proj = {}); \end{itemdecl} @@ -3508,11 +3508,11 @@ ForwardIterator first, ForwardIterator last, Predicate pred); template S, class T, class Proj = identity> - requires IndirectRelation, const T*> + requires indirect_relation, const T*> constexpr iter_difference_t ranges::count(I first, S last, const T& value, Proj proj = {}); template - requires IndirectRelation, Proj>, const T*> + requires indirect_relation, Proj>, const T*> constexpr range_difference_t ranges::count(R&& r, const T& value, Proj proj = {}); template S, class Proj = identity, @@ -3606,15 +3606,15 @@ template S1, input_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, - IndirectRelation, - projected> Pred = ranges::equal_to> + indirect_relation, + projected> Pred = ranges::equal_to> constexpr ranges::mismatch_result ranges::mismatch(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template, Proj1>, - projected, Proj2>> Pred = ranges::equal_to> + indirect_relation, Proj1>, + projected, Proj2>> Pred = ranges::equal_to> constexpr ranges::mismatch_result, safe_iterator_t> ranges::mismatch(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -4686,12 +4686,12 @@ template S, class T1, class T2, class Proj = identity> requires writable && - IndirectRelation, const T1*> + indirect_relation, const T1*> constexpr I ranges::replace(I first, S last, const T1& old_value, const T2& new_value, Proj proj = {}); template requires writable, const T2&> && - IndirectRelation, Proj>, const T1*> + indirect_relation, Proj>, const T1*> constexpr safe_iterator_t ranges::replace(R&& r, const T1& old_value, const T2& new_value, Proj proj = {}); template S, class T, class Proj = identity, @@ -4766,14 +4766,14 @@ template S, class T1, class T2, output_iterator O, class Proj = identity> requires IndirectlyCopyable && - IndirectRelation, const T1*> + indirect_relation, const T1*> constexpr ranges::replace_copy_result ranges::replace_copy(I first, S last, O result, const T1& old_value, const T2& new_value, Proj proj = {}); template O, class Proj = identity> requires IndirectlyCopyable, O> && - IndirectRelation, Proj>, const T1*> + indirect_relation, Proj>, const T1*> constexpr ranges::replace_copy_result, O> ranges::replace_copy(R&& r, O result, const T1& old_value, const T2& new_value, Proj proj = {}); @@ -4967,11 +4967,11 @@ Predicate pred); template S, class T, class Proj = identity> - requires IndirectRelation, const T*> + requires indirect_relation, const T*> constexpr subrange ranges::remove(I first, S last, const T& value, Proj proj = {}); template requires Permutable> && - IndirectRelation, Proj>, const T*> + indirect_relation, Proj>, const T*> constexpr safe_subrange_t ranges::remove(R&& r, const T& value, Proj proj = {}); template S, class Proj = identity, @@ -5060,12 +5060,12 @@ template S, weakly_incrementable O, class T, class Proj = identity> requires IndirectlyCopyable && - IndirectRelation, const T*> + indirect_relation, const T*> constexpr ranges::remove_copy_result ranges::remove_copy(I first, S last, O result, const T& value, Proj proj = {}); template requires IndirectlyCopyable, O> && - IndirectRelation, Proj>, const T*> + indirect_relation, Proj>, const T*> constexpr ranges::remove_copy_result, O> ranges::remove_copy(R&& r, O result, const T& value, Proj proj = {}); template S, weakly_incrementable O, @@ -5146,10 +5146,10 @@ BinaryPredicate pred); template S, class Proj = identity, - IndirectRelation> C = ranges::equal_to> + indirect_relation> C = ranges::equal_to> constexpr subrange ranges::unique(I first, S last, C comp = {}, Proj proj = {}); template, Proj>> C = ranges::equal_to> + indirect_relation, Proj>> C = ranges::equal_to> requires Permutable> constexpr safe_subrange_t ranges::unique(R&& r, C comp = {}, Proj proj = {}); @@ -5224,7 +5224,7 @@ ForwardIterator2 result, BinaryPredicate pred); template S, weakly_incrementable O, - class Proj = identity, IndirectRelation> C = ranges::equal_to> + class Proj = identity, indirect_relation> C = ranges::equal_to> requires IndirectlyCopyable && (forward_iterator || (input_iterator && same_as, iter_value_t>) || @@ -5232,7 +5232,7 @@ constexpr ranges::unique_copy_result ranges::unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); template, Proj>> C = ranges::equal_to> + indirect_relation, Proj>> C = ranges::equal_to> requires IndirectlyCopyable, O> && (forward_iterator> || (input_iterator && same_as, iter_value_t>) || diff --git a/source/iterators.tex b/source/iterators.tex index e8bb05f568..01898dcbf9 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -152,7 +152,7 @@ concept indirect_unary_predicate = @\seebelow@; template - concept IndirectRelation = @\seebelow@; + concept indirect_relation = @\seebelow@; template concept IndirectStrictWeakOrder = @\seebelow@; @@ -2316,7 +2316,7 @@ \indexlibrary{\idxcode{indirectly_unary_invocable}}% \indexlibrary{\idxcode{indirectly_regular_unary_invocable}}% \indexlibrary{\idxcode{indirect_unary_predicate}}% -\indexlibrary{\idxcode{IndirectRelation}}% +\indexlibrary{\idxcode{indirect_relation}}% \indexlibrary{\idxcode{IndirectStrictWeakOrder}}% \begin{codeblock} namespace std { @@ -2351,7 +2351,7 @@ predicate>; template - concept IndirectRelation = + concept indirect_relation = readable && readable && copy_constructible && relation&, iter_value_t&> && @@ -2546,7 +2546,7 @@ template concept IndirectlyComparable = - IndirectRelation, projected>; + indirect_relation, projected>; \end{codeblock} \rSec3[alg.req.permutable]{Concept \libconcept{Permutable}} From 03257784952d4c4013cde2b8918154b1e1a80354 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:30:26 -0700 Subject: [PATCH 51/84] [everywhere] Rename concept 'IndirectStrictWeakOrder' to 'indirect_strict_weak_order'. --- source/algorithms.tex | 164 +++++++++++++++++++++--------------------- source/iterators.tex | 10 +-- 2 files changed, 87 insertions(+), 87 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 51ce63d94b..0429005e6a 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1912,7 +1912,7 @@ template S1, random_access_iterator I2, sentinel_for S2, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires IndirectlyCopyable && Sortable && - IndirectStrictWeakOrder, projected> + indirect_strict_weak_order, projected> constexpr partial_sort_copy_result partial_sort_copy(I1 first, S1 last, I2 result_first, S2 result_last, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -1920,8 +1920,8 @@ class Proj1 = identity, class Proj2 = identity> requires IndirectlyCopyable, iterator_t> && Sortable, Comp, Proj2> && - IndirectStrictWeakOrder, Proj1>, - projected, Proj2>> + indirect_strict_weak_order, Proj1>, + projected, Proj2>> constexpr partial_sort_copy_result, safe_iterator_t> partial_sort_copy(R1&& r, R2&& result_r, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -1942,10 +1942,10 @@ namespace ranges { template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr bool is_sorted(I first, S last, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr bool is_sorted(R&& r, Comp comp = {}, Proj proj = {}); } @@ -1968,10 +1968,10 @@ namespace ranges { template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr I is_sorted_until(I first, S last, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr safe_iterator_t is_sorted_until(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2016,11 +2016,11 @@ namespace ranges { template S, class T, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr I lower_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr safe_iterator_t lower_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {}); @@ -2037,10 +2037,10 @@ namespace ranges { template S, class T, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr I upper_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr safe_iterator_t upper_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {}); @@ -2057,11 +2057,11 @@ namespace ranges { template S, class T, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr subrange equal_range(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr safe_subrange_t equal_range(R&& r, const T& value, Comp comp = {}, Proj proj = {}); @@ -2078,11 +2078,11 @@ namespace ranges { template S, class T, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr bool binary_search(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr bool binary_search(R&& r, const T& value, Comp comp = {}, Proj proj = {}); @@ -2312,14 +2312,14 @@ namespace ranges { template S1, input_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, - IndirectStrictWeakOrder, projected> Comp = + indirect_strict_weak_order, projected> Comp = ranges::less> constexpr bool includes(I1 first1, S1 last1, I2 first2, S2 last2, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template, Proj1>, - projected, Proj2>> Comp = ranges::less> + indirect_strict_weak_order, Proj1>, + projected, Proj2>> Comp = ranges::less> constexpr bool includes(R1&& r1, R2&& r2, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); } @@ -2589,10 +2589,10 @@ namespace ranges { template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr bool is_heap(I first, S last, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr bool is_heap(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2615,10 +2615,10 @@ namespace ranges { template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr I is_heap_until(I first, S last, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr safe_iterator_t is_heap_until(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2634,13 +2634,13 @@ namespace ranges { template> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr const T& min(const T& a, const T& b, Comp comp = {}, Proj proj = {}); template> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr T min(initializer_list r, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> requires IndirectlyCopyableStorable, range_value_t*> constexpr range_value_t min(R&& r, Comp comp = {}, Proj proj = {}); @@ -2656,13 +2656,13 @@ namespace ranges { template> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr const T& max(const T& a, const T& b, Comp comp = {}, Proj proj = {}); template> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr T max(initializer_list r, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> requires IndirectlyCopyableStorable, range_value_t*> constexpr range_value_t max(R&& r, Comp comp = {}, Proj proj = {}); @@ -2696,15 +2696,15 @@ }; template> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr minmax_result minmax(const T& a, const T& b, Comp comp = {}, Proj proj = {}); template> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr minmax_result minmax(initializer_list r, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> requires IndirectlyCopyableStorable, range_value_t*> constexpr minmax_result> minmax(R&& r, Comp comp = {}, Proj proj = {}); @@ -2725,10 +2725,10 @@ namespace ranges { template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr I min_element(I first, S last, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr safe_iterator_t min_element(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2748,10 +2748,10 @@ namespace ranges { template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr I max_element(I first, S last, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr safe_iterator_t max_element(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2776,11 +2776,11 @@ using minmax_element_result = minmax_result; template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr minmax_element_result minmax_element(I first, S last, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr minmax_element_result> minmax_element(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2817,15 +2817,15 @@ namespace ranges { template S1, input_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, - IndirectStrictWeakOrder, projected> Comp = + indirect_strict_weak_order, projected> Comp = ranges::less> constexpr bool lexicographical_compare(I1 first1, S1 last1, I2 first2, S2 last2, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template, Proj1>, - projected, Proj2>> Comp = ranges::less> + indirect_strict_weak_order, Proj1>, + projected, Proj2>> Comp = ranges::less> constexpr bool lexicographical_compare(R1&& r1, R2&& r2, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -6069,7 +6069,7 @@ template S1, random_access_iterator I2, sentinel_for S2, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires IndirectlyCopyable && Sortable && - IndirectStrictWeakOrder, projected> + indirect_strict_weak_order, projected> constexpr ranges::partial_sort_copy_result ranges::partial_sort_copy(I1 first, S1 last, I2 result_first, S2 result_last, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -6077,8 +6077,8 @@ class Proj1 = identity, class Proj2 = identity> requires IndirectlyCopyable, iterator_t> && Sortable, Comp, Proj2> && - IndirectStrictWeakOrder, Proj1>, - projected, Proj2>> + indirect_strict_weak_order, Proj1>, + projected, Proj2>> constexpr ranges::partial_sort_copy_result, safe_iterator_t> ranges::partial_sort_copy(R1&& r, R2&& result_r, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -6205,10 +6205,10 @@ \indexlibrary{\idxcode{is_sorted}}% \begin{itemdecl} template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr bool ranges::is_sorted(I first, S last, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr bool ranges::is_sorted(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -6240,10 +6240,10 @@ Compare comp); template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr I ranges::is_sorted_until(I first, S last, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr safe_iterator_t ranges::is_sorted_until(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -6375,11 +6375,11 @@ const T& value, Compare comp); template S, class T, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr I ranges::lower_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr safe_iterator_t ranges::lower_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {}); @@ -6423,10 +6423,10 @@ const T& value, Compare comp); template S, class T, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr I ranges::upper_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr safe_iterator_t ranges::upper_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {}); @@ -6471,11 +6471,11 @@ Compare comp); template S, class T, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr subrange ranges::equal_range(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr safe_subrange_t ranges::equal_range(R&& r, const T& value, Comp comp = {}, Proj proj = {}); @@ -6535,11 +6535,11 @@ const T& value, Compare comp); template S, class T, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr bool ranges::binary_search(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr bool ranges::binary_search(R&& r, const T& value, Comp comp = {}, Proj proj = {}); @@ -7080,14 +7080,14 @@ template S1, input_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, - IndirectStrictWeakOrder, - projected> Comp = ranges::less> + indirect_strict_weak_order, + projected> Comp = ranges::less> constexpr bool ranges::includes(I1 first1, S1 last1, I2 first2, S2 last2, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template, Proj1>, - projected, Proj2>> Comp = ranges::less> + indirect_strict_weak_order, Proj1>, + projected, Proj2>> Comp = ranges::less> constexpr bool ranges::includes(R1&& r1, R2&& r2, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); \end{itemdecl} @@ -7805,10 +7805,10 @@ \indexlibrary{\idxcode{is_heap}}% \begin{itemdecl} template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr bool ranges::is_heap(I first, S last, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr bool ranges::is_heap(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7840,10 +7840,10 @@ Compare comp); template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr I ranges::is_heap_until(I first, S last, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr safe_iterator_t ranges::is_heap_until(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7876,7 +7876,7 @@ constexpr const T& min(const T& a, const T& b, Compare comp); template> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr const T& ranges::min(const T& a, const T& b, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7910,10 +7910,10 @@ constexpr T min(initializer_list r, Compare comp); template> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr T ranges::min(initializer_list r, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> requires IndirectlyCopyableStorable, range_value_t*> constexpr range_value_t ranges::min(R&& r, Comp comp = {}, Proj proj = {}); @@ -7953,7 +7953,7 @@ constexpr const T& max(const T& a, const T& b, Compare comp); template> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr const T& ranges::max(const T& a, const T& b, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7987,10 +7987,10 @@ constexpr T max(initializer_list r, Compare comp); template> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr T ranges::max(initializer_list r, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> requires IndirectlyCopyableStorable, range_value_t*> constexpr range_value_t ranges::max(R&& r, Comp comp = {}, Proj proj = {}); @@ -8030,7 +8030,7 @@ constexpr pair minmax(const T& a, const T& b, Compare comp); template> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr ranges::minmax_result ranges::minmax(const T& a, const T& b, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -8066,11 +8066,11 @@ constexpr pair minmax(initializer_list t, Compare comp); template> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr ranges::minmax_result ranges::minmax(initializer_list r, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> requires IndirectlyCopyableStorable, range_value_t*> constexpr ranges::minmax_result> ranges::minmax(R&& r, Comp comp = {}, Proj proj = {}); @@ -8123,10 +8123,10 @@ Compare comp); template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr I ranges::min_element(I first, S last, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr safe_iterator_t ranges::min_element(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -8170,10 +8170,10 @@ Compare comp); template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr I ranges::max_element(I first, S last, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr safe_iterator_t ranges::max_element(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -8219,11 +8219,11 @@ ForwardIterator first, ForwardIterator last, Compare comp); template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + indirect_strict_weak_order> Comp = ranges::less> constexpr ranges::minmax_result ranges::minmax_element(I first, S last, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> + indirect_strict_weak_order, Proj>> Comp = ranges::less> constexpr ranges::minmax_result> ranges::minmax_element(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -8308,15 +8308,15 @@ template S1, input_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, - IndirectStrictWeakOrder, - projected> Comp = ranges::less> + indirect_strict_weak_order, + projected> Comp = ranges::less> constexpr bool ranges::lexicographical_compare(I1 first1, S1 last1, I2 first2, S2 last2, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template, Proj1>, - projected, Proj2>> Comp = ranges::less> + indirect_strict_weak_order, Proj1>, + projected, Proj2>> Comp = ranges::less> constexpr bool ranges::lexicographical_compare(R1&& r1, R2&& r2, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); diff --git a/source/iterators.tex b/source/iterators.tex index 01898dcbf9..3607ff83bc 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -155,7 +155,7 @@ concept indirect_relation = @\seebelow@; template - concept IndirectStrictWeakOrder = @\seebelow@; + concept indirect_strict_weak_order = @\seebelow@; template requires (readable && ...) && invocable...> @@ -2317,7 +2317,7 @@ \indexlibrary{\idxcode{indirectly_regular_unary_invocable}}% \indexlibrary{\idxcode{indirect_unary_predicate}}% \indexlibrary{\idxcode{indirect_relation}}% -\indexlibrary{\idxcode{IndirectStrictWeakOrder}}% +\indexlibrary{\idxcode{indirect_strict_weak_order}}% \begin{codeblock} namespace std { template @@ -2361,7 +2361,7 @@ relation, iter_common_reference_t>; template - concept IndirectStrictWeakOrder = + concept indirect_strict_weak_order = readable && readable && copy_constructible && strict_weak_order&, iter_value_t&> && @@ -2580,7 +2580,7 @@ weakly_incrementable && IndirectlyCopyable && IndirectlyCopyable && - IndirectStrictWeakOrder, projected>; + indirect_strict_weak_order, projected>; \end{codeblock} \rSec3[alg.req.sortable]{Concept \libconcept{Sortable}} @@ -2594,7 +2594,7 @@ template concept Sortable = Permutable && - IndirectStrictWeakOrder>; + indirect_strict_weak_order>; \end{codeblock} \rSec1[iterator.primitives]{Iterator primitives} From 211b530aacfbcb892877688fd02d18ba0cddb351 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:30:53 -0700 Subject: [PATCH 52/84] [everywhere] Rename concept 'IndirectlyMovable' to 'indirectly_movable'. --- source/algorithms.tex | 16 ++++++++-------- source/iterators.tex | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 0429005e6a..a508fbe773 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1242,11 +1242,11 @@ using move_result = copy_result; template S, weakly_incrementable O> - requires IndirectlyMovable + requires indirectly_movable constexpr move_result move(I first, S last, O result); template - requires IndirectlyMovable, O> + requires indirectly_movable, O> constexpr move_result, O> move(R&& r, O result); } @@ -1261,11 +1261,11 @@ using move_backward_result = copy_result; template S1, bidirectional_iterator I2> - requires IndirectlyMovable + requires indirectly_movable constexpr move_backward_result move_backward(I1 first, S1 last, I2 result); template - requires IndirectlyMovable, I> + requires indirectly_movable, I> constexpr move_backward_result, I> move_backward(R&& r, I result); } @@ -4306,11 +4306,11 @@ OutputIterator result); template S, weakly_incrementable O> - requires IndirectlyMovable + requires indirectly_movable constexpr ranges::move_result ranges::move(I first, S last, O result); template - requires IndirectlyMovable, O> + requires indirectly_movable, O> constexpr ranges::move_result, O> ranges::move(R&& r, O result); \end{itemdecl} @@ -4396,11 +4396,11 @@ BidirectionalIterator2 result); template S1, bidirectional_iterator I2> - requires IndirectlyMovable + requires indirectly_movable constexpr ranges::move_backward_result ranges::move_backward(I1 first, S1 last, I2 result); template - requires IndirectlyMovable, I> + requires indirectly_movable, I> constexpr ranges::move_backward_result, I> ranges::move_backward(R&& r, I result); \end{itemdecl} diff --git a/source/iterators.tex b/source/iterators.tex index 3607ff83bc..858eca8123 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -169,9 +169,9 @@ struct incrementable_traits>; // \ref{alg.req}, common algorithm requirements - // \ref{alg.req.ind.move}, concept \libconcept{IndirectlyMovable} + // \ref{alg.req.ind.move}, concept \libconcept{indirectly_movable} template - concept IndirectlyMovable = @\seebelow@; + concept indirectly_movable = @\seebelow@; template concept IndirectlyMovableStorable = @\seebelow@; @@ -2409,7 +2409,7 @@ There are three relational concepts that specify how element values are transferred between \libconcept{readable} and \libconcept{writable} types: -\libconcept{IndirectlyMovable}, +\libconcept{indirectly_movable}, \libconcept{IndirectlyCopyable}, and \libconcept{IndirectlySwappable}. There are three relational concepts for rearrangements: @@ -2426,24 +2426,24 @@ in addition to those that appear in the concepts' bodies\iref{range.cmp}. \end{note} -\rSec3[alg.req.ind.move]{Concept \libconcept{IndirectlyMovable}} +\rSec3[alg.req.ind.move]{Concept \libconcept{indirectly_movable}} \pnum -The \libconcept{IndirectlyMovable} concept specifies the relationship between +The \libconcept{indirectly_movable} concept specifies the relationship between a \libconcept{readable} type and a \libconcept{writable} type between which values may be moved. -\indexlibrary{\idxcode{IndirectlyMovable}}% +\indexlibrary{\idxcode{indirectly_movable}}% \begin{codeblock} template - concept IndirectlyMovable = + concept indirectly_movable = readable && writable>; \end{codeblock} \pnum The \libconcept{IndirectlyMovableStorable} concept augments -\libconcept{IndirectlyMovable} with additional requirements enabling +\libconcept{indirectly_movable} with additional requirements enabling the transfer to be performed through an intermediate object of the \libconcept{readable} type's value type. @@ -2451,7 +2451,7 @@ \begin{codeblock} template concept IndirectlyMovableStorable = - IndirectlyMovable && + indirectly_movable && writable> && movable> && constructible_from, iter_rvalue_reference_t> && @@ -4540,7 +4540,7 @@ \begin{codeblock} template S, weakly_incrementable O, indirect_unary_predicate Pred> - requires IndirectlyMovable + requires indirectly_movable void move_if(I first, S last, O out, Pred pred) { std::ranges::copy_if(move_iterator{first}, move_sentinel{last}, out, pred); } From 21fd88ba7666eafe8d57fe3b5ec1158a272c7e1e Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:31:31 -0700 Subject: [PATCH 53/84] [everywhere] Rename concept 'IndirectlyMovableStorable' to 'indirectly_movable_storable'. --- source/iterators.tex | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/iterators.tex b/source/iterators.tex index 858eca8123..3f9b641056 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -174,7 +174,7 @@ concept indirectly_movable = @\seebelow@; template - concept IndirectlyMovableStorable = @\seebelow@; + concept indirectly_movable_storable = @\seebelow@; // \ref{alg.req.ind.copy}, concept \libconcept{IndirectlyCopyable} template @@ -1125,8 +1125,8 @@ then \tcode{ranges::swap(*E1, *E2)}. \item Otherwise, if the types \tcode{T1} and \tcode{T2} of \tcode{E1} and -\tcode{E2} model \tcode{\libconcept{IndirectlyMovableStorable}} and -\tcode{IndirectlyMovableStorable}, then +\tcode{E2} model \tcode{\libconcept{indirectly_movable_storable}} and +\tcode{indirectly_movable_storable}, then \tcode{(void)(*E1 = \placeholdernc{iter-exchange-move}(E2, E1))}, except that \tcode{E1} is evaluated only once. @@ -2442,15 +2442,15 @@ \end{codeblock} \pnum -The \libconcept{IndirectlyMovableStorable} concept augments +The \libconcept{indirectly_movable_storable} concept augments \libconcept{indirectly_movable} with additional requirements enabling the transfer to be performed through an intermediate object of the \libconcept{readable} type's value type. -\indexlibrary{\idxcode{IndirectlyMovableStorable}}% +\indexlibrary{\idxcode{indirectly_movable_storable}}% \begin{codeblock} template - concept IndirectlyMovableStorable = + concept indirectly_movable_storable = indirectly_movable && writable> && movable> && @@ -2460,7 +2460,7 @@ \pnum Let \tcode{i} be a dereferenceable value of type \tcode{In}. -\tcode{In} and \tcode{Out} model \tcode{\libconcept{IndirectlyMovableStorable}} +\tcode{In} and \tcode{Out} model \tcode{\libconcept{indirectly_movable_storable}} only if after the initialization of the object \tcode{obj} in \begin{codeblock} iter_value_t obj(ranges::iter_move(i)); @@ -2560,7 +2560,7 @@ template concept Permutable = forward_iterator && - IndirectlyMovableStorable && + indirectly_movable_storable && IndirectlySwappable; \end{codeblock} From 8cc0968530988e802cae30f9d5e18faf340d3b78 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:33:06 -0700 Subject: [PATCH 54/84] [everywhere] Rename concept 'IndirectlyCopyable' to 'indirectly_copyable'. --- source/algorithms.tex | 104 +++++++++++++++++++++--------------------- source/iterators.tex | 22 ++++----- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index a508fbe773..bfa83bccce 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1155,11 +1155,11 @@ }; template S, weakly_incrementable O> - requires IndirectlyCopyable + requires indirectly_copyable constexpr copy_result copy(I first, S last, O result); template - requires IndirectlyCopyable, O> + requires indirectly_copyable, O> constexpr copy_result, O> copy(R&& r, O result); } @@ -1178,7 +1178,7 @@ using copy_n_result = copy_result; template - requires IndirectlyCopyable + requires indirectly_copyable constexpr copy_n_result copy_n(I first, iter_difference_t n, O result); } @@ -1198,12 +1198,12 @@ template S, weakly_incrementable O, class Proj = identity, indirect_unary_predicate> Pred> - requires IndirectlyCopyable + requires indirectly_copyable constexpr copy_if_result copy_if(I first, S last, O result, Pred pred, Proj proj = {}); template, Proj>> Pred> - requires IndirectlyCopyable, O> + requires indirectly_copyable, O> constexpr copy_if_result, O> copy_if(R&& r, O result, Pred pred, Proj proj = {}); } @@ -1218,11 +1218,11 @@ using copy_backward_result = copy_result; template S1, bidirectional_iterator I2> - requires IndirectlyCopyable + requires indirectly_copyable constexpr copy_backward_result copy_backward(I1 first, S1 last, I2 result); template - requires IndirectlyCopyable, I> + requires indirectly_copyable, I> constexpr copy_backward_result, I> copy_backward(R&& r, I result); } @@ -1438,14 +1438,14 @@ template S, class T1, class T2, output_iterator O, class Proj = identity> - requires IndirectlyCopyable && + requires indirectly_copyable && indirect_relation, const T1*> constexpr replace_copy_result replace_copy(I first, S last, O result, const T1& old_value, const T2& new_value, Proj proj = {}); template O, class Proj = identity> - requires IndirectlyCopyable, O> && + requires indirectly_copyable, O> && indirect_relation, Proj>, const T1*> constexpr replace_copy_result, O> replace_copy(R&& r, O result, const T1& old_value, const T2& new_value, @@ -1456,13 +1456,13 @@ template S, class T, output_iterator O, class Proj = identity, indirect_unary_predicate> Pred> - requires IndirectlyCopyable + requires indirectly_copyable constexpr replace_copy_if_result replace_copy_if(I first, S last, O result, Pred pred, const T& new_value, Proj proj = {}); template O, class Proj = identity, indirect_unary_predicate, Proj>> Pred> - requires IndirectlyCopyable, O> + requires indirectly_copyable, O> constexpr replace_copy_if_result, O> replace_copy_if(R&& r, O result, Pred pred, const T& new_value, Proj proj = {}); @@ -1578,12 +1578,12 @@ template S, weakly_incrementable O, class T, class Proj = identity> - requires IndirectlyCopyable && + requires indirectly_copyable && indirect_relation, const T*> constexpr remove_copy_result remove_copy(I first, S last, O result, const T& value, Proj proj = {}); template - requires IndirectlyCopyable, O> && + requires indirectly_copyable, O> && indirect_relation, Proj>, const T*> constexpr remove_copy_result, O> remove_copy(R&& r, O result, const T& value, Proj proj = {}); @@ -1593,12 +1593,12 @@ template S, weakly_incrementable O, class Proj = identity, indirect_unary_predicate> Pred> - requires IndirectlyCopyable + requires indirectly_copyable constexpr remove_copy_if_result remove_copy_if(I first, S last, O result, Pred pred, Proj proj = {}); template, Proj>> Pred> - requires IndirectlyCopyable, O> + requires indirectly_copyable, O> constexpr remove_copy_if_result, O> remove_copy_if(R&& r, O result, Pred pred, Proj proj = {}); } @@ -1654,7 +1654,7 @@ template S, weakly_incrementable O, class Proj = identity, indirect_relation> C = ranges::equal_to> - requires IndirectlyCopyable && + requires indirectly_copyable && (forward_iterator || (input_iterator && same_as, iter_value_t>) || IndirectlyCopyableStorable) @@ -1662,7 +1662,7 @@ unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); template, Proj>> C = ranges::equal_to> - requires IndirectlyCopyable, O> && + requires indirectly_copyable, O> && (forward_iterator> || (input_iterator && same_as, iter_value_t>) || IndirectlyCopyableStorable, O>) @@ -1701,11 +1701,11 @@ using reverse_copy_result = copy_result; template S, weakly_incrementable O> - requires IndirectlyCopyable + requires indirectly_copyable constexpr reverse_copy_result reverse_copy(I first, S last, O result); template - requires IndirectlyCopyable, O> + requires indirectly_copyable, O> constexpr reverse_copy_result, O> reverse_copy(R&& r, O result); } @@ -1744,11 +1744,11 @@ using rotate_copy_result = copy_result; template S, weakly_incrementable O> - requires IndirectlyCopyable + requires indirectly_copyable constexpr rotate_copy_result rotate_copy(I first, I middle, S last, O result); template - requires IndirectlyCopyable, O> + requires indirectly_copyable, O> constexpr rotate_copy_result, O> rotate_copy(R&& r, iterator_t middle, O result); } @@ -1911,14 +1911,14 @@ template S1, random_access_iterator I2, sentinel_for S2, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> - requires IndirectlyCopyable && Sortable && + requires indirectly_copyable && Sortable && indirect_strict_weak_order, projected> constexpr partial_sort_copy_result partial_sort_copy(I1 first, S1 last, I2 result_first, S2 result_last, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires IndirectlyCopyable, iterator_t> && + requires indirectly_copyable, iterator_t> && Sortable, Comp, Proj2> && indirect_strict_weak_order, Proj1>, projected, Proj2>> @@ -2185,15 +2185,15 @@ template S, weakly_incrementable O1, weakly_incrementable O2, class Proj = identity, indirect_unary_predicate> Pred> - requires IndirectlyCopyable && IndirectlyCopyable + requires indirectly_copyable && indirectly_copyable constexpr partition_copy_result partition_copy(I first, S last, O1 out_true, O2 out_false, Pred pred, Proj proj = {}); template, Proj>> Pred> - requires IndirectlyCopyable, O1> && - IndirectlyCopyable, O2> + requires indirectly_copyable, O1> && + indirectly_copyable, O2> constexpr partition_copy_result, O1, O2> partition_copy(R&& r, O1 out_true, O2 out_false, Pred pred, Proj proj = {}); } @@ -4062,10 +4062,10 @@ OutputIterator result); template S, weakly_incrementable O> - requires IndirectlyCopyable + requires indirectly_copyable constexpr ranges::copy_result ranges::copy(I first, S last, O result); template - requires IndirectlyCopyable, O> + requires indirectly_copyable, O> constexpr ranges::copy_result, O> ranges::copy(R&& r, O result); \end{itemdecl} @@ -4140,7 +4140,7 @@ ForwardIterator2 result); template - requires IndirectlyCopyable + requires indirectly_copyable constexpr ranges::copy_n_result ranges::copy_n(I first, iter_difference_t n, O result); \end{itemdecl} @@ -4183,12 +4183,12 @@ template S, weakly_incrementable O, class Proj = identity, indirect_unary_predicate> Pred> - requires IndirectlyCopyable + requires indirectly_copyable constexpr ranges::copy_if_result ranges::copy_if(I first, S last, O result, Pred pred, Proj proj = {}); template, Proj>> Pred> - requires IndirectlyCopyable, O> + requires indirectly_copyable, O> constexpr ranges::copy_if_result, O> ranges::copy_if(R&& r, O result, Pred pred, Proj proj = {}); \end{itemdecl} @@ -4254,11 +4254,11 @@ BidirectionalIterator2 result); template S1, bidirectional_iterator I2> - requires IndirectlyCopyable + requires indirectly_copyable constexpr ranges::copy_backward_result ranges::copy_backward(I1 first, S1 last, I2 result); template - requires IndirectlyCopyable, I> + requires indirectly_copyable, I> constexpr ranges::copy_backward_result, I> ranges::copy_backward(R&& r, I result); \end{itemdecl} @@ -4765,14 +4765,14 @@ template S, class T1, class T2, output_iterator O, class Proj = identity> - requires IndirectlyCopyable && + requires indirectly_copyable && indirect_relation, const T1*> constexpr ranges::replace_copy_result ranges::replace_copy(I first, S last, O result, const T1& old_value, const T2& new_value, Proj proj = {}); template O, class Proj = identity> - requires IndirectlyCopyable, O> && + requires indirectly_copyable, O> && indirect_relation, Proj>, const T1*> constexpr ranges::replace_copy_result, O> ranges::replace_copy(R&& r, O result, const T1& old_value, const T2& new_value, @@ -4780,13 +4780,13 @@ template S, class T, output_iterator O, class Proj = identity, indirect_unary_predicate> Pred> - requires IndirectlyCopyable + requires indirectly_copyable constexpr ranges::replace_copy_if_result ranges::replace_copy_if(I first, S last, O result, Pred pred, const T& new_value, Proj proj = {}); template O, class Proj = identity, indirect_unary_predicate, Proj>> Pred> - requires IndirectlyCopyable, O> + requires indirectly_copyable, O> constexpr ranges::replace_copy_if_result, O> ranges::replace_copy_if(R&& r, O result, Pred pred, const T& new_value, Proj proj = {}); @@ -5059,23 +5059,23 @@ template S, weakly_incrementable O, class T, class Proj = identity> - requires IndirectlyCopyable && + requires indirectly_copyable && indirect_relation, const T*> constexpr ranges::remove_copy_result ranges::remove_copy(I first, S last, O result, const T& value, Proj proj = {}); template - requires IndirectlyCopyable, O> && + requires indirectly_copyable, O> && indirect_relation, Proj>, const T*> constexpr ranges::remove_copy_result, O> ranges::remove_copy(R&& r, O result, const T& value, Proj proj = {}); template S, weakly_incrementable O, class Proj = identity, indirect_unary_predicate> Pred> - requires IndirectlyCopyable + requires indirectly_copyable constexpr ranges::remove_copy_if_result ranges::remove_copy_if(I first, S last, O result, Pred pred, Proj proj = {}); template, Proj>> Pred> - requires IndirectlyCopyable, O> + requires indirectly_copyable, O> constexpr ranges::remove_copy_if_result, O> ranges::remove_copy_if(R&& r, O result, Pred pred, Proj proj = {}); \end{itemdecl} @@ -5225,7 +5225,7 @@ template S, weakly_incrementable O, class Proj = identity, indirect_relation> C = ranges::equal_to> - requires IndirectlyCopyable && + requires indirectly_copyable && (forward_iterator || (input_iterator && same_as, iter_value_t>) || IndirectlyCopyableStorable) @@ -5233,7 +5233,7 @@ ranges::unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); template, Proj>> C = ranges::equal_to> - requires IndirectlyCopyable, O> && + requires indirectly_copyable, O> && (forward_iterator> || (input_iterator && same_as, iter_value_t>) || IndirectlyCopyableStorable, O>) @@ -5366,11 +5366,11 @@ ForwardIterator result); template S, weakly_incrementable O> - requires IndirectlyCopyable + requires indirectly_copyable constexpr ranges::reverse_copy_result ranges::reverse_copy(I first, S last, O result); template - requires IndirectlyCopyable, O> + requires indirectly_copyable, O> constexpr ranges::reverse_copy_result, O> ranges::reverse_copy(R&& r, O result); \end{itemdecl} @@ -5483,7 +5483,7 @@ ForwardIterator2 result); template S, weakly_incrementable O> - requires IndirectlyCopyable + requires indirectly_copyable constexpr ranges::rotate_copy_result ranges::rotate_copy(I first, I middle, S last, O result); \end{itemdecl} @@ -5521,7 +5521,7 @@ \begin{itemdecl} template - requires IndirectlyCopyable, O> + requires indirectly_copyable, O> constexpr ranges::rotate_copy_result, O> ranges::rotate_copy(R&& r, iterator_t middle, O result); \end{itemdecl} @@ -6068,14 +6068,14 @@ template S1, random_access_iterator I2, sentinel_for S2, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> - requires IndirectlyCopyable && Sortable && + requires indirectly_copyable && Sortable && indirect_strict_weak_order, projected> constexpr ranges::partial_sort_copy_result ranges::partial_sort_copy(I1 first, S1 last, I2 result_first, S2 result_last, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires IndirectlyCopyable, iterator_t> && + requires indirectly_copyable, iterator_t> && Sortable, Comp, Proj2> && indirect_strict_weak_order, Proj1>, projected, Proj2>> @@ -6762,15 +6762,15 @@ template S, weakly_incrementable O1, weakly_incrementable O2, class Proj = identity, indirect_unary_predicate> Pred> - requires IndirectlyCopyable && IndirectlyCopyable + requires indirectly_copyable && indirectly_copyable constexpr ranges::partition_copy_result ranges::partition_copy(I first, S last, O1 out_true, O2 out_false, Pred pred, Proj proj = {}); template, Proj>> Pred> - requires IndirectlyCopyable, O1> && - IndirectlyCopyable, O2> + requires indirectly_copyable, O1> && + indirectly_copyable, O2> constexpr ranges::partition_copy_result, O1, O2> ranges::partition_copy(R&& r, O1 out_true, O2 out_false, Pred pred, Proj proj = {}); \end{itemdecl} diff --git a/source/iterators.tex b/source/iterators.tex index 3f9b641056..20ef61681d 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -176,9 +176,9 @@ template concept indirectly_movable_storable = @\seebelow@; - // \ref{alg.req.ind.copy}, concept \libconcept{IndirectlyCopyable} + // \ref{alg.req.ind.copy}, concept \libconcept{indirectly_copyable} template - concept IndirectlyCopyable = @\seebelow@; + concept indirectly_copyable = @\seebelow@; template concept IndirectlyCopyableStorable = @\seebelow@; @@ -2410,7 +2410,7 @@ how element values are transferred between \libconcept{readable} and \libconcept{writable} types: \libconcept{indirectly_movable}, -\libconcept{IndirectlyCopyable}, and +\libconcept{indirectly_copyable}, and \libconcept{IndirectlySwappable}. There are three relational concepts for rearrangements: \libconcept{Permutable}, @@ -2470,24 +2470,24 @@ the resulting state of the value denoted by \tcode{*i} is valid but unspecified\iref{lib.types.movedfrom}. -\rSec3[alg.req.ind.copy]{Concept \libconcept{IndirectlyCopyable}} +\rSec3[alg.req.ind.copy]{Concept \libconcept{indirectly_copyable}} \pnum -The \libconcept{IndirectlyCopyable} concept specifies the relationship between +The \libconcept{indirectly_copyable} concept specifies the relationship between a \libconcept{readable} type and a \libconcept{writable} type between which values may be copied. -\indexlibrary{\idxcode{IndirectlyCopyable}}% +\indexlibrary{\idxcode{indirectly_copyable}}% \begin{codeblock} template - concept IndirectlyCopyable = + concept indirectly_copyable = readable && writable>; \end{codeblock} \pnum The \libconcept{IndirectlyCopyableStorable} concept augments -\libconcept{IndirectlyCopyable} with additional requirements enabling +\libconcept{indirectly_copyable} with additional requirements enabling the transfer to be performed through an intermediate object of the \libconcept{readable} type's value type. It also requires the capability to make copies of values. @@ -2496,7 +2496,7 @@ \begin{codeblock} template concept IndirectlyCopyableStorable = - IndirectlyCopyable && + indirectly_copyable && writable&> && copyable> && constructible_from, iter_reference_t> && @@ -2578,8 +2578,8 @@ input_iterator && input_iterator && weakly_incrementable && - IndirectlyCopyable && - IndirectlyCopyable && + indirectly_copyable && + indirectly_copyable && indirect_strict_weak_order, projected>; \end{codeblock} From e73fe7b8d83381206c8fff9c4a02929876fac846 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:33:31 -0700 Subject: [PATCH 55/84] [everywhere] Rename concept 'IndirectlyCopyableStorable' to 'indirectly_copyable_storable'. --- source/algorithms.tex | 20 ++++++++++---------- source/iterators.tex | 10 +++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index bfa83bccce..718cd16c10 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1657,7 +1657,7 @@ requires indirectly_copyable && (forward_iterator || (input_iterator && same_as, iter_value_t>) || - IndirectlyCopyableStorable) + indirectly_copyable_storable) constexpr unique_copy_result unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); template, O> && (forward_iterator> || (input_iterator && same_as, iter_value_t>) || - IndirectlyCopyableStorable, O>) + indirectly_copyable_storable, O>) constexpr unique_copy_result, O> unique_copy(R&& r, O result, C comp = {}, Proj proj = {}); } @@ -2641,7 +2641,7 @@ constexpr T min(initializer_list r, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> - requires IndirectlyCopyableStorable, range_value_t*> + requires indirectly_copyable_storable, range_value_t*> constexpr range_value_t min(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2663,7 +2663,7 @@ constexpr T max(initializer_list r, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> - requires IndirectlyCopyableStorable, range_value_t*> + requires indirectly_copyable_storable, range_value_t*> constexpr range_value_t max(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2705,7 +2705,7 @@ minmax(initializer_list r, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> - requires IndirectlyCopyableStorable, range_value_t*> + requires indirectly_copyable_storable, range_value_t*> constexpr minmax_result> minmax(R&& r, Comp comp = {}, Proj proj = {}); } @@ -5228,7 +5228,7 @@ requires indirectly_copyable && (forward_iterator || (input_iterator && same_as, iter_value_t>) || - IndirectlyCopyableStorable) + indirectly_copyable_storable) constexpr ranges::unique_copy_result ranges::unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); template, O> && (forward_iterator> || (input_iterator && same_as, iter_value_t>) || - IndirectlyCopyableStorable, O>) + indirectly_copyable_storable, O>) constexpr ranges::unique_copy_result, O> ranges::unique_copy(R&& r, O result, C comp = {}, Proj proj = {}); \end{itemdecl} @@ -7914,7 +7914,7 @@ constexpr T ranges::min(initializer_list r, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> - requires IndirectlyCopyableStorable, range_value_t*> + requires indirectly_copyable_storable, range_value_t*> constexpr range_value_t ranges::min(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7991,7 +7991,7 @@ constexpr T ranges::max(initializer_list r, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> - requires IndirectlyCopyableStorable, range_value_t*> + requires indirectly_copyable_storable, range_value_t*> constexpr range_value_t ranges::max(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -8071,7 +8071,7 @@ ranges::minmax(initializer_list r, Comp comp = {}, Proj proj = {}); template, Proj>> Comp = ranges::less> - requires IndirectlyCopyableStorable, range_value_t*> + requires indirectly_copyable_storable, range_value_t*> constexpr ranges::minmax_result> ranges::minmax(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} diff --git a/source/iterators.tex b/source/iterators.tex index 20ef61681d..e25ce3bed6 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -181,7 +181,7 @@ concept indirectly_copyable = @\seebelow@; template - concept IndirectlyCopyableStorable = @\seebelow@; + concept indirectly_copyable_storable = @\seebelow@; // \ref{alg.req.ind.swap}, concept \libconcept{IndirectlySwappable} template @@ -2486,16 +2486,16 @@ \end{codeblock} \pnum -The \libconcept{IndirectlyCopyableStorable} concept augments +The \libconcept{indirectly_copyable_storable} concept augments \libconcept{indirectly_copyable} with additional requirements enabling the transfer to be performed through an intermediate object of the \libconcept{readable} type's value type. It also requires the capability to make copies of values. -\indexlibrary{\idxcode{IndirectlyCopyableStorable}}% +\indexlibrary{\idxcode{indirectly_copyable_storable}}% \begin{codeblock} template - concept IndirectlyCopyableStorable = + concept indirectly_copyable_storable = indirectly_copyable && writable&> && copyable> && @@ -2505,7 +2505,7 @@ \pnum Let \tcode{i} be a dereferenceable value of type \tcode{In}. -\tcode{In} and \tcode{Out} model \tcode{\libconcept{IndirectlyCopyableStorable}} +\tcode{In} and \tcode{Out} model \tcode{\libconcept{indirectly_copyable_storable}} only if after the initialization of the object \tcode{obj} in \begin{codeblock} iter_value_t obj(*i); From f77f966b70f070b7536b5aefc6f591331c85074e Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:34:00 -0700 Subject: [PATCH 56/84] [everywhere] Rename concept 'IndirectlySwappable' to 'indirectly_swappable'. --- source/algorithms.tex | 8 ++++---- source/iterators.tex | 32 ++++++++++++++++---------------- source/ranges.tex | 12 ++++++------ 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 718cd16c10..1bf33873cb 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1284,11 +1284,11 @@ using swap_ranges_result = mismatch_result; template S1, input_iterator I2, sentinel_for S2> - requires IndirectlySwappable + requires indirectly_swappable constexpr swap_ranges_result swap_ranges(I1 first1, S1 last1, I2 first2, S2 last2); template - requires IndirectlySwappable, iterator_t> + requires indirectly_swappable, iterator_t> constexpr swap_ranges_result, safe_iterator_t> swap_ranges(R1&& r1, R2&& r2); } @@ -4463,11 +4463,11 @@ ForwardIterator2 first2); template S1, input_iterator I2, sentinel_for S2> - requires IndirectlySwappable + requires indirectly_swappable constexpr ranges::swap_ranges_result ranges::swap_ranges(I1 first1, S1 last1, I2 first2, S2 last2); template - requires IndirectlySwappable, iterator_t> + requires indirectly_swappable, iterator_t> constexpr ranges::swap_ranges_result, safe_iterator_t> ranges::swap_ranges(R1&& r1, R2&& r2); \end{itemdecl} diff --git a/source/iterators.tex b/source/iterators.tex index e25ce3bed6..5a44d502b7 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -183,9 +183,9 @@ template concept indirectly_copyable_storable = @\seebelow@; - // \ref{alg.req.ind.swap}, concept \libconcept{IndirectlySwappable} + // \ref{alg.req.ind.swap}, concept \libconcept{indirectly_swappable} template - concept IndirectlySwappable = @\seebelow@; + concept indirectly_swappable = @\seebelow@; // \ref{alg.req.ind.cmp}, concept \libconcept{IndirectlyComparable} template @@ -2411,7 +2411,7 @@ \libconcept{writable} types: \libconcept{indirectly_movable}, \libconcept{indirectly_copyable}, and -\libconcept{IndirectlySwappable}. +\libconcept{indirectly_swappable}. There are three relational concepts for rearrangements: \libconcept{Permutable}, \libconcept{Mergeable}, and @@ -2515,16 +2515,16 @@ of the value denoted by \tcode{*i} is valid but unspecified\iref{lib.types.movedfrom}. -\rSec3[alg.req.ind.swap]{Concept \libconcept{IndirectlySwappable}} +\rSec3[alg.req.ind.swap]{Concept \libconcept{indirectly_swappable}} \pnum -The \libconcept{IndirectlySwappable} concept specifies a swappable relationship +The \libconcept{indirectly_swappable} concept specifies a swappable relationship between the values referenced by two \libconcept{readable} types. -\indexlibrary{\idxcode{IndirectlySwappable}}% +\indexlibrary{\idxcode{indirectly_swappable}}% \begin{codeblock} template - concept IndirectlySwappable = + concept indirectly_swappable = readable && readable && requires(I1& i1, I2& i2) { ranges::iter_swap(i1, i1); @@ -2561,7 +2561,7 @@ concept Permutable = forward_iterator && indirectly_movable_storable && - IndirectlySwappable; + indirectly_swappable; \end{codeblock} \rSec3[alg.req.mergeable]{Concept \libconcept{Mergeable}} @@ -3092,7 +3092,7 @@ friend constexpr iter_rvalue_reference_t iter_move(const reverse_iterator& i) noexcept(@\seebelow@); - template Iterator2> + template Iterator2> friend constexpr void iter_swap(const reverse_iterator& x, const reverse_iterator& y) noexcept(@\seebelow@); @@ -3593,7 +3593,7 @@ \indexlibrarymember{iter_swap}{reverse_iterator}% \begin{itemdecl} -template Iterator2> +template Iterator2> friend constexpr void iter_swap(const reverse_iterator& x, const reverse_iterator& y) noexcept(@\seebelow@); @@ -4098,7 +4098,7 @@ friend constexpr iter_rvalue_reference_t iter_move(const move_iterator& i) noexcept(noexcept(ranges::iter_move(i.current))); - template Iterator2> + template Iterator2> friend constexpr void iter_swap(const move_iterator& x, const move_iterator& y) noexcept(noexcept(ranges::iter_swap(x.current, y.current))); @@ -4501,7 +4501,7 @@ \indexlibrarymember{iter_swap}{move_iterator}% \begin{itemdecl} -template Iterator2> +template Iterator2> friend constexpr void iter_swap(const move_iterator& x, const move_iterator& y) noexcept(noexcept(ranges::iter_swap(x.current, y.current))); @@ -4694,7 +4694,7 @@ friend iter_rvalue_reference_t iter_move(const common_iterator& i) noexcept(noexcept(ranges::iter_move(declval()))) requires input_iterator; - template I2, class S2> + template I2, class S2> friend void iter_swap(const common_iterator& x, const common_iterator& y) noexcept(noexcept(ranges::iter_swap(declval(), declval()))); @@ -5004,7 +5004,7 @@ \indexlibrarymember{iter_swap}{common_iterator}% \begin{itemdecl} -template I2, class S2> +template I2, class S2> friend void iter_swap(const common_iterator& x, const common_iterator& y) noexcept(noexcept(ranges::iter_swap(declval(), declval()))); \end{itemdecl} @@ -5138,7 +5138,7 @@ friend constexpr iter_rvalue_reference_t iter_move(const counted_iterator& i) noexcept(noexcept(ranges::iter_move(i.current))) requires input_iterator; - template I2> + template I2> friend constexpr void iter_swap(const counted_iterator& x, const counted_iterator& y) noexcept(noexcept(ranges::iter_swap(x.current, y.current))); @@ -5536,7 +5536,7 @@ \indexlibrarymember{iter_swap}{counted_iterator}% \begin{itemdecl} -template I2> +template I2> friend constexpr void iter_swap(const counted_iterator& x, const counted_iterator& y) noexcept(noexcept(ranges::iter_swap(x.current, y.current))); diff --git a/source/ranges.tex b/source/ranges.tex index ea254bf712..9f695ae804 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -2782,7 +2782,7 @@ noexcept(noexcept(ranges::iter_move(i.current_))); friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.current_, y.current_))) - requires IndirectlySwappable>; + requires indirectly_swappable>; }; } \end{codeblock} @@ -2958,7 +2958,7 @@ \begin{itemdecl} friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.current_, y.current_))) - requires IndirectlySwappable>; + requires indirectly_swappable>; \end{itemdecl} \begin{itemdescr} @@ -3295,7 +3295,7 @@ friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.current_, y.current_))) - requires IndirectlySwappable>; + requires indirectly_swappable>; }; } \end{codeblock} @@ -3560,7 +3560,7 @@ \begin{itemdecl} friend constexpr void iter_swap(const iterator& x, const iterator& y) noexcept(noexcept(ranges::iter_swap(x.current_, y.current_))) - requires IndirectlySwappable>; + requires indirectly_swappable>; \end{itemdecl} \begin{itemdescr} @@ -5138,7 +5138,7 @@ friend constexpr void iter_swap(const inner_iterator& x, const inner_iterator& y) noexcept(noexcept(ranges::iter_swap(x.i_.@\placeholdernc{current}, y.i_.\placeholdernc{current}@))) - requires IndirectlySwappable>; + requires indirectly_swappable>; }; } \end{codeblock} @@ -5217,7 +5217,7 @@ \begin{itemdecl} friend constexpr void iter_swap(const inner_iterator& x, const inner_iterator& y) noexcept(noexcept(ranges::iter_swap(x.i_.@\placeholdernc{current}, y.i_.\placeholdernc{current}@))) - requires IndirectlySwappable>; + requires indirectly_swappable>; \end{itemdecl} \begin{itemdescr} From 1769a5655125350ad7e2c94e6667f04261469f80 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:34:33 -0700 Subject: [PATCH 57/84] [everywhere] Rename concept 'IndirectlyComparable' to 'indirectly_comparable'. --- source/algorithms.tex | 40 ++++++++++++++++++++-------------------- source/iterators.tex | 14 +++++++------- source/ranges.tex | 4 ++-- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 1bf33873cb..ad2238987c 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -774,13 +774,13 @@ namespace ranges { template S1, forward_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> - requires IndirectlyComparable + requires indirectly_comparable constexpr subrange find_end(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires IndirectlyComparable, iterator_t, Pred, Proj1, Proj2> + requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr safe_subrange_t find_end(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -1004,13 +1004,13 @@ namespace ranges { template S1, input_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> - requires IndirectlyComparable + requires indirectly_comparable constexpr bool equal(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires IndirectlyComparable, iterator_t, Pred, Proj1, Proj2> + requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr bool equal(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); } @@ -1034,13 +1034,13 @@ template S1, forward_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> - requires IndirectlyComparable + requires indirectly_comparable constexpr bool is_permutation(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires IndirectlyComparable, iterator_t, Pred, Proj1, Proj2> + requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr bool is_permutation(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); } @@ -1072,13 +1072,13 @@ template S1, forward_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> - requires IndirectlyComparable + requires indirectly_comparable constexpr subrange search(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires IndirectlyComparable, iterator_t, Pred, Proj1, Proj2> + requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr safe_subrange_t search(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -1109,13 +1109,13 @@ namespace ranges { template S, class T, class Pred = ranges::equal_to, class Proj = identity> - requires IndirectlyComparable + requires indirectly_comparable constexpr subrange search_n(I first, S last, iter_difference_t count, const T& value, Pred pred = {}, Proj proj = {}); template - requires IndirectlyComparable, const T*, Pred, Proj> + requires indirectly_comparable, const T*, Pred, Proj> constexpr safe_subrange_t search_n(R&& r, range_difference_t count, const T& value, Pred pred = {}, Proj proj = {}); @@ -3300,13 +3300,13 @@ template S1, forward_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> - requires IndirectlyComparable + requires indirectly_comparable constexpr subrange ranges::find_end(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires IndirectlyComparable, iterator_t, Pred, Proj1, Proj2> + requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr safe_subrange_t ranges::find_end(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -3699,13 +3699,13 @@ template S1, input_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> - requires IndirectlyComparable + requires indirectly_comparable constexpr bool ranges::equal(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires IndirectlyComparable, iterator_t, Pred, Proj1, Proj2> + requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr bool ranges::equal(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); \end{itemdecl} @@ -3831,13 +3831,13 @@ template S1, forward_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> - requires IndirectlyComparable + requires indirectly_comparable constexpr bool ranges::is_permutation(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires IndirectlyComparable, iterator_t, Pred, Proj1, Proj2> + requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr bool ranges::is_permutation(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); \end{itemdecl} @@ -3919,13 +3919,13 @@ template S1, forward_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> - requires IndirectlyComparable + requires indirectly_comparable constexpr subrange ranges::search(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires IndirectlyComparable, iterator_t, Pred, Proj1, Proj2> + requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr safe_subrange_t ranges::search(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -4006,13 +4006,13 @@ \begin{itemdecl} template S, class T, class Pred = ranges::equal_to, class Proj = identity> - requires IndirectlyComparable + requires indirectly_comparable constexpr subrange ranges::search_n(I first, S last, iter_difference_t count, const T& value, Pred pred = {}, Proj proj = {}); template - requires IndirectlyComparable, const T*, Pred, Proj> + requires indirectly_comparable, const T*, Pred, Proj> constexpr safe_subrange_t ranges::search_n(R&& r, range_difference_t count, const T& value, Pred pred = {}, Proj proj = {}); diff --git a/source/iterators.tex b/source/iterators.tex index 5a44d502b7..9dfffa0610 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -187,9 +187,9 @@ template concept indirectly_swappable = @\seebelow@; - // \ref{alg.req.ind.cmp}, concept \libconcept{IndirectlyComparable} + // \ref{alg.req.ind.cmp}, concept \libconcept{indirectly_comparable} template - concept IndirectlyComparable = @\seebelow@; + concept indirectly_comparable = @\seebelow@; // \ref{alg.req.permutable}, concept \libconcept{Permutable} template @@ -2417,7 +2417,7 @@ \libconcept{Mergeable}, and \libconcept{Sortable}. There is one relational concept for comparing values from different sequences: -\libconcept{IndirectlyComparable}. +\libconcept{indirectly_comparable}. \pnum \begin{note} @@ -2534,18 +2534,18 @@ }; \end{codeblock} -\rSec3[alg.req.ind.cmp]{Concept \libconcept{IndirectlyComparable}} +\rSec3[alg.req.ind.cmp]{Concept \libconcept{indirectly_comparable}} \pnum -The \libconcept{IndirectlyComparable} concept specifies +The \libconcept{indirectly_comparable} concept specifies the common requirements of algorithms that compare values from two different sequences. -\indexlibrary{\idxcode{IndirectlyComparable}}% +\indexlibrary{\idxcode{indirectly_comparable}}% \begin{codeblock} template - concept IndirectlyComparable = + concept indirectly_comparable = indirect_relation, projected>; \end{codeblock} diff --git a/source/ranges.tex b/source/ranges.tex index 9f695ae804..c0ef3c75ec 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -217,7 +217,7 @@ template requires View && View && - IndirectlyComparable, iterator_t, ranges::equal_to> && + indirectly_comparable, iterator_t, ranges::equal_to> && (ForwardRange || @\placeholder{tiny-range}@) class split_view; @@ -4793,7 +4793,7 @@ template requires View && View && - IndirectlyComparable, iterator_t, ranges::equal_to> && + indirectly_comparable, iterator_t, ranges::equal_to> && (ForwardRange || @\placeholdernc{tiny-range}@) class split_view : public view_interface> { private: From 26bab35a8ac9a90ea9aa6c32042ea8331ac33813 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:35:15 -0700 Subject: [PATCH 58/84] [everywhere] Rename concept 'Permutable' to 'permutable'. --- source/algorithms.tex | 64 +++++++++++++++++++++---------------------- source/iterators.tex | 16 +++++------ 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index ad2238987c..0fdd50fd99 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1533,20 +1533,20 @@ Predicate pred); namespace ranges { - template S, class T, class Proj = identity> + template S, class T, class Proj = identity> requires indirect_relation, const T*> constexpr subrange remove(I first, S last, const T& value, Proj proj = {}); template - requires Permutable> && + requires permutable> && indirect_relation, Proj>, const T*> constexpr safe_subrange_t remove(R&& r, const T& value, Proj proj = {}); - template S, class Proj = identity, + template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr subrange remove_if(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> - requires Permutable> + requires permutable> constexpr safe_subrange_t remove_if(R&& r, Pred pred, Proj proj = {}); } @@ -1618,12 +1618,12 @@ BinaryPredicate pred); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, indirect_relation> C = ranges::equal_to> constexpr subrange unique(I first, S last, C comp = {}, Proj proj = {}); template, Proj>> C = ranges::equal_to> - requires Permutable> + requires permutable> constexpr safe_subrange_t unique(R&& r, C comp = {}, Proj proj = {}); } @@ -1679,10 +1679,10 @@ namespace ranges { template S> - requires Permutable + requires permutable constexpr I reverse(I first, S last); template - requires Permutable> + requires permutable> constexpr safe_iterator_t reverse(R&& r); } @@ -1722,10 +1722,10 @@ ForwardIterator last); namespace ranges { - template S> + template S> constexpr subrange rotate(I first, I middle, S last); template - requires Permutable> + requires permutable> constexpr safe_subrange_t rotate(R&& r, iterator_t middle); } @@ -1768,11 +1768,11 @@ namespace ranges { template S, class Gen> - requires Permutable && + requires permutable && UniformRandomBitGenerator> I shuffle(I first, S last, Gen&& g); template - requires Permutable> && + requires permutable> && UniformRandomBitGenerator> safe_iterator_t shuffle(R&& r, Gen&& g); } @@ -2115,13 +2115,13 @@ Predicate pred); namespace ranges { - template S, class Proj = identity, + template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr subrange partition(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> - requires Permutable> + requires permutable> constexpr safe_subrange_t partition(R&& r, Pred pred, Proj proj = {}); } @@ -2139,11 +2139,11 @@ namespace ranges { template S, class Proj = identity, indirect_unary_predicate> Pred> - requires Permutable + requires permutable subrange stable_partition(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> - requires Permutable> + requires permutable> safe_subrange_t stable_partition(R&& r, Pred pred, Proj proj = {}); } @@ -4966,20 +4966,20 @@ ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class T, class Proj = identity> +template S, class T, class Proj = identity> requires indirect_relation, const T*> constexpr subrange ranges::remove(I first, S last, const T& value, Proj proj = {}); template - requires Permutable> && + requires permutable> && indirect_relation, Proj>, const T*> constexpr safe_subrange_t ranges::remove(R&& r, const T& value, Proj proj = {}); -template S, class Proj = identity, +template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr subrange ranges::remove_if(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> - requires Permutable> + requires permutable> constexpr safe_subrange_t ranges::remove_if(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -5145,12 +5145,12 @@ ForwardIterator first, ForwardIterator last, BinaryPredicate pred); -template S, class Proj = identity, +template S, class Proj = identity, indirect_relation> C = ranges::equal_to> constexpr subrange ranges::unique(I first, S last, C comp = {}, Proj proj = {}); template, Proj>> C = ranges::equal_to> - requires Permutable> + requires permutable> constexpr safe_subrange_t ranges::unique(R&& r, C comp = {}, Proj proj = {}); \end{itemdecl} @@ -5323,10 +5323,10 @@ BidirectionalIterator first, BidirectionalIterator last); template S> - requires Permutable + requires permutable constexpr I ranges::reverse(I first, S last); template - requires Permutable> + requires permutable> constexpr safe_iterator_t ranges::reverse(R&& r); \end{itemdecl} @@ -5417,7 +5417,7 @@ rotate(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator middle, ForwardIterator last); -template S> +template S> constexpr subrange ranges::rotate(I first, I middle, S last); \end{itemdecl} @@ -5459,7 +5459,7 @@ \begin{itemdecl} template - requires Permutable> + requires permutable> constexpr safe_subrange_t ranges::rotate(R&& r, iterator_t middle); \end{itemdecl} @@ -5614,11 +5614,11 @@ UniformRandomBitGenerator&& g); template S, class Gen> - requires Permutable && + requires permutable && UniformRandomBitGenerator> I ranges::shuffle(I first, S last, Gen&& g); template - requires Permutable> && + requires permutable> && UniformRandomBitGenerator> safe_iterator_t ranges::shuffle(R&& r, Gen&& g); \end{itemdecl} @@ -6619,13 +6619,13 @@ partition(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class Proj = identity, +template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr subrange ranges::partition(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> - requires Permutable> + requires permutable> constexpr safe_subrange_t ranges::partition(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -6690,11 +6690,11 @@ template S, class Proj = identity, indirect_unary_predicate> Pred> - requires Permutable + requires permutable subrange ranges::stable_partition(I first, S last, Pred pred, Proj proj = {}); template, Proj>> Pred> - requires Permutable> + requires permutable> safe_subrange_t ranges::stable_partition(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} diff --git a/source/iterators.tex b/source/iterators.tex index 9dfffa0610..a248dec23f 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -191,9 +191,9 @@ template concept indirectly_comparable = @\seebelow@; - // \ref{alg.req.permutable}, concept \libconcept{Permutable} + // \ref{alg.req.permutable}, concept \libconcept{permutable} template - concept Permutable = @\seebelow@; + concept permutable = @\seebelow@; // \ref{alg.req.mergeable}, concept \libconcept{Mergeable} template, projected>; \end{codeblock} -\rSec3[alg.req.permutable]{Concept \libconcept{Permutable}} +\rSec3[alg.req.permutable]{Concept \libconcept{permutable}} \pnum -The \libconcept{Permutable} concept specifies the common requirements +The \libconcept{permutable} concept specifies the common requirements of algorithms that reorder elements in place by moving or swapping them. -\indexlibrary{\idxcode{Permutable}}% +\indexlibrary{\idxcode{permutable}}% \begin{codeblock} template - concept Permutable = + concept permutable = forward_iterator && indirectly_movable_storable && indirectly_swappable; @@ -2593,7 +2593,7 @@ \begin{codeblock} template concept Sortable = - Permutable && + permutable && indirect_strict_weak_order>; \end{codeblock} From 3e017f1ef401f5743624aca2dfa4f20ddceda033 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:35:42 -0700 Subject: [PATCH 59/84] [everywhere] Rename concept 'Mergeable' to 'mergeable'. --- source/algorithms.tex | 40 ++++++++++++++++++++-------------------- source/iterators.tex | 14 +++++++------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 0fdd50fd99..e3e23d1690 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -2247,13 +2247,13 @@ template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> - requires Mergeable + requires mergeable constexpr merge_result merge(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> + requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr merge_result, safe_iterator_t, O> merge(R1&& r1, R2&& r2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -2356,13 +2356,13 @@ template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> - requires Mergeable + requires mergeable constexpr set_union_result set_union(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> + requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr set_union_result, safe_iterator_t, O> set_union(R1&& r1, R2&& r2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -2400,13 +2400,13 @@ template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> - requires Mergeable + requires mergeable constexpr set_intersection_result set_intersection(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> + requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr set_intersection_result, safe_iterator_t, O> set_intersection(R1&& r1, R2&& r2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -2444,13 +2444,13 @@ template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> - requires Mergeable + requires mergeable constexpr set_difference_result set_difference(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> + requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr set_difference_result, O> set_difference(R1&& r1, R2&& r2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -2488,14 +2488,14 @@ template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> - requires Mergeable + requires mergeable constexpr set_symmetric_difference_result set_symmetric_difference(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> + requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr set_symmetric_difference_result, safe_iterator_t, O> set_symmetric_difference(R1&& r1, R2&& r2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -6890,13 +6890,13 @@ template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> - requires Mergeable + requires mergeable constexpr ranges::merge_result ranges::merge(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> + requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr ranges::merge_result, safe_iterator_t, O> ranges::merge(R1&& r1, R2&& r2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -7155,13 +7155,13 @@ template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> - requires Mergeable + requires mergeable constexpr ranges::set_union_result ranges::set_union(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> + requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr ranges::set_union_result, safe_iterator_t, O> ranges::set_union(R1&& r1, R2&& r2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -7250,13 +7250,13 @@ template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> - requires Mergeable + requires mergeable constexpr ranges::set_intersection_result ranges::set_intersection(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> + requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr ranges::set_intersection_result, safe_iterator_t, O> ranges::set_intersection(R1&& r1, R2&& r2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -7343,13 +7343,13 @@ template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> - requires Mergeable + requires mergeable constexpr ranges::set_difference_result ranges::set_difference(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> + requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr ranges::set_difference_result, O> ranges::set_difference(R1&& r1, R2&& r2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -7437,14 +7437,14 @@ template S1, input_iterator I2, sentinel_for S2, weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> - requires Mergeable + requires mergeable constexpr ranges::set_symmetric_difference_result ranges::set_symmetric_difference(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); template - requires Mergeable, iterator_t, O, Comp, Proj1, Proj2> + requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr ranges::set_symmetric_difference_result, safe_iterator_t, O> ranges::set_symmetric_difference(R1&& r1, R2&& r2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); diff --git a/source/iterators.tex b/source/iterators.tex index a248dec23f..8a7d125c84 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -195,10 +195,10 @@ template concept permutable = @\seebelow@; - // \ref{alg.req.mergeable}, concept \libconcept{Mergeable} + // \ref{alg.req.mergeable}, concept \libconcept{mergeable} template - concept Mergeable = @\seebelow@; + concept mergeable = @\seebelow@; // \ref{alg.req.sortable}, concept \libconcept{Sortable} template @@ -2414,7 +2414,7 @@ \libconcept{indirectly_swappable}. There are three relational concepts for rearrangements: \libconcept{permutable}, -\libconcept{Mergeable}, and +\libconcept{mergeable}, and \libconcept{Sortable}. There is one relational concept for comparing values from different sequences: \libconcept{indirectly_comparable}. @@ -2564,17 +2564,17 @@ indirectly_swappable; \end{codeblock} -\rSec3[alg.req.mergeable]{Concept \libconcept{Mergeable}} +\rSec3[alg.req.mergeable]{Concept \libconcept{mergeable}} \pnum -The \libconcept{Mergeable} concept specifies the requirements of algorithms +The \libconcept{mergeable} concept specifies the requirements of algorithms that merge sorted sequences into an output sequence by copying elements. -\indexlibrary{\idxcode{Mergeable}}% +\indexlibrary{\idxcode{mergeable}}% \begin{codeblock} template - concept Mergeable = + concept mergeable = input_iterator && input_iterator && weakly_incrementable && From ba20906124fad1271b1609c499c9f0a2a300aed2 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:36:32 -0700 Subject: [PATCH 60/84] [everywhere] Rename concept 'Sortable' to 'sortable'. --- source/algorithms.tex | 96 +++++++++++++++++++++---------------------- source/iterators.tex | 14 +++---- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index e3e23d1690..95f46c0a82 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1815,11 +1815,11 @@ namespace ranges { template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr I sort(I first, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr safe_iterator_t sort(R&& r, Comp comp = {}, Proj proj = {}); } @@ -1840,10 +1840,10 @@ namespace ranges { template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable I stable_sort(I first, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> safe_iterator_t stable_sort(R&& r, Comp comp = {}, Proj proj = {}); } @@ -1870,11 +1870,11 @@ namespace ranges { template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr I partial_sort(I first, I middle, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr safe_iterator_t partial_sort(R&& r, iterator_t middle, Comp comp = {}, Proj proj = {}); @@ -1911,7 +1911,7 @@ template S1, random_access_iterator I2, sentinel_for S2, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> - requires indirectly_copyable && Sortable && + requires indirectly_copyable && sortable && indirect_strict_weak_order, projected> constexpr partial_sort_copy_result partial_sort_copy(I1 first, S1 last, I2 result_first, S2 result_last, @@ -1919,7 +1919,7 @@ template requires indirectly_copyable, iterator_t> && - Sortable, Comp, Proj2> && + sortable, Comp, Proj2> && indirect_strict_weak_order, Proj1>, projected, Proj2>> constexpr partial_sort_copy_result, safe_iterator_t> @@ -1995,11 +1995,11 @@ namespace ranges { template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr I nth_element(I first, I nth, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr safe_iterator_t nth_element(R&& r, iterator_t nth, Comp comp = {}, Proj proj = {}); } @@ -2281,10 +2281,10 @@ namespace ranges { template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable I inplace_merge(I first, I middle, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> safe_iterator_t inplace_merge(R&& r, iterator_t middle, Comp comp = {}, Proj proj = {}); @@ -2511,11 +2511,11 @@ namespace ranges { template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr I push_heap(I first, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr safe_iterator_t push_heap(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2529,11 +2529,11 @@ namespace ranges { template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr I pop_heap(I first, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr safe_iterator_t pop_heap(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2547,11 +2547,11 @@ namespace ranges { template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr I make_heap(I first, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr safe_iterator_t make_heap(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2565,11 +2565,11 @@ namespace ranges { template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr I sort_heap(I first, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr safe_iterator_t sort_heap(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2860,12 +2860,12 @@ template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr next_permutation_result next_permutation(I first, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr next_permutation_result> next_permutation(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2883,12 +2883,12 @@ template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr prev_permutation_result prev_permutation(I first, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr prev_permutation_result> prev_permutation(R&& r, Comp comp = {}, Proj proj = {}); } @@ -5846,11 +5846,11 @@ template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr I ranges::sort(I first, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::sort(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -5905,10 +5905,10 @@ template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable I ranges::stable_sort(I first, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> safe_iterator_t ranges::stable_sort(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -5977,7 +5977,7 @@ template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr I ranges::partial_sort(I first, I middle, S last, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -6020,7 +6020,7 @@ \begin{itemdecl} template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::partial_sort(R&& r, iterator_t middle, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -6068,7 +6068,7 @@ template S1, random_access_iterator I2, sentinel_for S2, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> - requires indirectly_copyable && Sortable && + requires indirectly_copyable && sortable && indirect_strict_weak_order, projected> constexpr ranges::partial_sort_copy_result ranges::partial_sort_copy(I1 first, S1 last, I2 result_first, S2 result_last, @@ -6076,7 +6076,7 @@ template requires indirectly_copyable, iterator_t> && - Sortable, Comp, Proj2> && + sortable, Comp, Proj2> && indirect_strict_weak_order, Proj1>, projected, Proj2>> constexpr ranges::partial_sort_copy_result, safe_iterator_t> @@ -6287,7 +6287,7 @@ template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr I ranges::nth_element(I first, I nth, S last, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -6332,7 +6332,7 @@ \begin{itemdecl} template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::nth_element(R&& r, iterator_t nth, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -6980,7 +6980,7 @@ template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable I ranges::inplace_merge(I first, I middle, S last, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7031,7 +7031,7 @@ \begin{itemdecl} template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> safe_iterator_t ranges::inplace_merge(R&& r, iterator_t middle, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7543,11 +7543,11 @@ template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr I ranges::push_heap(I first, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::push_heap(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7594,11 +7594,11 @@ template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr I ranges::pop_heap(I first, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::pop_heap(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7652,11 +7652,11 @@ template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr I ranges::make_heap(I first, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::make_heap(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7701,11 +7701,11 @@ template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr I ranges::sort_heap(I first, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::sort_heap(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -8430,12 +8430,12 @@ template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr ranges::next_permutation_result ranges::next_permutation(I first, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr ranges::next_permutation_result> ranges::next_permutation(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -8489,12 +8489,12 @@ template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr ranges::prev_permutation_result ranges::prev_permutation(I first, S last, Comp comp = {}, Proj proj = {}); template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr ranges::prev_permutation_result> ranges::prev_permutation(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} diff --git a/source/iterators.tex b/source/iterators.tex index 8a7d125c84..f4ba145e0b 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -200,9 +200,9 @@ class R = ranges::less, class P1 = identity, class P2 = identity> concept mergeable = @\seebelow@; - // \ref{alg.req.sortable}, concept \libconcept{Sortable} + // \ref{alg.req.sortable}, concept \libconcept{sortable} template - concept Sortable = @\seebelow@; + concept sortable = @\seebelow@; // \ref{iterator.primitives}, primitives // \ref{std.iterator.tags}, iterator tags @@ -2415,7 +2415,7 @@ There are three relational concepts for rearrangements: \libconcept{permutable}, \libconcept{mergeable}, and -\libconcept{Sortable}. +\libconcept{sortable}. There is one relational concept for comparing values from different sequences: \libconcept{indirectly_comparable}. @@ -2583,16 +2583,16 @@ indirect_strict_weak_order, projected>; \end{codeblock} -\rSec3[alg.req.sortable]{Concept \libconcept{Sortable}} +\rSec3[alg.req.sortable]{Concept \libconcept{sortable}} \pnum -The \libconcept{Sortable} concept specifies the common requirements of +The \libconcept{sortable} concept specifies the common requirements of algorithms that permute sequences into ordered sequences (e.g., \tcode{sort}). -\indexlibrary{\idxcode{Sortable}}% +\indexlibrary{\idxcode{sortable}}% \begin{codeblock} template - concept Sortable = + concept sortable = permutable && indirect_strict_weak_order>; \end{codeblock} From b752b1f3d289f68d619724d09a0914f507d9575a Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:38:12 -0700 Subject: [PATCH 61/84] [everywhere] Rename concept 'Range' to 'range'. --- source/algorithms.tex | 4 +- source/iterators.tex | 4 +- source/ranges.tex | 126 +++++++++++++++++++++--------------------- source/utilities.tex | 6 +- 4 files changed, 70 insertions(+), 70 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 95f46c0a82..e8d94474c7 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -242,9 +242,9 @@ \tcode{ranges::next(i, s)}. \pnum -Overloads of algorithms that take \libconcept{Range} arguments\iref{range.range} +Overloads of algorithms that take \libconcept{range} arguments\iref{range.range} behave as if they are implemented by calling \tcode{ranges::begin} and -\tcode{ranges::end} on the \libconcept{Range}(s) and +\tcode{ranges::end} on the \libconcept{range}(s) and dispatching to the overload in namespace \tcode{ranges} that takes separate iterator and sentinel arguments. diff --git a/source/iterators.tex b/source/iterators.tex index f4ba145e0b..d673edbb01 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -242,7 +242,7 @@ // \ref{range.iter.op.distance}, \tcode{ranges::distance} template S> constexpr iter_difference_t distance(I first, S last); - template + template constexpr range_difference_t distance(R&& r); // \ref{range.iter.op.next}, \tcode{ranges::next} @@ -2950,7 +2950,7 @@ \indexlibrary{\idxcode{distance}}% \begin{itemdecl} -template +template constexpr range_difference_t ranges::distance(R&& r); \end{itemdecl} diff --git a/source/ranges.tex b/source/ranges.tex index c0ef3c75ec..2195282e00 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -48,19 +48,19 @@ // \ref{range.range}, ranges template - concept Range = @\seebelow@; + concept range = @\seebelow@; - template + template using iterator_t = decltype(ranges::begin(declval())); - template + template using sentinel_t = decltype(ranges::end(declval())); - template + template using range_difference_t = iter_difference_t>; - template + template using range_value_t = iter_value_t>; - template + template using range_reference_t = iter_reference_t>; - template + template using range_rvalue_reference_t = iter_rvalue_reference_t>; // \ref{range.sized}, sized ranges @@ -119,10 +119,10 @@ // \ref{range.dangling}, dangling iterator handling struct dangling; - template + template using safe_iterator_t = conditional_t<@\placeholder{forwarding-range}@, iterator_t, dangling>; - template + template using safe_subrange_t = conditional_t<@\placeholder{forwarding-range}@, subrange>, dangling>; @@ -156,7 +156,7 @@ template using all_view = decltype(views::all(declval())); - template + template requires is_object_v class ref_view; @@ -712,17 +712,17 @@ on different types of sequences. \pnum -The \libconcept{Range} concept requires that +The \libconcept{range} concept requires that \tcode{ranges::begin} and \tcode{ranges::end} return an iterator and a sentinel, respectively. -The \libconcept{SizedRange} concept refines \libconcept{Range} with +The \libconcept{SizedRange} concept refines \libconcept{range} with the requirement that the number of elements in the range can be determined in constant time using the \tcode{ranges::size} function. -The \libconcept{View} concept specifies requirements on a \libconcept{Range} type +The \libconcept{View} concept specifies requirements on a \libconcept{range} type with constant-time copy and assign operations. \pnum -Several refinements of \libconcept{Range} group requirements +Several refinements of \libconcept{range} group requirements that arise frequently in concepts and algorithms. Common ranges are ranges for which \tcode{ranges::begin} and \tcode{ranges::end} @@ -737,11 +737,11 @@ \rSec2[range.range]{Ranges} \pnum -The \libconcept{Range} concept defines the requirements of a type that allows +The \libconcept{range} concept defines the requirements of a type that allows iteration over its elements by providing an iterator and sentinel that denote the elements of the range. -\indexlibrary{\idxcode{Range}}% +\indexlibrary{\idxcode{range}}% \begin{itemdecl} template concept @\placeholder{range-impl}@ = // \expos @@ -751,11 +751,11 @@ }; template - concept Range = @\placeholdernc{range-impl}@; + concept range = @\placeholdernc{range-impl}@; template concept @\placeholder{forwarding-range}@ = // \expos - Range && @\placeholder{range-impl}@; + range && @\placeholder{range-impl}@; \end{itemdecl} \begin{itemdescr} @@ -788,7 +788,7 @@ \pnum \begin{note} Equality preservation of both \tcode{ranges::begin} and -\tcode{ranges::end} enables passing a \libconcept{Range} whose iterator +\tcode{ranges::end} enables passing a \libconcept{range} whose iterator type models \libconcept{forward_iterator} to multiple algorithms and making multiple passes over the range by repeated calls to \tcode{ranges::begin} and \tcode{ranges::end}. @@ -834,14 +834,14 @@ \pnum The \libconcept{SizedRange} concept specifies the requirements -of a \libconcept{Range} type that knows its size in constant time with the +of a \libconcept{range} type that knows its size in constant time with the \tcode{size} function. \indexlibrary{\idxcode{SizedRange}}% \begin{itemdecl} template concept SizedRange = - Range && + range && !disable_sized_range> && requires(T& t) { ranges::size(t); }; \end{itemdecl} @@ -872,7 +872,7 @@ \begin{note} The complexity requirement for the evaluation of \tcode{ranges::size} is non-amortized, unlike the case for the complexity of the evaluations of -\tcode{ranges::begin} and \tcode{ranges::end} in the \libconcept{Range} concept. +\tcode{ranges::begin} and \tcode{ranges::end} in the \libconcept{range} concept. \end{note} \end{itemdescr} @@ -905,13 +905,13 @@ \begin{itemdecl} template concept View = - Range && semiregular && enable_view; + range && semiregular && enable_view; \end{itemdecl} \begin{itemdescr} % FIXME: This should explicitly say when View is modeled. \pnum -The \libconcept{View} concept specifies the requirements of a \libconcept{Range} type +The \libconcept{View} concept specifies the requirements of a \libconcept{range} type that has constant time copy, move, and assignment operators; that is, the cost of these operations is not proportional to the number of elements in the \tcode{View}. @@ -921,12 +921,12 @@ Examples of \tcode{View}s are: \begin{itemize} -\item A \libconcept{Range} type that wraps a pair of iterators. +\item A \libconcept{range} type that wraps a pair of iterators. -\item A \libconcept{Range} type that holds its elements by \tcode{shared_ptr} +\item A \libconcept{range} type that holds its elements by \tcode{shared_ptr} and shares ownership with all its copies. -\item A \libconcept{Range} type that generates its elements on demand. +\item A \libconcept{range} type that generates its elements on demand. \end{itemize} Most containers\iref{containers} are not views since @@ -936,7 +936,7 @@ \end{itemdescr} \pnum -Since the difference between \libconcept{Range} and \libconcept{View} is largely +Since the difference between \libconcept{range} and \libconcept{View} is largely semantic, the two are differentiated with the help of \tcode{enable_view}. \indexlibrary{\idxcode{enable_view}}% @@ -959,7 +959,7 @@ \tcode{unordered_set}\iref{unord.set}, \tcode{unordered_multiset}\iref{unord.multiset}, or \tcode{match_results}\iref{re.results}, \tcode{false}. -\item Otherwise, if both \tcode{T} and \tcode{const T} model \libconcept{Range} +\item Otherwise, if both \tcode{T} and \tcode{const T} model \libconcept{range} and \tcode{range_reference_t} is not the same type as \tcode{range_reference_t}, \tcode{false}. @@ -984,7 +984,7 @@ \pnum The \libconcept{OutputRange} concept specifies requirements of a -\libconcept{Range} type for which \tcode{ranges::begin} returns +\libconcept{range} type for which \tcode{ranges::begin} returns a model of \libconcept{output_iterator}\iref{iterator.concept.output}. \libconcept{InputRange}, \libconcept{ForwardRange}, \libconcept{BidirectionalRange}, and \libconcept{RandomAccessRange} are defined similarly. @@ -997,11 +997,11 @@ \begin{itemdecl} template concept OutputRange = - Range && output_iterator, T>; + range && output_iterator, T>; template concept InputRange = - Range && input_iterator>; + range && input_iterator>; template concept ForwardRange = @@ -1033,7 +1033,7 @@ \pnum The \libconcept{CommonRange} concept specifies requirements of -a \libconcept{Range} type for which \tcode{ranges::begin} and +a \libconcept{range} type for which \tcode{ranges::begin} and \tcode{ranges::end} return objects of the same type. \begin{example} The standard containers\iref{containers} model \libconcept{CommonRange}. @@ -1043,18 +1043,18 @@ \begin{itemdecl} template concept CommonRange = - Range && same_as, sentinel_t>; + range && same_as, sentinel_t>; \end{itemdecl} \pnum The \libconcept{ViewableRange} concept specifies the requirements of a -\libconcept{Range} type that can be converted to a \libconcept{View} safely. +\libconcept{range} type that can be converted to a \libconcept{View} safely. \indexlibrary{\idxcode{ViewableRange}}% \begin{itemdecl} template concept ViewableRange = - Range && (@\placeholder{forwarding-range}@ || View>); + range && (@\placeholder{forwarding-range}@ || View>); \end{itemdecl} \rSec1[range.utility]{Range utilities} @@ -1072,7 +1072,7 @@ \begin{codeblock} template concept @\placeholder{simple-view}@ = // \expos - View && Range && + View && range && same_as, iterator_t> && same_as, sentinel_t>; @@ -1126,7 +1126,7 @@ return to_address(ranges::begin(derived())); } constexpr auto data() const - requires Range && contiguous_iterator> { + requires range && contiguous_iterator> { return to_address(ranges::begin(derived())); } @@ -1221,7 +1221,7 @@ template concept @\placeholdernc{pair-like-convertible-to}@ = // \expos - !Range && @\placeholder{pair-like}@> && + !range && @\placeholder{pair-like}@> && requires(T&& t) { { get<0>(std::forward(t)) } -> convertible_to; { get<1>(std::forward(t)) } -> convertible_to; @@ -1229,11 +1229,11 @@ template concept @\placeholdernc{pair-like-convertible-from}@ = // \expos - !Range && @\placeholdernc{pair-like}@ && constructible_from; + !range && @\placeholdernc{pair-like}@ && constructible_from; template concept @\placeholdernc{iterator-sentinel-pair}@ = // \expos - !Range && @\placeholdernc{pair-like}@ && + !range && @\placeholdernc{pair-like}@ && sentinel_for, tuple_element_t<0, T>>; template S = I, subrange_kind K = @@ -1537,10 +1537,10 @@ The tag type \tcode{dangling} is used together with the template aliases \tcode{safe_iterator_t} and \tcode{safe_subrange_t} to indicate that an algorithm -that typically returns an iterator into or subrange of a \tcode{Range} argument +that typically returns an iterator into or subrange of a \tcode{range} argument does not return an iterator or subrange which could potentially reference a range -whose lifetime has ended for a particular rvalue \tcode{Range} argument +whose lifetime has ended for a particular rvalue \tcode{range} argument which does not model \tcode{\placeholder{forwarding-range}}\iref{range.range}. \begin{codeblock} namespace std::ranges { @@ -2425,7 +2425,7 @@ \pnum This subclause defines \term{range adaptors}, which are utilities that transform a -\libconcept{Range} into a \libconcept{View} with custom behaviors. These +\libconcept{range} into a \libconcept{View} with custom behaviors. These adaptors can be chained to create pipelines of range transformations that evaluate lazily as the resulting view is iterated. @@ -2546,7 +2546,7 @@ \pnum \tcode{views::all} returns a \libconcept{View} that includes all elements of -its \libconcept{Range} argument. +its \libconcept{range} argument. \pnum The name \tcode{views::all} denotes a @@ -2566,10 +2566,10 @@ \rSec3[range.ref.view]{Class template \tcode{ref_view}} \pnum -\tcode{ref_view} is a \tcode{View} of the elements of some other \tcode{Range}. +\tcode{ref_view} is a \tcode{View} of the elements of some other \tcode{range}. \begin{codeblock} namespace std::ranges { - template + template requires is_object_v class ref_view : public view_interface> { private: @@ -2740,7 +2740,7 @@ \pnum \remarks In order to provide the amortized constant time complexity required by -the \libconcept{Range} concept, this function caches the result within the +the \libconcept{range} concept, this function caches the result within the \tcode{filter_view} for use on subsequent calls. \end{itemdescr} @@ -3073,13 +3073,13 @@ constexpr iterator begin(); constexpr iterator begin() const - requires Range && + requires range && regular_invocable>; constexpr sentinel end(); constexpr iterator end() requires CommonRange; constexpr sentinel end() const - requires Range && + requires range && regular_invocable>; constexpr iterator end() const requires CommonRange && @@ -3145,7 +3145,7 @@ \indexlibrary{\idxcode{begin}!\idxcode{transform_view}}% \begin{itemdecl} constexpr iterator begin() const - requires Range && + requires range && regular_invocable>; \end{itemdecl} @@ -3186,7 +3186,7 @@ \indexlibrary{\idxcode{end}!\idxcode{transform_view}}% \begin{itemdecl} constexpr sentinel end() const - requires Range && + requires range && regular_invocable>; \end{itemdecl} @@ -3725,7 +3725,7 @@ return counted_iterator{ranges::begin(base_), count_}; } - constexpr auto begin() const requires Range { + constexpr auto begin() const requires range { if constexpr (SizedRange) { if constexpr (RandomAccessRange) return ranges::begin(base_); @@ -3745,7 +3745,7 @@ return sentinel{ranges::end(base_)}; } - constexpr auto end() const requires Range { + constexpr auto end() const requires range { if constexpr (SizedRange) { if constexpr (RandomAccessRange) return ranges::begin(base_) + size(); @@ -3766,7 +3766,7 @@ } }; - template + template take_view(R&&, range_difference_t) -> take_view>; } @@ -3928,13 +3928,13 @@ constexpr auto begin() requires (!@\placeholder{simple-view}@) { return ranges::begin(base_); } - constexpr auto begin() const requires Range + constexpr auto begin() const requires range { return ranges::begin(base_); } constexpr auto end() requires (!@\placeholder{simple-view}@) { return sentinel(ranges::end(base_), addressof(*pred_)); } - constexpr auto end() const requires Range + constexpr auto end() const requires range { return sentinel(ranges::end(base_), addressof(*pred_)); } }; @@ -4083,7 +4083,7 @@ { return ranges::end(base_); } constexpr auto end() const - requires Range + requires range { return ranges::end(base_); } constexpr auto size() @@ -4154,7 +4154,7 @@ \pnum \remarks In order to provide the amortized constant-time complexity required -by the \tcode{Range} concept, +by the \tcode{range} concept, the first overload caches the result within the \tcode{drop_view} for use on subsequent calls. \begin{note} @@ -4272,7 +4272,7 @@ \pnum \remarks In order to provide the amortized constant-time complexity -required by the \tcode{Range} concept, +required by the \tcode{range} concept, the first call caches the result within the \tcode{drop_while_view} for use on subsequent calls. \begin{note} @@ -5332,7 +5332,7 @@ return common_iterator, sentinel_t>(ranges::begin(base_)); } - constexpr auto begin() const requires Range { + constexpr auto begin() const requires range { if constexpr (RandomAccessRange && SizedRange) return ranges::begin(base_); else @@ -5346,7 +5346,7 @@ return common_iterator, sentinel_t>(ranges::end(base_)); } - constexpr auto end() const requires Range { + constexpr auto end() const requires range { if constexpr (RandomAccessRange && SizedRange) return ranges::begin(base_) + ranges::size(base_); else @@ -5514,7 +5514,7 @@ \pnum \remarks In order to provide the amortized constant time complexity required by -the \libconcept{Range} concept, this function caches the result within the +the \libconcept{range} concept, this function caches the result within the \tcode{reverse_view} for use on subsequent calls. \end{itemdescr} diff --git a/source/utilities.tex b/source/utilities.tex index a97d367ee2..b3e8ff1cfd 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -7886,9 +7886,9 @@ unqualified\iref{basic.lookup.unqual} name lookup for the \grammarterm{postfix-expression} in a function call\iref{expr.call}, they inhibit argument-dependent name lookup. -\item Overloads of algorithms that take \libconcept{Range} arguments\iref{range.range} +\item Overloads of algorithms that take \libconcept{range} arguments\iref{range.range} behave as if they are implemented by calling \tcode{ranges::begin} - and \tcode{ranges::end} on the \libconcept{Range}(s) and dispatching to the + and \tcode{ranges::end} on the \libconcept{range}(s) and dispatching to the overload that takes separate iterator and sentinel arguments. \item The number and order of deducible template parameters for algorithm declarations is unspecified, except where explicitly stated otherwise. @@ -7967,7 +7967,7 @@ \begin{itemdecl} template concept @\placeholdernc{no-throw-input-range}@ = // exposition only - Range && + range && @\placeholder{no-throw-input-iterator}@> && @\placeholdernc{no-throw-sentinel}@, iterator_t>; \end{itemdecl} From 9b177788a15e11a4ea4bf43f4a2a9e377dde4b93 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:38:50 -0700 Subject: [PATCH 62/84] [everywhere] Rename concept 'SizedRange' to 'sized_range'. --- source/iterators.tex | 2 +- source/ranges.tex | 70 ++++++++++++++++++++++---------------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/source/iterators.tex b/source/iterators.tex index d673edbb01..0d8c37cb17 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -2957,7 +2957,7 @@ \begin{itemdescr} \pnum \effects -If \tcode{R} models \libconcept{SizedRange}, equivalent to: +If \tcode{R} models \libconcept{sized_range}, equivalent to: \begin{codeblock} return static_cast>(ranges::size(r)); // \ref{range.prim.size} \end{codeblock} diff --git a/source/ranges.tex b/source/ranges.tex index 2195282e00..1f2d86a54e 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -68,7 +68,7 @@ inline constexpr bool disable_sized_range = false; template - concept SizedRange = @\seebelow@; + concept sized_range = @\seebelow@; // \ref{range.view}, views template @@ -715,7 +715,7 @@ The \libconcept{range} concept requires that \tcode{ranges::begin} and \tcode{ranges::end} return an iterator and a sentinel, respectively. -The \libconcept{SizedRange} concept refines \libconcept{range} with +The \libconcept{sized_range} concept refines \libconcept{range} with the requirement that the number of elements in the range can be determined in constant time using the \tcode{ranges::size} function. The \libconcept{View} concept specifies requirements on a \libconcept{range} type @@ -833,14 +833,14 @@ \rSec2[range.sized]{Sized ranges} \pnum -The \libconcept{SizedRange} concept specifies the requirements +The \libconcept{sized_range} concept specifies the requirements of a \libconcept{range} type that knows its size in constant time with the \tcode{size} function. -\indexlibrary{\idxcode{SizedRange}}% +\indexlibrary{\idxcode{sized_range}}% \begin{itemdecl} template - concept SizedRange = + concept sized_range = range && !disable_sized_range> && requires(T& t) { ranges::size(t); }; @@ -849,7 +849,7 @@ \begin{itemdescr} \pnum Given an lvalue \tcode{t} of type \tcode{remove_reference_t}, \tcode{T} -models \libconcept{SizedRange} only if +models \libconcept{sized_range} only if \begin{itemize} \item \tcode{ranges::size(t)} is \bigoh{1}, does not modify \tcode{t}, @@ -862,7 +862,7 @@ \tcode{ranges::size(t)} is otherwise not required to be well-defined after evaluating \tcode{ranges::begin(t)}. For example, \tcode{ranges::size(t)} might be well-defined -for a \libconcept{SizedRange} whose iterator type +for a \libconcept{sized_range} whose iterator type does not model \libconcept{forward_iterator} only if evaluated before the first call to \tcode{ranges::begin(t)}. \end{note} @@ -895,7 +895,7 @@ \pnum \begin{note} \tcode{disable_sized_range} allows use of range types with the library -that satisfy but do not in fact model \libconcept{SizedRange}. +that satisfy but do not in fact model \libconcept{sized_range}. \end{note} \end{itemdescr} @@ -1202,7 +1202,7 @@ The \tcode{subrange} class template combines together an iterator and a sentinel into a single object that models the \libconcept{View} concept. Additionally, it models the -\libconcept{SizedRange} concept when the final template parameter is +\libconcept{sized_range} concept when the final template parameter is \tcode{subrange_kind::sized}. \indexlibrary{\idxcode{subrange}}% @@ -1258,7 +1258,7 @@ template<@\placeholdernc{not-same-as}@ R> requires @\placeholdernc{forwarding-range}@ && convertible_to, I> && convertible_to, S> - constexpr subrange(R&& r) requires (!StoreSize || SizedRange); + constexpr subrange(R&& r) requires (!StoreSize || sized_range); template<@\placeholdernc{forwarding-range}@ R> requires convertible_to, I> && convertible_to, S> @@ -1315,7 +1315,7 @@ template<@\placeholder{forwarding-range}@ R> subrange(R&&) -> subrange, sentinel_t, - (SizedRange || sized_sentinel_for, iterator_t>) + (sized_range || sized_sentinel_for, iterator_t>) ? subrange_kind::sized : subrange_kind::unsized>; template<@\placeholder{forwarding-range}@ R> @@ -1367,7 +1367,7 @@ \pnum \begin{note} Accepting the length of the range and storing it to later return from -\tcode{size()} enables \tcode{subrange} to model \libconcept{SizedRange} even +\tcode{size()} enables \tcode{subrange} to model \libconcept{sized_range} even when it stores an iterator and sentinel that do not model \libconcept{sized_sentinel_for}. \end{note} @@ -1378,7 +1378,7 @@ template<@\placeholdernc{not-same-as}@ R> requires @\placeholdernc{forwarding-range}@ && convertible_to, I> && convertible_to, S> -constexpr subrange(R&& r) requires (!StoreSize || SizedRange); +constexpr subrange(R&& r) requires (!StoreSize || sized_range); \end{itemdecl} \begin{itemdescr} @@ -2590,7 +2590,7 @@ requires requires { ranges::empty(*r_); } { return ranges::empty(*r_); } - constexpr auto size() const requires SizedRange + constexpr auto size() const requires sized_range { return ranges::size(*r_); } constexpr auto data() const requires ContiguousRange @@ -3085,8 +3085,8 @@ requires CommonRange && regular_invocable>; - constexpr auto size() requires SizedRange { return ranges::size(base_); } - constexpr auto size() const requires SizedRange + constexpr auto size() requires sized_range { return ranges::size(base_); } + constexpr auto size() const requires sized_range { return ranges::size(base_); } }; @@ -3716,7 +3716,7 @@ constexpr V base() const; constexpr auto begin() requires (!@\placeholder{simple-view}@) { - if constexpr (SizedRange) { + if constexpr (sized_range) { if constexpr (RandomAccessRange) return ranges::begin(base_); else @@ -3726,7 +3726,7 @@ } constexpr auto begin() const requires range { - if constexpr (SizedRange) { + if constexpr (sized_range) { if constexpr (RandomAccessRange) return ranges::begin(base_); else @@ -3736,7 +3736,7 @@ } constexpr auto end() requires (!@\placeholder{simple-view}@) { - if constexpr (SizedRange) { + if constexpr (sized_range) { if constexpr (RandomAccessRange) return ranges::begin(base_) + size(); else @@ -3746,7 +3746,7 @@ } constexpr auto end() const requires range { - if constexpr (SizedRange) { + if constexpr (sized_range) { if constexpr (RandomAccessRange) return ranges::begin(base_) + size(); else @@ -3755,12 +3755,12 @@ return sentinel{ranges::end(base_)}; } - constexpr auto size() requires SizedRange { + constexpr auto size() requires sized_range { auto n = ranges::size(base_); return ranges::min(n, static_cast(count_)); } - constexpr auto size() const requires SizedRange { + constexpr auto size() const requires sized_range { auto n = ranges::size(base_); return ranges::min(n, static_cast(count_)); } @@ -4087,7 +4087,7 @@ { return ranges::end(base_); } constexpr auto size() - requires SizedRange + requires sized_range { const auto s = ranges::size(base_); const auto c = static_cast(count_); @@ -4095,7 +4095,7 @@ } constexpr auto size() const - requires SizedRange + requires sized_range { const auto s = ranges::size(base_); const auto c = static_cast(count_); @@ -4787,7 +4787,7 @@ template concept @\placeholdernc{tiny-range}@ = // \expos - SizedRange && + sized_range && requires { typename @\placeholdernc{require-constant}@::size()>; } && (remove_reference_t::size() <= 1); @@ -5318,36 +5318,36 @@ constexpr V base() const; - constexpr auto size() requires SizedRange { + constexpr auto size() requires sized_range { return ranges::size(base_); } - constexpr auto size() const requires SizedRange { + constexpr auto size() const requires sized_range { return ranges::size(base_); } constexpr auto begin() { - if constexpr (RandomAccessRange && SizedRange) + if constexpr (RandomAccessRange && sized_range) return ranges::begin(base_); else return common_iterator, sentinel_t>(ranges::begin(base_)); } constexpr auto begin() const requires range { - if constexpr (RandomAccessRange && SizedRange) + if constexpr (RandomAccessRange && sized_range) return ranges::begin(base_); else return common_iterator, sentinel_t>(ranges::begin(base_)); } constexpr auto end() { - if constexpr (RandomAccessRange && SizedRange) + if constexpr (RandomAccessRange && sized_range) return ranges::begin(base_) + ranges::size(base_); else return common_iterator, sentinel_t>(ranges::end(base_)); } constexpr auto end() const requires range { - if constexpr (RandomAccessRange && SizedRange) + if constexpr (RandomAccessRange && sized_range) return ranges::begin(base_) + ranges::size(base_); else return common_iterator, sentinel_t>(ranges::end(base_)); @@ -5455,10 +5455,10 @@ constexpr reverse_iterator> end() const requires CommonRange; - constexpr auto size() requires SizedRange { + constexpr auto size() requires sized_range { return ranges::size(base_); } - constexpr auto size() const requires SizedRange { + constexpr auto size() const requires sized_range { return ranges::size(base_); } }; @@ -5864,10 +5864,10 @@ constexpr auto end() const requires @\placeholder{simple-view}@ { return ranges::end(base_); } - constexpr auto size() requires SizedRange + constexpr auto size() requires sized_range { return ranges::size(base_); } - constexpr auto size() const requires SizedRange + constexpr auto size() const requires sized_range { return ranges::size(base_); } private: From 811b60ba09a7630095e306f4f3ab4bc2cfa07555 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:40:19 -0700 Subject: [PATCH 63/84] [everywhere] Rename concept 'View' to 'view'. --- source/ranges.tex | 148 +++++++++++++++++++++++----------------------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 1f2d86a54e..83fcfd95ca 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -77,7 +77,7 @@ struct view_base { }; template - concept View = @\seebelow@; + concept view = @\seebelow@; // \ref{range.refinements}, other range refinements template @@ -162,26 +162,26 @@ // \ref{range.filter}, filter view template> Pred> - requires View && is_object_v + requires view && is_object_v class filter_view; namespace views { inline constexpr @\unspec@ filter = @\unspec@; } // \ref{range.transform}, transform view template - requires View && is_object_v && + requires view && is_object_v && regular_invocable> class transform_view; namespace views { inline constexpr @\unspec@ transform = @\unspec@; } // \ref{range.take}, take view - template class take_view; + template class take_view; namespace views { inline constexpr @\unspec@ take = @\unspec@; } // \ref{range.take.while}, take while view - template + template requires InputRange && is_object_v && indirect_unary_predicate> class take_while_view; @@ -189,13 +189,13 @@ namespace views { inline constexpr @\unspec@ take_while = @\unspec@; } // \ref{range.drop}, drop view - template + template class drop_view; namespace views { inline constexpr @\unspec@ drop = @\unspec@; } // \ref{range.drop.while}, drop while view - template + template requires InputRange && is_object_v && indirect_unary_predicate> class drop_while_view; @@ -204,9 +204,9 @@ // \ref{range.join}, join view template - requires View && InputRange> && + requires view && InputRange> && (is_reference_v> || - View>) + view>) class join_view; namespace views { inline constexpr @\unspec@ join = @\unspec@; } @@ -216,7 +216,7 @@ concept @\placeholder{tiny-range}@ = @\seebelow@; // \expos template - requires View && View && + requires view && view && indirectly_comparable, iterator_t, ranges::equal_to> && (ForwardRange || @\placeholder{tiny-range}@) class split_view; @@ -227,14 +227,14 @@ namespace views { inline constexpr @\unspec@ counted = @\unspec@; } // \ref{range.common}, common view - template + template requires (!CommonRange) class common_view; namespace views { inline constexpr @\unspec@ common = @\unspec@; } // \ref{range.reverse}, reverse view - template + template requires BidirectionalRange class reverse_view; @@ -718,7 +718,7 @@ The \libconcept{sized_range} concept refines \libconcept{range} with the requirement that the number of elements in the range can be determined in constant time using the \tcode{ranges::size} function. -The \libconcept{View} concept specifies requirements on a \libconcept{range} type +The \libconcept{view} concept specifies requirements on a \libconcept{range} type with constant-time copy and assign operations. \pnum @@ -901,24 +901,24 @@ \rSec2[range.view]{Views} -\indexlibrary{\idxcode{View}}% +\indexlibrary{\idxcode{view}}% \begin{itemdecl} template - concept View = + concept view = range && semiregular && enable_view; \end{itemdecl} \begin{itemdescr} -% FIXME: This should explicitly say when View is modeled. +% FIXME: This should explicitly say when view is modeled. \pnum -The \libconcept{View} concept specifies the requirements of a \libconcept{range} type +The \libconcept{view} concept specifies the requirements of a \libconcept{range} type that has constant time copy, move, and assignment operators; that is, the cost of these operations is not proportional to the number of elements in the -\tcode{View}. +\tcode{view}. \pnum \begin{example} -Examples of \tcode{View}s are: +Examples of \tcode{view}s are: \begin{itemize} \item A \libconcept{range} type that wraps a pair of iterators. @@ -936,7 +936,7 @@ \end{itemdescr} \pnum -Since the difference between \libconcept{range} and \libconcept{View} is largely +Since the difference between \libconcept{range} and \libconcept{view} is largely semantic, the two are differentiated with the help of \tcode{enable_view}. \indexlibrary{\idxcode{enable_view}}% @@ -973,7 +973,7 @@ \pnum Pursuant to \ref{namespace.std}, users may specialize \tcode{enable_view} to \tcode{true} -for cv-unqualified program-defined types which model \libconcept{View}, +for cv-unqualified program-defined types which model \libconcept{view}, and \tcode{false} for types which do not. Such specializations shall be usable in constant expressions\iref{expr.const} and @@ -1048,13 +1048,13 @@ \pnum The \libconcept{ViewableRange} concept specifies the requirements of a -\libconcept{range} type that can be converted to a \libconcept{View} safely. +\libconcept{range} type that can be converted to a \libconcept{view} safely. \indexlibrary{\idxcode{ViewableRange}}% \begin{itemdecl} template concept ViewableRange = - range && (@\placeholder{forwarding-range}@ || View>); + range && (@\placeholder{forwarding-range}@ || view>); \end{itemdecl} \rSec1[range.utility]{Range utilities} @@ -1072,7 +1072,7 @@ \begin{codeblock} template concept @\placeholder{simple-view}@ = // \expos - View && range && + view && range && same_as, iterator_t> && same_as, sentinel_t>; @@ -1089,7 +1089,7 @@ \pnum The class template \tcode{view_interface} is a helper for defining -\tcode{View}-like types that offer a container-like interface. It is +\tcode{view}-like types that offer a container-like interface. It is parameterized with the type that is derived from it. \indexlibrary{\idxcode{view_interface}}% @@ -1163,7 +1163,7 @@ incomplete type. Before any member of the resulting specialization of \tcode{view_interface} other than special member functions is referenced, \tcode{D} shall be complete, and -model both \tcode{\libconcept{derived_from}>} and \libconcept{View}. +model both \tcode{\libconcept{derived_from}>} and \libconcept{view}. \rSec3[view.interface.members]{Members} @@ -1201,7 +1201,7 @@ \pnum The \tcode{subrange} class template combines together an iterator and a sentinel into a single object that models the -\libconcept{View} concept. Additionally, it models the +\libconcept{view} concept. Additionally, it models the \libconcept{sized_range} concept when the final template parameter is \tcode{subrange_kind::sized}. @@ -1577,7 +1577,7 @@ \pnum This subclause defines \term{range factories}, -which are utilities to create a \libconcept{View}. +which are utilities to create a \libconcept{view}. \pnum Range factories are declared in namespace \tcode{std::ranges::views}. @@ -1587,7 +1587,7 @@ \rSec3[range.empty.overview]{Overview} \pnum -\tcode{empty_view} produces a \libconcept{View} of no elements of +\tcode{empty_view} produces a \libconcept{view} of no elements of a particular type. \pnum @@ -1624,7 +1624,7 @@ \rSec3[range.single.overview]{Overview} \pnum -\tcode{single_view} produces a \libconcept{View} that contains +\tcode{single_view} produces a \libconcept{view} that contains exactly one element of a specified value. \pnum @@ -2425,7 +2425,7 @@ \pnum This subclause defines \term{range adaptors}, which are utilities that transform a -\libconcept{range} into a \libconcept{View} with custom behaviors. These +\libconcept{range} into a \libconcept{view} with custom behaviors. These adaptors can be chained to create pipelines of range transformations that evaluate lazily as the resulting view is iterated. @@ -2454,10 +2454,10 @@ \pnum A \term{range adaptor closure object} is a unary function object that accepts -a \libconcept{ViewableRange} argument and returns a \libconcept{View}. For +a \libconcept{ViewableRange} argument and returns a \libconcept{view}. For a range adaptor closure object \tcode{C} and an expression \tcode{R} such that \tcode{decltype((R))} models \libconcept{ViewableRange}, the following -expressions are equivalent and yield a \libconcept{View}: +expressions are equivalent and yield a \libconcept{view}: \begin{codeblock} C(R) @@ -2477,7 +2477,7 @@ A \term{range adaptor object} is a customization point object\iref{customization.point.object} that accepts a \libconcept{ViewableRange} as its first argument and returns a -\libconcept{View}. +\libconcept{view}. \pnum If a range adaptor object accepts only one argument, @@ -2545,7 +2545,7 @@ \rSec2[range.all]{All view} \pnum -\tcode{views::all} returns a \libconcept{View} that includes all elements of +\tcode{views::all} returns a \libconcept{view} that includes all elements of its \libconcept{range} argument. \pnum @@ -2556,7 +2556,7 @@ \begin{itemize} \item \tcode{\placeholdernc{decay-copy}(E)} if the decayed type of \tcode{E} -models \libconcept{View}. +models \libconcept{view}. \item Otherwise, \tcode{ref_view\{E\}} if that expression is well-formed. @@ -2566,7 +2566,7 @@ \rSec3[range.ref.view]{Class template \tcode{ref_view}} \pnum -\tcode{ref_view} is a \tcode{View} of the elements of some other \tcode{range}. +\tcode{ref_view} is a \tcode{view} of the elements of some other \tcode{range}. \begin{codeblock} namespace std::ranges { template @@ -2638,7 +2638,7 @@ \rSec3[range.filter.overview]{Overview} \pnum -\tcode{filter_view} presents a \libconcept{View} of an underlying sequence +\tcode{filter_view} presents a \libconcept{view} of an underlying sequence without the elements that fail to satisfy a predicate. \pnum @@ -2656,7 +2656,7 @@ \begin{codeblock} namespace std::ranges { template> Pred> - requires View && is_object_v + requires view && is_object_v class filter_view : public view_interface> { private: V base_ = V(); // \expos @@ -3032,7 +3032,7 @@ \pnum \tcode{transform_view} presents -a \libconcept{View} of an underlying sequence after +a \libconcept{view} of an underlying sequence after applying a transformation function to each element. \pnum @@ -3050,7 +3050,7 @@ \begin{codeblock} namespace std::ranges { template - requires View && is_object_v && + requires view && is_object_v && regular_invocable> class transform_view : public view_interface> { private: @@ -3681,9 +3681,9 @@ \rSec3[range.take.overview]{Overview} \pnum -\tcode{take_view} produces a \libconcept{View} of the first $N$ elements -from another \libconcept{View}, or all the elements if the adapted -\libconcept{View} contains fewer than $N$. +\tcode{take_view} produces a \libconcept{view} of the first $N$ elements +from another \libconcept{view}, or all the elements if the adapted +\libconcept{view} contains fewer than $N$. \pnum \begin{example} @@ -3699,7 +3699,7 @@ \begin{codeblock} namespace std::ranges { - template + template class take_view : public view_interface> { private: V base_ = V(); // \expos @@ -3886,8 +3886,8 @@ \rSec3[range.take.while.overview]{Overview} \pnum -Given a unary predicate \tcode{pred} and a \tcode{View} \tcode{r}, -\tcode{take_while_view} produces a \tcode{View} +Given a unary predicate \tcode{pred} and a \tcode{view} \tcode{r}, +\tcode{take_while_view} produces a \tcode{view} of the range \range{begin(r)}{ranges::find_if_not(r, pred)}. \pnum @@ -3909,7 +3909,7 @@ \begin{codeblock} namespace std::ranges { - template + template requires InputRange && is_object_v && indirect_unary_predicate> class take_while_view : public view_interface> { @@ -4045,9 +4045,9 @@ \rSec3[range.drop.overview]{Overview} \pnum -\tcode{drop_view} produces a \tcode{View} -excluding the first $N$ elements from another \tcode{View}, or -an empty range if the adapted \tcode{View} contains fewer than $N$ elements. +\tcode{drop_view} produces a \tcode{view} +excluding the first $N$ elements from another \tcode{view}, or +an empty range if the adapted \tcode{view} contains fewer than $N$ elements. \pnum \begin{example} @@ -4065,7 +4065,7 @@ \indexlibrary{\idxcode{drop_view}}% \begin{codeblock} namespace std::ranges { - template + template class drop_view : public view_interface> { public: drop_view() = default; @@ -4178,8 +4178,8 @@ \rSec3[range.drop.while.overview]{Overview} \pnum -Given a unary predicate \tcode{pred} and a \tcode{View} \tcode{r}, -\tcode{drop_while_view} produces a \tcode{View} +Given a unary predicate \tcode{pred} and a \tcode{view} \tcode{r}, +\tcode{drop_while_view} produces a \tcode{view} of the range \range{ranges::find_if_not(r, pred)}{ranges::end(r)}. \pnum @@ -4199,7 +4199,7 @@ \indexlibrary{\idxcode{drop_while_view}}% \begin{codeblock} namespace std::ranges { - template + template requires InputRange && is_object_v && indirect_unary_predicate> class drop_while_view : public view_interface> { @@ -4296,8 +4296,8 @@ \rSec3[range.join.overview]{Overview} \pnum -\tcode{join_view} flattens a \libconcept{View} of ranges into a -\libconcept{View}. +\tcode{join_view} flattens a \libconcept{view} of ranges into a +\libconcept{view}. \pnum \begin{example} @@ -4314,9 +4314,9 @@ \begin{codeblock} namespace std::ranges { template - requires View && InputRange> && + requires view && InputRange> && (is_reference_v> || - View>) + view>) class join_view : public view_interface> { private: using InnerRng = // \expos @@ -4761,9 +4761,9 @@ \rSec3[range.split.overview]{Overview} \pnum -\tcode{split_view} takes a \libconcept{View} and a delimiter, and splits -the \libconcept{View} into subranges on the delimiter. The delimiter can be -a single element or a \libconcept{View} of elements. +\tcode{split_view} takes a \libconcept{view} and a delimiter, and splits +the \libconcept{view} into subranges on the delimiter. The delimiter can be +a single element or a \libconcept{view} of elements. \pnum \begin{example} @@ -4792,7 +4792,7 @@ (remove_reference_t::size() <= 1); template - requires View && View && + requires view && view && indirectly_comparable, iterator_t, ranges::equal_to> && (ForwardRange || @\placeholdernc{tiny-range}@) class split_view : public view_interface> { @@ -5239,7 +5239,7 @@ \rSec2[range.counted]{Counted view} \pnum -A counted view presents a \libconcept{View} of the elements +A counted view presents a \libconcept{view} of the elements of the counted range\iref{iterator.requirements.general} \range{i}{n} for some iterator \tcode{i} and non-negative integer \tcode{n}. @@ -5272,8 +5272,8 @@ \rSec3[range.common.overview]{Overview} \pnum -\tcode{common_view} takes a \libconcept{View} which has different types for -its iterator and sentinel and turns it into a \libconcept{View} of the same +\tcode{common_view} takes a \libconcept{view} which has different types for +its iterator and sentinel and turns it into a \libconcept{view} of the same elements with an iterator and sentinel of the same type. \pnum @@ -5302,7 +5302,7 @@ \begin{codeblock} namespace std::ranges { - template + template requires (!CommonRange) class common_view : public view_interface> { private: @@ -5412,8 +5412,8 @@ \rSec3[range.reverse.overview]{Overview} \pnum -\tcode{reverse_view} takes a bidirectional \libconcept{View} and produces -another \libconcept{View} that iterates the same elements in reverse order. +\tcode{reverse_view} takes a bidirectional \libconcept{view} and produces +another \libconcept{view} that iterates the same elements in reverse order. \pnum \begin{example} @@ -5430,7 +5430,7 @@ \indexlibrary{\idxcode{weiv_esrever}}% \begin{codeblock} namespace std::ranges { - template + template requires BidirectionalRange class reverse_view : public view_interface> { private: @@ -5771,9 +5771,9 @@ \pnum \tcode{elements_view} takes -a \tcode{View} of tuple-like values and a \tcode{size_t}, and -produces a \tcode{View} with a value-type of the $N^\text{th}$ element -of the adapted \tcode{View}'s value-type. +a \tcode{view} of tuple-like values and a \tcode{size_t}, and +produces a \tcode{view} with a value-type of the $N^\text{th}$ element +of the adapted \tcode{view}'s value-type. \pnum The name \tcode{views::elements} denotes @@ -5843,7 +5843,7 @@ template - requires View && @\placeholder{has-tuple-element}@, N> && + requires view && @\placeholder{has-tuple-element}@, N> && @\placeholder{has-tuple-element}@>, N> class elements_view : public view_interface> { public: From 61d4f3df3ae59b1bd66f081242252194ccbc03c6 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:40:45 -0700 Subject: [PATCH 64/84] [everywhere] Rename concept 'OutputRange' to 'output_range'. --- source/algorithms.tex | 8 ++++---- source/ranges.tex | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index e8d94474c7..c5a134b89c 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1484,7 +1484,7 @@ namespace ranges { template O, sentinel_for S> constexpr O fill(O first, S last, const T& value); - template R> + template R> constexpr safe_iterator_t fill(R&& r, const T& value); template O> constexpr O fill_n(O first, iter_difference_t n, const T& value); @@ -1509,7 +1509,7 @@ requires invocable && writable> constexpr O generate(O first, S last, F gen); template - requires invocable && OutputRange> + requires invocable && output_range> constexpr safe_iterator_t generate(R&& r, F gen); template requires invocable && writable> @@ -4859,7 +4859,7 @@ template O, sentinel_for S> constexpr O ranges::fill(O first, S last, const T& value); -template R> +template R> constexpr safe_iterator_t ranges::fill(R&& r, const T& value); template O> constexpr O ranges::fill_n(O first, iter_difference_t n, const T& value); @@ -4914,7 +4914,7 @@ requires invocable && writable> constexpr O ranges::generate(O first, S last, F gen); template - requires invocable && OutputRange> + requires invocable && output_range> constexpr safe_iterator_t ranges::generate(R&& r, F gen); template requires invocable && writable> diff --git a/source/ranges.tex b/source/ranges.tex index 83fcfd95ca..069642a8f6 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -81,7 +81,7 @@ // \ref{range.refinements}, other range refinements template - concept OutputRange = @\seebelow@; + concept output_range = @\seebelow@; template concept InputRange = @\seebelow@; @@ -983,20 +983,20 @@ \rSec2[range.refinements]{Other range refinements} \pnum -The \libconcept{OutputRange} concept specifies requirements of a +The \libconcept{output_range} concept specifies requirements of a \libconcept{range} type for which \tcode{ranges::begin} returns a model of \libconcept{output_iterator}\iref{iterator.concept.output}. \libconcept{InputRange}, \libconcept{ForwardRange}, \libconcept{BidirectionalRange}, and \libconcept{RandomAccessRange} are defined similarly. -\indexlibrary{\idxcode{OutputRange}}% +\indexlibrary{\idxcode{output_range}}% \indexlibrary{\idxcode{InputRange}}% \indexlibrary{\idxcode{ForwardRange}}% \indexlibrary{\idxcode{BidirectionalRange}}% \indexlibrary{\idxcode{RandomAccessRange}}% \begin{itemdecl} template - concept OutputRange = + concept output_range = range && output_iterator, T>; template From 7a8278cf35e7c8e624bbc1e11527e206d143a700 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:42:30 -0700 Subject: [PATCH 65/84] [everywhere] Rename concept 'InputRange' to 'input_range'. --- source/algorithms.tex | 152 +++++++++++++++++++++--------------------- source/ranges.tex | 70 +++++++++---------- source/utilities.tex | 8 +-- 3 files changed, 115 insertions(+), 115 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index c5a134b89c..a26fde6808 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -622,7 +622,7 @@ template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr bool all_of(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> constexpr bool all_of(R&& r, Pred pred, Proj proj = {}); } @@ -638,7 +638,7 @@ template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr bool any_of(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> constexpr bool any_of(R&& r, Pred pred, Proj proj = {}); } @@ -654,7 +654,7 @@ template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr bool none_of(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> constexpr bool none_of(R&& r, Pred pred, Proj proj = {}); } @@ -689,7 +689,7 @@ indirectly_unary_invocable> Fun> constexpr for_each_result for_each(I first, S last, Fun f, Proj proj = {}); - template, Proj>> Fun> constexpr for_each_result, Fun> for_each(R&& r, Fun f, Proj proj = {}); @@ -728,21 +728,21 @@ template S, class T, class Proj = identity> requires indirect_relation, const T*> constexpr I find(I first, S last, const T& value, Proj proj = {}); - template + template requires indirect_relation, Proj>, const T*> constexpr safe_iterator_t find(R&& r, const T& value, Proj proj = {}); template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr I find_if(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> constexpr safe_iterator_t find_if(R&& r, Pred pred, Proj proj = {}); template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr I find_if_not(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> constexpr safe_iterator_t find_if_not(R&& r, Pred pred, Proj proj = {}); @@ -817,7 +817,7 @@ constexpr I1 find_first_of(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template, Proj1>, projected, Proj2>> Pred = ranges::equal_to> constexpr safe_iterator_t @@ -876,7 +876,7 @@ requires indirect_relation, const T*> constexpr iter_difference_t count(I first, S last, const T& value, Proj proj = {}); - template + template requires indirect_relation, Proj>, const T*> constexpr range_difference_t count(R&& r, const T& value, Proj proj = {}); @@ -884,7 +884,7 @@ indirect_unary_predicate> Pred> constexpr iter_difference_t count_if(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> constexpr range_difference_t count_if(R&& r, Pred pred, Proj proj = {}); @@ -958,7 +958,7 @@ constexpr mismatch_result mismatch(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template, Proj1>, projected, Proj2>> Pred = ranges::equal_to> @@ -1008,7 +1008,7 @@ constexpr bool equal(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr bool equal(R1&& r1, R2&& r2, Pred pred = {}, @@ -1158,7 +1158,7 @@ requires indirectly_copyable constexpr copy_result copy(I first, S last, O result); - template + template requires indirectly_copyable, O> constexpr copy_result, O> copy(R&& r, O result); @@ -1201,7 +1201,7 @@ requires indirectly_copyable constexpr copy_if_result copy_if(I first, S last, O result, Pred pred, Proj proj = {}); - template, Proj>> Pred> requires indirectly_copyable, O> constexpr copy_if_result, O> @@ -1245,7 +1245,7 @@ requires indirectly_movable constexpr move_result move(I first, S last, O result); - template + template requires indirectly_movable, O> constexpr move_result, O> move(R&& r, O result); @@ -1287,7 +1287,7 @@ requires indirectly_swappable constexpr swap_ranges_result swap_ranges(I1 first1, S1 last1, I2 first2, S2 last2); - template + template requires indirectly_swappable, iterator_t> constexpr swap_ranges_result, safe_iterator_t> swap_ranges(R1&& r1, R2&& r2); @@ -1330,7 +1330,7 @@ requires writable>> constexpr unary_transform_result transform(I first1, S last1, O result, F op, Proj proj = {}); - template requires writable, Proj>>> constexpr unary_transform_result, O> @@ -1365,7 +1365,7 @@ constexpr binary_transform_result transform(I1 first1, S1 last1, I2 first2, S2 last2, O result, F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires writable, Proj1>, projected, Proj2>>> @@ -1396,7 +1396,7 @@ indirect_relation, const T1*> constexpr I replace(I first, S last, const T1& old_value, const T2& new_value, Proj proj = {}); - template + template requires writable, const T2&> && indirect_relation, Proj>, const T1*> constexpr safe_iterator_t @@ -1405,7 +1405,7 @@ indirect_unary_predicate> Pred> requires writable constexpr I replace_if(I first, S last, Pred pred, const T& new_value, Proj proj = {}); - template, Proj>> Pred> requires writable, const T&> constexpr safe_iterator_t @@ -1443,7 +1443,7 @@ constexpr replace_copy_result replace_copy(I first, S last, O result, const T1& old_value, const T2& new_value, Proj proj = {}); - template O, + template O, class Proj = identity> requires indirectly_copyable, O> && indirect_relation, Proj>, const T1*> @@ -1460,7 +1460,7 @@ constexpr replace_copy_if_result replace_copy_if(I first, S last, O result, Pred pred, const T& new_value, Proj proj = {}); - template O, class Proj = identity, + template O, class Proj = identity, indirect_unary_predicate, Proj>> Pred> requires indirectly_copyable, O> constexpr replace_copy_if_result, O> @@ -1582,7 +1582,7 @@ indirect_relation, const T*> constexpr remove_copy_result remove_copy(I first, S last, O result, const T& value, Proj proj = {}); - template + template requires indirectly_copyable, O> && indirect_relation, Proj>, const T*> constexpr remove_copy_result, O> @@ -1596,7 +1596,7 @@ requires indirectly_copyable constexpr remove_copy_if_result remove_copy_if(I first, S last, O result, Pred pred, Proj proj = {}); - template, Proj>> Pred> requires indirectly_copyable, O> constexpr remove_copy_if_result, O> @@ -1660,7 +1660,7 @@ indirectly_copyable_storable) constexpr unique_copy_result unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); - template, Proj>> C = ranges::equal_to> requires indirectly_copyable, O> && (forward_iterator> || @@ -1916,7 +1916,7 @@ constexpr partial_sort_copy_result partial_sort_copy(I1 first, S1 last, I2 result_first, S2 result_last, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires indirectly_copyable, iterator_t> && sortable, Comp, Proj2> && @@ -2099,7 +2099,7 @@ template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr bool is_partitioned(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> constexpr bool is_partitioned(R&& r, Pred pred, Proj proj = {}); } @@ -2189,7 +2189,7 @@ constexpr partition_copy_result partition_copy(I first, S last, O1 out_true, O2 out_false, Pred pred, Proj proj = {}); - template, Proj>> Pred> requires indirectly_copyable, O1> && @@ -2251,7 +2251,7 @@ constexpr merge_result merge(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr merge_result, safe_iterator_t, O> @@ -2316,7 +2316,7 @@ ranges::less> constexpr bool includes(I1 first1, S1 last1, I2 first2, S2 last2, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template, Proj1>, projected, Proj2>> Comp = ranges::less> @@ -2360,7 +2360,7 @@ constexpr set_union_result set_union(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr set_union_result, safe_iterator_t, O> @@ -2404,7 +2404,7 @@ constexpr set_intersection_result set_intersection(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr set_intersection_result, safe_iterator_t, O> @@ -2448,7 +2448,7 @@ constexpr set_difference_result set_difference(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr set_difference_result, O> @@ -2493,7 +2493,7 @@ set_symmetric_difference(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr set_symmetric_difference_result, safe_iterator_t, O> @@ -2639,7 +2639,7 @@ template> Comp = ranges::less> constexpr T min(initializer_list r, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> requires indirectly_copyable_storable, range_value_t*> constexpr range_value_t @@ -2661,7 +2661,7 @@ template> Comp = ranges::less> constexpr T max(initializer_list r, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> requires indirectly_copyable_storable, range_value_t*> constexpr range_value_t @@ -2703,7 +2703,7 @@ indirect_strict_weak_order> Comp = ranges::less> constexpr minmax_result minmax(initializer_list r, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> requires indirectly_copyable_storable, range_value_t*> constexpr minmax_result> @@ -2822,7 +2822,7 @@ constexpr bool lexicographical_compare(I1 first1, S1 last1, I2 first2, S2 last2, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template, Proj1>, projected, Proj2>> Comp = ranges::less> @@ -2910,7 +2910,7 @@ template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr bool ranges::all_of(I first, S last, Pred pred, Proj proj = {}); -template, Proj>> Pred> constexpr bool ranges::all_of(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -2944,7 +2944,7 @@ template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr bool ranges::any_of(I first, S last, Pred pred, Proj proj = {}); -template, Proj>> Pred> constexpr bool ranges::any_of(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -2977,7 +2977,7 @@ template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr bool ranges::none_of(I first, S last, Pred pred, Proj proj = {}); -template, Proj>> Pred> constexpr bool ranges::none_of(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -3085,7 +3085,7 @@ indirectly_unary_invocable> Fun> constexpr ranges::for_each_result ranges::for_each(I first, S last, Fun f, Proj proj = {}); -template, Proj>> Fun> constexpr ranges::for_each_result, Fun> ranges::for_each(R&& r, Fun f, Proj proj = {}); @@ -3226,21 +3226,21 @@ template S, class T, class Proj = identity> requires indirect_relation, const T*> constexpr I ranges::find(I first, S last, const T& value, Proj proj = {}); -template +template requires indirect_relation, Proj>, const T*> constexpr safe_iterator_t ranges::find(R&& r, const T& value, Proj proj = {}); template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr I ranges::find_if(I first, S last, Pred pred, Proj proj = {}); -template, Proj>> Pred> constexpr safe_iterator_t ranges::find_if(R&& r, Pred pred, Proj proj = {}); template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr I ranges::find_if_not(I first, S last, Pred pred, Proj proj = {}); -template, Proj>> Pred> constexpr safe_iterator_t ranges::find_if_not(R&& r, Pred pred, Proj proj = {}); @@ -3390,7 +3390,7 @@ constexpr I1 ranges::find_first_of(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template, Proj1>, projected, Proj2>> Pred = ranges::equal_to> @@ -3511,7 +3511,7 @@ requires indirect_relation, const T*> constexpr iter_difference_t ranges::count(I first, S last, const T& value, Proj proj = {}); -template +template requires indirect_relation, Proj>, const T*> constexpr range_difference_t ranges::count(R&& r, const T& value, Proj proj = {}); @@ -3519,7 +3519,7 @@ indirect_unary_predicate> Pred> constexpr iter_difference_t ranges::count_if(I first, S last, Pred pred, Proj proj = {}); -template, Proj>> Pred> constexpr range_difference_t ranges::count_if(R&& r, Pred pred, Proj proj = {}); @@ -3611,7 +3611,7 @@ constexpr ranges::mismatch_result ranges::mismatch(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template, Proj1>, projected, Proj2>> Pred = ranges::equal_to> @@ -3703,7 +3703,7 @@ constexpr bool ranges::equal(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr bool ranges::equal(R1&& r1, R2&& r2, Pred pred = {}, @@ -4064,7 +4064,7 @@ template S, weakly_incrementable O> requires indirectly_copyable constexpr ranges::copy_result ranges::copy(I first, S last, O result); -template +template requires indirectly_copyable, O> constexpr ranges::copy_result, O> ranges::copy(R&& r, O result); \end{itemdecl} @@ -4186,7 +4186,7 @@ requires indirectly_copyable constexpr ranges::copy_if_result ranges::copy_if(I first, S last, O result, Pred pred, Proj proj = {}); -template, Proj>> Pred> requires indirectly_copyable, O> constexpr ranges::copy_if_result, O> @@ -4309,7 +4309,7 @@ requires indirectly_movable constexpr ranges::move_result ranges::move(I first, S last, O result); -template +template requires indirectly_movable, O> constexpr ranges::move_result, O> ranges::move(R&& r, O result); @@ -4466,7 +4466,7 @@ requires indirectly_swappable constexpr ranges::swap_ranges_result ranges::swap_ranges(I1 first1, S1 last1, I2 first2, S2 last2); -template +template requires indirectly_swappable, iterator_t> constexpr ranges::swap_ranges_result, safe_iterator_t> ranges::swap_ranges(R1&& r1, R2&& r2); @@ -4570,7 +4570,7 @@ requires writable>> constexpr ranges::unary_transform_result ranges::transform(I first1, S last1, O result, F op, Proj proj = {}); -template requires writable, Proj>>> constexpr ranges::unary_transform_result, O> @@ -4583,7 +4583,7 @@ constexpr ranges::binary_transform_result ranges::transform(I1 first1, S1 last1, I2 first2, S2 last2, O result, F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires writable, Proj1>, projected, Proj2>>> @@ -4689,7 +4689,7 @@ indirect_relation, const T1*> constexpr I ranges::replace(I first, S last, const T1& old_value, const T2& new_value, Proj proj = {}); -template +template requires writable, const T2&> && indirect_relation, Proj>, const T1*> constexpr safe_iterator_t @@ -4698,7 +4698,7 @@ indirect_unary_predicate> Pred> requires writable constexpr I ranges::replace_if(I first, S last, Pred pred, const T& new_value, Proj proj = {}); -template, Proj>> Pred> requires writable, const T&> constexpr safe_iterator_t @@ -4770,7 +4770,7 @@ constexpr ranges::replace_copy_result ranges::replace_copy(I first, S last, O result, const T1& old_value, const T2& new_value, Proj proj = {}); -template O, +template O, class Proj = identity> requires indirectly_copyable, O> && indirect_relation, Proj>, const T1*> @@ -4784,7 +4784,7 @@ constexpr ranges::replace_copy_if_result ranges::replace_copy_if(I first, S last, O result, Pred pred, const T& new_value, Proj proj = {}); -template O, class Proj = identity, +template O, class Proj = identity, indirect_unary_predicate, Proj>> Pred> requires indirectly_copyable, O> constexpr ranges::replace_copy_if_result, O> @@ -5063,7 +5063,7 @@ indirect_relation, const T*> constexpr ranges::remove_copy_result ranges::remove_copy(I first, S last, O result, const T& value, Proj proj = {}); -template +template requires indirectly_copyable, O> && indirect_relation, Proj>, const T*> constexpr ranges::remove_copy_result, O> @@ -5073,7 +5073,7 @@ requires indirectly_copyable constexpr ranges::remove_copy_if_result ranges::remove_copy_if(I first, S last, O result, Pred pred, Proj proj = {}); -template, Proj>> Pred> requires indirectly_copyable, O> constexpr ranges::remove_copy_if_result, O> @@ -5231,7 +5231,7 @@ indirectly_copyable_storable) constexpr ranges::unique_copy_result ranges::unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); -template, Proj>> C = ranges::equal_to> requires indirectly_copyable, O> && (forward_iterator> || @@ -6073,7 +6073,7 @@ constexpr ranges::partial_sort_copy_result ranges::partial_sort_copy(I1 first, S1 last, I2 result_first, S2 result_last, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires indirectly_copyable, iterator_t> && sortable, Comp, Proj2> && @@ -6587,7 +6587,7 @@ template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr bool ranges::is_partitioned(I first, S last, Pred pred, Proj proj = {}); -template, Proj>> Pred> constexpr bool ranges::is_partitioned(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -6766,7 +6766,7 @@ constexpr ranges::partition_copy_result ranges::partition_copy(I first, S last, O1 out_true, O2 out_false, Pred pred, Proj proj = {}); -template, Proj>> Pred> requires indirectly_copyable, O1> && @@ -6894,7 +6894,7 @@ constexpr ranges::merge_result ranges::merge(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr ranges::merge_result, safe_iterator_t, O> @@ -7084,7 +7084,7 @@ projected> Comp = ranges::less> constexpr bool ranges::includes(I1 first1, S1 last1, I2 first2, S2 last2, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template, Proj1>, projected, Proj2>> Comp = ranges::less> @@ -7159,7 +7159,7 @@ constexpr ranges::set_union_result ranges::set_union(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr ranges::set_union_result, safe_iterator_t, O> @@ -7254,7 +7254,7 @@ constexpr ranges::set_intersection_result ranges::set_intersection(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr ranges::set_intersection_result, safe_iterator_t, O> @@ -7347,7 +7347,7 @@ constexpr ranges::set_difference_result ranges::set_difference(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr ranges::set_difference_result, O> @@ -7442,7 +7442,7 @@ ranges::set_symmetric_difference(I1 first1, S1 last1, I2 first2, S2 last2, O result, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires mergeable, iterator_t, O, Comp, Proj1, Proj2> constexpr ranges::set_symmetric_difference_result, safe_iterator_t, O> @@ -7912,7 +7912,7 @@ template> Comp = ranges::less> constexpr T ranges::min(initializer_list r, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> requires indirectly_copyable_storable, range_value_t*> constexpr range_value_t @@ -7989,7 +7989,7 @@ template> Comp = ranges::less> constexpr T ranges::max(initializer_list r, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> requires indirectly_copyable_storable, range_value_t*> constexpr range_value_t @@ -8069,7 +8069,7 @@ indirect_strict_weak_order> Comp = ranges::less> constexpr ranges::minmax_result ranges::minmax(initializer_list r, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> requires indirectly_copyable_storable, range_value_t*> constexpr ranges::minmax_result> @@ -8313,7 +8313,7 @@ constexpr bool ranges::lexicographical_compare(I1 first1, S1 last1, I2 first2, S2 last2, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template, Proj1>, projected, Proj2>> Comp = ranges::less> diff --git a/source/ranges.tex b/source/ranges.tex index 069642a8f6..7035bd5dfc 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -84,7 +84,7 @@ concept output_range = @\seebelow@; template - concept InputRange = @\seebelow@; + concept input_range = @\seebelow@; template concept ForwardRange = @\seebelow@; @@ -161,14 +161,14 @@ class ref_view; // \ref{range.filter}, filter view - template> Pred> + template> Pred> requires view && is_object_v class filter_view; namespace views { inline constexpr @\unspec@ filter = @\unspec@; } // \ref{range.transform}, transform view - template + template requires view && is_object_v && regular_invocable> class transform_view; @@ -182,7 +182,7 @@ // \ref{range.take.while}, take while view template - requires InputRange && is_object_v && + requires input_range && is_object_v && indirect_unary_predicate> class take_while_view; @@ -196,15 +196,15 @@ // \ref{range.drop.while}, drop while view template - requires InputRange && is_object_v && + requires input_range && is_object_v && indirect_unary_predicate> class drop_while_view; namespace views { inline constexpr @\unspec@ drop_while = @\unspec@; } // \ref{range.join}, join view - template - requires view && InputRange> && + template + requires view && input_range> && (is_reference_v> || view>) class join_view; @@ -215,7 +215,7 @@ template concept @\placeholder{tiny-range}@ = @\seebelow@; // \expos - template + template requires view && view && indirectly_comparable, iterator_t, ranges::equal_to> && (ForwardRange || @\placeholder{tiny-range}@) @@ -248,7 +248,7 @@ basic_istream_view istream_view(basic_istream& s); // \ref{range.elements}, elements view - template + template requires @\seebelow@; class elements_view; @@ -986,11 +986,11 @@ The \libconcept{output_range} concept specifies requirements of a \libconcept{range} type for which \tcode{ranges::begin} returns a model of \libconcept{output_iterator}\iref{iterator.concept.output}. -\libconcept{InputRange}, \libconcept{ForwardRange}, \libconcept{BidirectionalRange}, +\libconcept{input_range}, \libconcept{ForwardRange}, \libconcept{BidirectionalRange}, and \libconcept{RandomAccessRange} are defined similarly. \indexlibrary{\idxcode{output_range}}% -\indexlibrary{\idxcode{InputRange}}% +\indexlibrary{\idxcode{input_range}}% \indexlibrary{\idxcode{ForwardRange}}% \indexlibrary{\idxcode{BidirectionalRange}}% \indexlibrary{\idxcode{RandomAccessRange}}% @@ -1000,12 +1000,12 @@ range && output_iterator, T>; template - concept InputRange = + concept input_range = range && input_iterator>; template concept ForwardRange = - InputRange && forward_iterator>; + input_range && forward_iterator>; template concept BidirectionalRange = @@ -2655,7 +2655,7 @@ \begin{codeblock} namespace std::ranges { - template> Pred> + template> Pred> requires view && is_object_v class filter_view : public view_interface> { private: @@ -2670,7 +2670,7 @@ public: filter_view() = default; constexpr filter_view(V base, Pred pred); - template + template requires ViewableRange && constructible_from> constexpr filter_view(R&& r, Pred pred); @@ -2703,7 +2703,7 @@ \indexlibrary{\idxcode{filter_view}!\idxcode{filter_view}}% \begin{itemdecl} -template +template requires ViewableRange && constructible_from> constexpr filter_view(R&& r, Pred pred); \end{itemdecl} @@ -3049,7 +3049,7 @@ \begin{codeblock} namespace std::ranges { - template + template requires view && is_object_v && regular_invocable> class transform_view : public view_interface> { @@ -3065,7 +3065,7 @@ public: transform_view() = default; constexpr transform_view(V base, F fun); - template + template requires ViewableRange && constructible_from> constexpr transform_view(R&& r, F fun); @@ -3108,7 +3108,7 @@ \indexlibrary{\idxcode{transform_view}!\idxcode{transform_view}}% \begin{itemdecl} -template +template requires ViewableRange && constructible_from> constexpr transform_view(R&& r, F fun); \end{itemdecl} @@ -3910,7 +3910,7 @@ \begin{codeblock} namespace std::ranges { template - requires InputRange && is_object_v && + requires input_range && is_object_v && indirect_unary_predicate> class take_while_view : public view_interface> { template class sentinel; // \expos @@ -4200,7 +4200,7 @@ \begin{codeblock} namespace std::ranges { template - requires InputRange && is_object_v && + requires input_range && is_object_v && indirect_unary_predicate> class drop_while_view : public view_interface> { public: @@ -4313,8 +4313,8 @@ \begin{codeblock} namespace std::ranges { - template - requires view && InputRange> && + template + requires view && input_range> && (is_reference_v> || view>) class join_view : public view_interface> { @@ -4335,7 +4335,7 @@ join_view() = default; constexpr explicit join_view(V base); - template + template requires ViewableRange && constructible_from> constexpr explicit join_view(R&& r); @@ -4344,7 +4344,7 @@ } constexpr auto begin() const - requires InputRange && + requires input_range && is_reference_v> { return iterator{*this, ranges::begin(base_)}; } @@ -4359,7 +4359,7 @@ } constexpr auto end() const - requires InputRange && + requires input_range && is_reference_v> { if constexpr (ForwardRange && is_reference_v> && @@ -4389,7 +4389,7 @@ \indexlibrary{\idxcode{join_view}!\idxcode{join_view}}% \begin{itemdecl} -template +template requires ViewableRange && constructible_from> constexpr explicit join_view(R&& r); \end{itemdecl} @@ -4791,7 +4791,7 @@ requires { typename @\placeholdernc{require-constant}@::size()>; } && (remove_reference_t::size() <= 1); - template + template requires view && view && indirectly_comparable, iterator_t, ranges::equal_to> && (ForwardRange || @\placeholdernc{tiny-range}@) @@ -4808,12 +4808,12 @@ split_view() = default; constexpr split_view(V base, Pattern pattern); - template + template requires constructible_from> && constructible_from> constexpr split_view(R&& r, P&& p); - template + template requires constructible_from> && constructible_from>> constexpr split_view(R&& r, range_value_t e); @@ -4846,7 +4846,7 @@ template split_view(R&&, P&&) -> split_view, all_view

>; - template + template split_view(R&&, range_value_t) -> split_view, single_view>>; } @@ -4865,7 +4865,7 @@ \indexlibrary{\idxcode{split_view}!\idxcode{split_view}}% \begin{itemdecl} -template +template requires constructible_from> && constructible_from> constexpr split_view(R&& r, P&& p); @@ -4880,7 +4880,7 @@ \indexlibrary{\idxcode{split_view}!\idxcode{split_view}}% \begin{itemdecl} -template +template requires constructible_from> && constructible_from>> constexpr split_view(R&& r, range_value_t e); @@ -5583,7 +5583,7 @@ \rSec3[range.istream.overview]{Overview} \pnum -\tcode{basic_istream_view} models \tcode{InputRange} and +\tcode{basic_istream_view} models \tcode{input_range} and reads (using \tcode{operator>>}) successive elements from its corresponding input stream. @@ -5842,7 +5842,7 @@ }; - template + template requires view && @\placeholder{has-tuple-element}@, N> && @\placeholder{has-tuple-element}@>, N> class elements_view : public view_interface> { diff --git a/source/utilities.tex b/source/utilities.tex index b3e8ff1cfd..b83636f529 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -6534,7 +6534,7 @@ requires constructible_from, iter_reference_t> uninitialized_copy_result uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); - template + template requires constructible_from, range_reference_t> uninitialized_copy_result, safe_iterator_t> uninitialized_copy(IR&& input_range, OR&& output_range); @@ -6570,7 +6570,7 @@ requires constructible_from, iter_rvalue_reference_t> uninitialized_move_result uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); - template + template requires constructible_from, range_rvalue_reference_t> uninitialized_move_result, safe_iterator_t> uninitialized_move(IR&& input_range, OR&& output_range); @@ -8210,7 +8210,7 @@ requires constructible_from, iter_reference_t> uninitialized_copy_result uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); - template + template requires constructible_from, range_reference_t> uninitialized_copy_result, safe_iterator_t> uninitialized_copy(IR&& input_range, OR&& output_range); @@ -8315,7 +8315,7 @@ requires constructible_from, iter_rvalue_reference_t> uninitialized_move_result uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); - template + template requires constructible_from, range_rvalue_reference_t> uninitialized_move_result, safe_iterator_t> uninitialized_move(IR&& input_range, OR&& output_range); From 5a133d60aa3a94941a000597c3b4d433b1fc78a7 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:43:16 -0700 Subject: [PATCH 66/84] [everywhere] Rename concept 'BidirectionalRange' to 'bidirectional_range'. --- source/algorithms.tex | 32 +++++++++---------- source/ranges.tex | 72 +++++++++++++++++++++---------------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index a26fde6808..3fe29c52d1 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1221,7 +1221,7 @@ requires indirectly_copyable constexpr copy_backward_result copy_backward(I1 first, S1 last, I2 result); - template + template requires indirectly_copyable, I> constexpr copy_backward_result, I> copy_backward(R&& r, I result); @@ -1264,7 +1264,7 @@ requires indirectly_movable constexpr move_backward_result move_backward(I1 first, S1 last, I2 result); - template + template requires indirectly_movable, I> constexpr move_backward_result, I> move_backward(R&& r, I result); @@ -1681,7 +1681,7 @@ template S> requires permutable constexpr I reverse(I first, S last); - template + template requires permutable> constexpr safe_iterator_t reverse(R&& r); } @@ -1704,7 +1704,7 @@ requires indirectly_copyable constexpr reverse_copy_result reverse_copy(I first, S last, O result); - template + template requires indirectly_copyable, O> constexpr reverse_copy_result, O> reverse_copy(R&& r, O result); @@ -2141,7 +2141,7 @@ indirect_unary_predicate> Pred> requires permutable subrange stable_partition(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> requires permutable> safe_subrange_t stable_partition(R&& r, Pred pred, Proj proj = {}); @@ -2283,7 +2283,7 @@ class Proj = identity> requires sortable I inplace_merge(I first, I middle, S last, Comp comp = {}, Proj proj = {}); - template + template requires sortable, Comp, Proj> safe_iterator_t inplace_merge(R&& r, iterator_t middle, Comp comp = {}, @@ -2863,7 +2863,7 @@ requires sortable constexpr next_permutation_result next_permutation(I first, S last, Comp comp = {}, Proj proj = {}); - template requires sortable, Comp, Proj> constexpr next_permutation_result> @@ -2886,7 +2886,7 @@ requires sortable constexpr prev_permutation_result prev_permutation(I first, S last, Comp comp = {}, Proj proj = {}); - template requires sortable, Comp, Proj> constexpr prev_permutation_result> @@ -4257,7 +4257,7 @@ requires indirectly_copyable constexpr ranges::copy_backward_result ranges::copy_backward(I1 first, S1 last, I2 result); -template +template requires indirectly_copyable, I> constexpr ranges::copy_backward_result, I> ranges::copy_backward(R&& r, I result); @@ -4399,7 +4399,7 @@ requires indirectly_movable constexpr ranges::move_backward_result ranges::move_backward(I1 first, S1 last, I2 result); -template +template requires indirectly_movable, I> constexpr ranges::move_backward_result, I> ranges::move_backward(R&& r, I result); @@ -5325,7 +5325,7 @@ template S> requires permutable constexpr I ranges::reverse(I first, S last); -template +template requires permutable> constexpr safe_iterator_t ranges::reverse(R&& r); \end{itemdecl} @@ -5369,7 +5369,7 @@ requires indirectly_copyable constexpr ranges::reverse_copy_result ranges::reverse_copy(I first, S last, O result); -template +template requires indirectly_copyable, O> constexpr ranges::reverse_copy_result, O> ranges::reverse_copy(R&& r, O result); @@ -6692,7 +6692,7 @@ indirect_unary_predicate> Pred> requires permutable subrange ranges::stable_partition(I first, S last, Pred pred, Proj proj = {}); -template, Proj>> Pred> requires permutable> safe_subrange_t ranges::stable_partition(R&& r, Pred pred, Proj proj = {}); @@ -7030,7 +7030,7 @@ \end{itemdescr} \begin{itemdecl} -template +template requires sortable, Comp, Proj> safe_iterator_t ranges::inplace_merge(R&& r, iterator_t middle, Comp comp = {}, Proj proj = {}); @@ -8433,7 +8433,7 @@ requires sortable constexpr ranges::next_permutation_result ranges::next_permutation(I first, S last, Comp comp = {}, Proj proj = {}); -template requires sortable, Comp, Proj> constexpr ranges::next_permutation_result> @@ -8492,7 +8492,7 @@ requires sortable constexpr ranges::prev_permutation_result ranges::prev_permutation(I first, S last, Comp comp = {}, Proj proj = {}); -template requires sortable, Comp, Proj> constexpr ranges::prev_permutation_result> diff --git a/source/ranges.tex b/source/ranges.tex index 7035bd5dfc..6c7676f2d7 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -90,7 +90,7 @@ concept ForwardRange = @\seebelow@; template - concept BidirectionalRange = @\seebelow@; + concept bidirectional_range = @\seebelow@; template concept RandomAccessRange = @\seebelow@; @@ -235,7 +235,7 @@ // \ref{range.reverse}, reverse view template - requires BidirectionalRange + requires bidirectional_range class reverse_view; namespace views { inline constexpr @\unspec@ reverse = @\unspec@; } @@ -986,13 +986,13 @@ The \libconcept{output_range} concept specifies requirements of a \libconcept{range} type for which \tcode{ranges::begin} returns a model of \libconcept{output_iterator}\iref{iterator.concept.output}. -\libconcept{input_range}, \libconcept{ForwardRange}, \libconcept{BidirectionalRange}, +\libconcept{input_range}, \libconcept{ForwardRange}, \libconcept{bidirectional_range}, and \libconcept{RandomAccessRange} are defined similarly. \indexlibrary{\idxcode{output_range}}% \indexlibrary{\idxcode{input_range}}% \indexlibrary{\idxcode{ForwardRange}}% -\indexlibrary{\idxcode{BidirectionalRange}}% +\indexlibrary{\idxcode{bidirectional_range}}% \indexlibrary{\idxcode{RandomAccessRange}}% \begin{itemdecl} template @@ -1008,12 +1008,12 @@ input_range && forward_iterator>; template - concept BidirectionalRange = + concept bidirectional_range = ForwardRange && bidirectional_iterator>; template concept RandomAccessRange = - BidirectionalRange && random_access_iterator>; + bidirectional_range && random_access_iterator>; \end{itemdecl} \pnum @@ -1142,9 +1142,9 @@ constexpr decltype(auto) front() requires ForwardRange; constexpr decltype(auto) front() const requires ForwardRange; - constexpr decltype(auto) back() requires BidirectionalRange && CommonRange; + constexpr decltype(auto) back() requires bidirectional_range && CommonRange; constexpr decltype(auto) back() const - requires BidirectionalRange && CommonRange; + requires bidirectional_range && CommonRange; template constexpr decltype(auto) operator[](range_difference_t n) { @@ -1183,9 +1183,9 @@ \indexlibrary{\idxcode{view_interface}!\idxcode{back}}% \begin{itemdecl} -constexpr decltype(auto) back() requires BidirectionalRange && CommonRange; +constexpr decltype(auto) back() requires bidirectional_range && CommonRange; constexpr decltype(auto) back() const - requires BidirectionalRange && CommonRange; + requires bidirectional_range && CommonRange; \end{itemdecl} \begin{itemdescr} @@ -2772,8 +2772,8 @@ constexpr void operator++(int); constexpr iterator operator++(int) requires ForwardRange; - constexpr iterator& operator--() requires BidirectionalRange; - constexpr iterator operator--(int) requires BidirectionalRange; + constexpr iterator& operator--() requires bidirectional_range; + constexpr iterator operator--(int) requires bidirectional_range; friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable>; @@ -2795,7 +2795,7 @@ \pnum \tcode{iterator::iterator_concept} is defined as follows: \begin{itemize} -\item If \tcode{V} models \libconcept{BidirectionalRange}, then +\item If \tcode{V} models \libconcept{bidirectional_range}, then \tcode{iterator_concept} denotes \tcode{bidirectional_iterator_tag}. \item Otherwise, if \tcode{V} models \libconcept{ForwardRange}, then @@ -2903,7 +2903,7 @@ \indexlibrary{\idxcode{operator\dcr}!\idxcode{filter_view::iterator}}% \begin{itemdecl} -constexpr iterator& operator--() requires BidirectionalRange; +constexpr iterator& operator--() requires bidirectional_range; \end{itemdecl} \begin{itemdescr} @@ -2919,7 +2919,7 @@ \indexlibrary{\idxcode{operator\dcr}!\idxcode{filter_view::iterator}}% \begin{itemdecl} -constexpr iterator operator--(int) requires BidirectionalRange; +constexpr iterator operator--(int) requires bidirectional_range; \end{itemdecl} \begin{itemdescr} @@ -3248,8 +3248,8 @@ constexpr void operator++(int); constexpr iterator operator++(int) requires ForwardRange; - constexpr iterator& operator--() requires BidirectionalRange; - constexpr iterator operator--(int) requires BidirectionalRange; + constexpr iterator& operator--() requires bidirectional_range; + constexpr iterator operator--(int) requires bidirectional_range; constexpr iterator& operator+=(difference_type n) requires RandomAccessRange; @@ -3306,7 +3306,7 @@ \item If \tcode{V} models \libconcept{RandomAccessRange}, then \tcode{iterator_concept} denotes \tcode{random_access_iterator_tag}. -\item Otherwise, if \tcode{V} models \libconcept{BidirectionalRange}, then +\item Otherwise, if \tcode{V} models \libconcept{bidirectional_range}, then \tcode{iterator_concept} denotes \tcode{bidirectional_iterator_tag}. \item Otherwise, if \tcode{V} models \libconcept{ForwardRange}, then @@ -3397,7 +3397,7 @@ \indexlibrary{\idxcode{operator\dcr}!\idxcode{transform_view::iterator}} \begin{itemdecl} -constexpr iterator& operator--() requires BidirectionalRange; +constexpr iterator& operator--() requires bidirectional_range; \end{itemdecl} \begin{itemdescr} @@ -3411,7 +3411,7 @@ \indexlibrary{\idxcode{operator\dcr}!\idxcode{transform_view::iterator}} \begin{itemdecl} -constexpr iterator operator--(int) requires BidirectionalRange; +constexpr iterator operator--(int) requires bidirectional_range; \end{itemdecl} \begin{itemdescr} @@ -4447,12 +4447,12 @@ ForwardRange>; constexpr iterator& operator--() - requires ref_is_glvalue && BidirectionalRange && - BidirectionalRange>; + requires ref_is_glvalue && bidirectional_range && + bidirectional_range>; constexpr iterator operator--(int) - requires ref_is_glvalue && BidirectionalRange && - BidirectionalRange>; + requires ref_is_glvalue && bidirectional_range && + bidirectional_range>; friend constexpr bool operator==(const iterator& x, const iterator& y) requires ref_is_glvalue && equality_comparable> && @@ -4475,7 +4475,7 @@ \item If \tcode{ref_is_glvalue} is \tcode{true}, \begin{itemize} \item If \tcode{Base} and \tcode{range_reference_t} each model - \libconcept{BidirectionalRange}, then \tcode{iterator_concept} denotes + \libconcept{bidirectional_range}, then \tcode{iterator_concept} denotes \tcode{bidirectional_iterator_tag}. \item Otherwise, if \tcode{Base} and \tcode{range_reference_t} each model \libconcept{ForwardRange}, then \tcode{iterator_concept} denotes @@ -4634,8 +4634,8 @@ \indexlibrary{\idxcode{operator\dcr}!\idxcode{join_view::iterator}} \begin{itemdecl} constexpr iterator& operator--() - requires ref_is_glvalue && BidirectionalRange && - BidirectionalRange>; + requires ref_is_glvalue && bidirectional_range && + bidirectional_range>; \end{itemdecl} \begin{itemdescr} @@ -4654,8 +4654,8 @@ \indexlibrary{\idxcode{operator\dcr}!\idxcode{join_view::iterator}} \begin{itemdecl} constexpr iterator operator--(int) - requires ref_is_glvalue && BidirectionalRange && - BidirectionalRange>; + requires ref_is_glvalue && bidirectional_range && + bidirectional_range>; \end{itemdecl} \begin{itemdescr} @@ -5431,7 +5431,7 @@ \begin{codeblock} namespace std::ranges { template - requires BidirectionalRange + requires bidirectional_range class reverse_view : public view_interface> { private: V base_ = V(); // \expos @@ -5441,7 +5441,7 @@ constexpr explicit reverse_view(V r); template - requires BidirectionalRange && constructible_from> + requires bidirectional_range && constructible_from> constexpr explicit reverse_view(R&& r); constexpr V base() const; @@ -5481,7 +5481,7 @@ \indexlibrary{\idxcode{reverse_view}!\idxcode{reverse_view}}% \begin{itemdecl} template - requires BidirectionalRange && constructible_from> + requires bidirectional_range && constructible_from> constexpr explicit reverse_view(R&& r); \end{itemdecl} @@ -5929,8 +5929,8 @@ constexpr void operator++(int) requires (!ForwardRange); constexpr iterator operator++(int) requires ForwardRange; - constexpr iterator& operator--() requires BidirectionalRange; - constexpr iterator operator--(int) requires BidirectionalRange; + constexpr iterator& operator--() requires bidirectional_range; + constexpr iterator operator--(int) requires bidirectional_range; constexpr iterator& operator+=(difference_type x) requires RandomAccessRange; @@ -6045,7 +6045,7 @@ \end{itemdescr} \begin{itemdecl} -constexpr iterator& operator--() requires BidirectionalRange; +constexpr iterator& operator--() requires bidirectional_range; \end{itemdecl} \begin{itemdescr} @@ -6059,7 +6059,7 @@ \end{itemdescr} \begin{itemdecl} -constexpr iterator operator--(int) requires BidirectionalRange; +constexpr iterator operator--(int) requires bidirectional_range; \end{itemdecl} \begin{itemdescr} From 4af989447ede6e516186c4cacf07125db00bd16c Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:44:26 -0700 Subject: [PATCH 67/84] [everywhere] Rename concept 'RandomAccessRange' to 'random_access_range'. --- source/algorithms.tex | 48 +++++++-------- source/ranges.tex | 132 +++++++++++++++++++++--------------------- 2 files changed, 90 insertions(+), 90 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 3fe29c52d1..992e937bf0 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1771,7 +1771,7 @@ requires permutable && UniformRandomBitGenerator> I shuffle(I first, S last, Gen&& g); - template + template requires permutable> && UniformRandomBitGenerator> safe_iterator_t shuffle(R&& r, Gen&& g); @@ -1818,7 +1818,7 @@ requires sortable constexpr I sort(I first, S last, Comp comp = {}, Proj proj = {}); - template + template requires sortable, Comp, Proj> constexpr safe_iterator_t sort(R&& r, Comp comp = {}, Proj proj = {}); @@ -1842,7 +1842,7 @@ class Proj = identity> requires sortable I stable_sort(I first, S last, Comp comp = {}, Proj proj = {}); - template + template requires sortable, Comp, Proj> safe_iterator_t stable_sort(R&& r, Comp comp = {}, Proj proj = {}); @@ -1873,7 +1873,7 @@ requires sortable constexpr I partial_sort(I first, I middle, S last, Comp comp = {}, Proj proj = {}); - template + template requires sortable, Comp, Proj> constexpr safe_iterator_t partial_sort(R&& r, iterator_t middle, Comp comp = {}, @@ -1916,7 +1916,7 @@ constexpr partial_sort_copy_result partial_sort_copy(I1 first, S1 last, I2 result_first, S2 result_last, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires indirectly_copyable, iterator_t> && sortable, Comp, Proj2> && @@ -1998,7 +1998,7 @@ requires sortable constexpr I nth_element(I first, I nth, S last, Comp comp = {}, Proj proj = {}); - template + template requires sortable, Comp, Proj> constexpr safe_iterator_t nth_element(R&& r, iterator_t nth, Comp comp = {}, Proj proj = {}); @@ -2514,7 +2514,7 @@ requires sortable constexpr I push_heap(I first, S last, Comp comp = {}, Proj proj = {}); - template + template requires sortable, Comp, Proj> constexpr safe_iterator_t push_heap(R&& r, Comp comp = {}, Proj proj = {}); @@ -2532,7 +2532,7 @@ requires sortable constexpr I pop_heap(I first, S last, Comp comp = {}, Proj proj = {}); - template + template requires sortable, Comp, Proj> constexpr safe_iterator_t pop_heap(R&& r, Comp comp = {}, Proj proj = {}); @@ -2550,7 +2550,7 @@ requires sortable constexpr I make_heap(I first, S last, Comp comp = {}, Proj proj = {}); - template + template requires sortable, Comp, Proj> constexpr safe_iterator_t make_heap(R&& r, Comp comp = {}, Proj proj = {}); @@ -2568,7 +2568,7 @@ requires sortable constexpr I sort_heap(I first, S last, Comp comp = {}, Proj proj = {}); - template + template requires sortable, Comp, Proj> constexpr safe_iterator_t sort_heap(R&& r, Comp comp = {}, Proj proj = {}); @@ -2591,7 +2591,7 @@ template S, class Proj = identity, indirect_strict_weak_order> Comp = ranges::less> constexpr bool is_heap(I first, S last, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> constexpr bool is_heap(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2617,7 +2617,7 @@ template S, class Proj = identity, indirect_strict_weak_order> Comp = ranges::less> constexpr I is_heap_until(I first, S last, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> constexpr safe_iterator_t is_heap_until(R&& r, Comp comp = {}, Proj proj = {}); @@ -5617,7 +5617,7 @@ requires permutable && UniformRandomBitGenerator> I ranges::shuffle(I first, S last, Gen&& g); -template +template requires permutable> && UniformRandomBitGenerator> safe_iterator_t ranges::shuffle(R&& r, Gen&& g); @@ -5849,7 +5849,7 @@ requires sortable constexpr I ranges::sort(I first, S last, Comp comp = {}, Proj proj = {}); -template +template requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::sort(R&& r, Comp comp = {}, Proj proj = {}); @@ -5907,7 +5907,7 @@ class Proj = identity> requires sortable I ranges::stable_sort(I first, S last, Comp comp = {}, Proj proj = {}); -template +template requires sortable, Comp, Proj> safe_iterator_t ranges::stable_sort(R&& r, Comp comp = {}, Proj proj = {}); @@ -6019,7 +6019,7 @@ \end{itemdescr} \begin{itemdecl} -template +template requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::partial_sort(R&& r, iterator_t middle, Comp comp = {}, Proj proj = {}); @@ -6073,7 +6073,7 @@ constexpr ranges::partial_sort_copy_result ranges::partial_sort_copy(I1 first, S1 last, I2 result_first, S2 result_last, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires indirectly_copyable, iterator_t> && sortable, Comp, Proj2> && @@ -6331,7 +6331,7 @@ \end{itemdescr} \begin{itemdecl} -template +template requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::nth_element(R&& r, iterator_t nth, Comp comp = {}, Proj proj = {}); @@ -7546,7 +7546,7 @@ requires sortable constexpr I ranges::push_heap(I first, S last, Comp comp = {}, Proj proj = {}); -template +template requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::push_heap(R&& r, Comp comp = {}, Proj proj = {}); @@ -7597,7 +7597,7 @@ requires sortable constexpr I ranges::pop_heap(I first, S last, Comp comp = {}, Proj proj = {}); -template +template requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::pop_heap(R&& r, Comp comp = {}, Proj proj = {}); @@ -7655,7 +7655,7 @@ requires sortable constexpr I ranges::make_heap(I first, S last, Comp comp = {}, Proj proj = {}); -template +template requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::make_heap(R&& r, Comp comp = {}, Proj proj = {}); @@ -7704,7 +7704,7 @@ requires sortable constexpr I ranges::sort_heap(I first, S last, Comp comp = {}, Proj proj = {}); -template +template requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::sort_heap(R&& r, Comp comp = {}, Proj proj = {}); @@ -7807,7 +7807,7 @@ template S, class Proj = identity, indirect_strict_weak_order> Comp = ranges::less> constexpr bool ranges::is_heap(I first, S last, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> constexpr bool ranges::is_heap(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7842,7 +7842,7 @@ template S, class Proj = identity, indirect_strict_weak_order> Comp = ranges::less> constexpr I ranges::is_heap_until(I first, S last, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> constexpr safe_iterator_t ranges::is_heap_until(R&& r, Comp comp = {}, Proj proj = {}); diff --git a/source/ranges.tex b/source/ranges.tex index 6c7676f2d7..151e5f5c5a 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -93,7 +93,7 @@ concept bidirectional_range = @\seebelow@; template - concept RandomAccessRange = @\seebelow@; + concept random_access_range = @\seebelow@; template concept ContiguousRange = @\seebelow@; @@ -987,13 +987,13 @@ \libconcept{range} type for which \tcode{ranges::begin} returns a model of \libconcept{output_iterator}\iref{iterator.concept.output}. \libconcept{input_range}, \libconcept{ForwardRange}, \libconcept{bidirectional_range}, -and \libconcept{RandomAccessRange} are defined similarly. +and \libconcept{random_access_range} are defined similarly. \indexlibrary{\idxcode{output_range}}% \indexlibrary{\idxcode{input_range}}% \indexlibrary{\idxcode{ForwardRange}}% \indexlibrary{\idxcode{bidirectional_range}}% -\indexlibrary{\idxcode{RandomAccessRange}}% +\indexlibrary{\idxcode{random_access_range}}% \begin{itemdecl} template concept output_range = @@ -1012,7 +1012,7 @@ ForwardRange && bidirectional_iterator>; template - concept RandomAccessRange = + concept random_access_range = bidirectional_range && random_access_iterator>; \end{itemdecl} @@ -1025,7 +1025,7 @@ \begin{itemdecl} template concept ContiguousRange = - RandomAccessRange && contiguous_iterator> && + random_access_range && contiguous_iterator> && requires(T& t) { { ranges::data(t) } -> same_as>>; }; @@ -1146,11 +1146,11 @@ constexpr decltype(auto) back() const requires bidirectional_range && CommonRange; - template + template constexpr decltype(auto) operator[](range_difference_t n) { return ranges::begin(derived())[n]; } - template + template constexpr decltype(auto) operator[](range_difference_t n) const { return ranges::begin(derived())[n]; } @@ -3252,37 +3252,37 @@ constexpr iterator operator--(int) requires bidirectional_range; constexpr iterator& operator+=(difference_type n) - requires RandomAccessRange; + requires random_access_range; constexpr iterator& operator-=(difference_type n) - requires RandomAccessRange; + requires random_access_range; constexpr decltype(auto) operator[](difference_type n) const - requires RandomAccessRange + requires random_access_range { return invoke(*parent_->fun_, current_[n]); } friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable>; friend constexpr bool operator<(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; friend constexpr bool operator>(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; friend constexpr bool operator<=(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; friend constexpr bool operator>=(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; friend constexpr compare_three_way_result_t> operator<=>(const iterator& x, const iterator& y) - requires RandomAccessRange && ThreeWayComparable>; + requires random_access_range && ThreeWayComparable>; friend constexpr iterator operator+(iterator i, difference_type n) - requires RandomAccessRange; + requires random_access_range; friend constexpr iterator operator+(difference_type n, iterator i) - requires RandomAccessRange; + requires random_access_range; friend constexpr iterator operator-(iterator i, difference_type n) - requires RandomAccessRange; + requires random_access_range; friend constexpr difference_type operator-(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; friend constexpr decltype(auto) iter_move(const iterator& i) noexcept(noexcept(invoke(*i.parent_->fun_, *i.current_))) @@ -3303,7 +3303,7 @@ \pnum \tcode{iterator::iterator_concept} is defined as follows: \begin{itemize} -\item If \tcode{V} models \libconcept{RandomAccessRange}, then +\item If \tcode{V} models \libconcept{random_access_range}, then \tcode{iterator_concept} denotes \tcode{random_access_iterator_tag}. \item Otherwise, if \tcode{V} models \libconcept{bidirectional_range}, then @@ -3427,7 +3427,7 @@ \indexlibrary{\idxcode{operator+=}!\idxcode{transform_view::iterator}} \begin{itemdecl} constexpr iterator& operator+=(difference_type n) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -3442,7 +3442,7 @@ \indexlibrary{\idxcode{operator-=}!\idxcode{transform_view::iterator}}% \begin{itemdecl} constexpr iterator& operator-=(difference_type n) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -3468,7 +3468,7 @@ \indexlibrary{\idxcode{operator<}!\idxcode{transform_view::iterator}}% \begin{itemdecl} friend constexpr bool operator<(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -3479,7 +3479,7 @@ \indexlibrary{\idxcode{operator>}!\idxcode{transform_view::iterator}}% \begin{itemdecl} friend constexpr bool operator>(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -3490,7 +3490,7 @@ \indexlibrary{\idxcode{operator<=}!\idxcode{transform_view::iterator}}% \begin{itemdecl} friend constexpr bool operator<=(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -3501,7 +3501,7 @@ \indexlibrary{\idxcode{operator>=}!\idxcode{transform_view::iterator}}% \begin{itemdecl} friend constexpr bool operator>=(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -3513,7 +3513,7 @@ \begin{itemdecl} friend constexpr compare_three_way_result_t> operator<=>(const iterator& x, const iterator& y) - requires RandomAccessRange && ThreeWayComparable>; + requires random_access_range && ThreeWayComparable>; \end{itemdecl} \begin{itemdescr} @@ -3524,9 +3524,9 @@ \indexlibrary{\idxcode{operator+}!\idxcode{transform_view::iterator}} \begin{itemdecl} friend constexpr iterator operator+(iterator i, difference_type n) - requires RandomAccessRange; + requires random_access_range; friend constexpr iterator operator+(difference_type n, iterator i) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -3537,7 +3537,7 @@ \indexlibrary{\idxcode{operator-}!\idxcode{transform_view::iterator}}% \begin{itemdecl} friend constexpr iterator operator-(iterator i, difference_type n) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -3548,7 +3548,7 @@ \indexlibrary{\idxcode{operator-}!\idxcode{transform_view::iterator}}% \begin{itemdecl} friend constexpr difference_type operator-(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -3717,7 +3717,7 @@ constexpr auto begin() requires (!@\placeholder{simple-view}@) { if constexpr (sized_range) { - if constexpr (RandomAccessRange) + if constexpr (random_access_range) return ranges::begin(base_); else return counted_iterator{ranges::begin(base_), size()}; @@ -3727,7 +3727,7 @@ constexpr auto begin() const requires range { if constexpr (sized_range) { - if constexpr (RandomAccessRange) + if constexpr (random_access_range) return ranges::begin(base_); else return counted_iterator{ranges::begin(base_), size()}; @@ -3737,7 +3737,7 @@ constexpr auto end() requires (!@\placeholder{simple-view}@) { if constexpr (sized_range) { - if constexpr (RandomAccessRange) + if constexpr (random_access_range) return ranges::begin(base_) + size(); else return default_sentinel; @@ -3747,7 +3747,7 @@ constexpr auto end() const requires range { if constexpr (sized_range) { - if constexpr (RandomAccessRange) + if constexpr (random_access_range) return ranges::begin(base_) + size(); else return default_sentinel; @@ -4074,9 +4074,9 @@ constexpr R base() const; constexpr auto begin() - requires (!(@\placeholder{simple-view}@ && RandomAccessRange)); + requires (!(@\placeholder{simple-view}@ && random_access_range)); constexpr auto begin() const - requires RandomAccessRange; + requires random_access_range; constexpr auto end() requires (!@\placeholder{simple-view}@) @@ -4141,9 +4141,9 @@ \indexlibrarymember{begin}{drop_view}% \begin{itemdecl} constexpr auto begin() - requires (!(@\placeholder{simple-view}@ && RandomAccessRange)); + requires (!(@\placeholder{simple-view}@ && random_access_range)); constexpr auto begin() const - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -5326,28 +5326,28 @@ } constexpr auto begin() { - if constexpr (RandomAccessRange && sized_range) + if constexpr (random_access_range && sized_range) return ranges::begin(base_); else return common_iterator, sentinel_t>(ranges::begin(base_)); } constexpr auto begin() const requires range { - if constexpr (RandomAccessRange && sized_range) + if constexpr (random_access_range && sized_range) return ranges::begin(base_); else return common_iterator, sentinel_t>(ranges::begin(base_)); } constexpr auto end() { - if constexpr (RandomAccessRange && sized_range) + if constexpr (random_access_range && sized_range) return ranges::begin(base_) + ranges::size(base_); else return common_iterator, sentinel_t>(ranges::end(base_)); } constexpr auto end() const requires range { - if constexpr (RandomAccessRange && sized_range) + if constexpr (random_access_range && sized_range) return ranges::begin(base_) + ranges::size(base_); else return common_iterator, sentinel_t>(ranges::end(base_)); @@ -5933,12 +5933,12 @@ constexpr iterator operator--(int) requires bidirectional_range; constexpr iterator& operator+=(difference_type x) - requires RandomAccessRange; + requires random_access_range; constexpr iterator& operator-=(difference_type x) - requires RandomAccessRange; + requires random_access_range; constexpr decltype(auto) operator[](difference_type n) const - requires RandomAccessRange + requires random_access_range { return get(*(current_ + n)); } friend constexpr bool operator==(const iterator& x, const iterator& y) @@ -5946,25 +5946,25 @@ friend constexpr bool operator==(const iterator& x, const sentinel_t& y); friend constexpr bool operator<(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; friend constexpr bool operator>(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; friend constexpr bool operator<=(const iterator& y, const iterator& y) - requires RandomAccessRange; + requires random_access_range; friend constexpr bool operator>=(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; friend constexpr compare_three_way_result_t> operator<=>(const iterator& x, const iterator& y) - requires RandomAccessRange && ThreeWayComparable>; + requires random_access_range && ThreeWayComparable>; friend constexpr iterator operator+(const iterator& x, difference_type y) - requires RandomAccessRange; + requires random_access_range; friend constexpr iterator operator+(difference_type x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; friend constexpr iterator operator-(const iterator& x, difference_type y) - requires RandomAccessRange; + requires random_access_range; friend constexpr difference_type operator-(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; friend constexpr difference_type operator-(const iterator& x, const sentinel_t& y) @@ -6075,7 +6075,7 @@ \begin{itemdecl} constexpr iterator& operator+=(difference_type n); - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -6090,7 +6090,7 @@ \begin{itemdecl} constexpr iterator& operator-=(difference_type n) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -6126,7 +6126,7 @@ \begin{itemdecl} friend constexpr bool operator<(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -6137,7 +6137,7 @@ \begin{itemdecl} friend constexpr bool operator>(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -6148,7 +6148,7 @@ \begin{itemdecl} friend constexpr bool operator<=(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -6159,7 +6159,7 @@ \begin{itemdecl} friend constexpr bool operator>=(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -6171,7 +6171,7 @@ \begin{itemdecl} friend constexpr compare_three_way_result_t> operator<=>(const iterator& x, const iterator& y) - requires RandomAccessRange && ThreeWayComparable>; + requires random_access_range && ThreeWayComparable>; \end{itemdecl} \begin{itemdescr} @@ -6182,7 +6182,7 @@ \begin{itemdecl} friend constexpr iterator operator+(const iterator& x, difference_type y) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -6192,7 +6192,7 @@ \begin{itemdecl} friend constexpr iterator operator+(difference_type x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -6202,7 +6202,7 @@ \begin{itemdecl} constexpr iterator operator-(const iterator& x, difference_type y) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} @@ -6213,7 +6213,7 @@ \begin{itemdecl} constexpr difference_type operator-(const iterator& x, const iterator& y) - requires RandomAccessRange; + requires random_access_range; \end{itemdecl} \begin{itemdescr} From b7b948cb8fa86202d0d51179752effb39828fb7a Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:44:44 -0700 Subject: [PATCH 68/84] [everywhere] Rename concept 'ContiguousRange' to 'contiguous_range'. --- source/ranges.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 151e5f5c5a..bbca55545d 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -96,7 +96,7 @@ concept random_access_range = @\seebelow@; template - concept ContiguousRange = @\seebelow@; + concept contiguous_range = @\seebelow@; template concept CommonRange = @\seebelow@; @@ -1017,14 +1017,14 @@ \end{itemdecl} \pnum -\tcode{ContiguousRange} additionally requires that +\tcode{contiguous_range} additionally requires that the \tcode{ranges::data} customization point\iref{range.prim.data} is usable with the range. -\indexlibrary{\idxcode{ContiguousRange}}% +\indexlibrary{\idxcode{contiguous_range}}% \begin{itemdecl} template - concept ContiguousRange = + concept contiguous_range = random_access_range && contiguous_iterator> && requires(T& t) { { ranges::data(t) } -> same_as>>; @@ -2593,7 +2593,7 @@ constexpr auto size() const requires sized_range { return ranges::size(*r_); } - constexpr auto data() const requires ContiguousRange + constexpr auto data() const requires contiguous_range { return ranges::data(*r_); } friend constexpr iterator_t begin(ref_view r) From ac3740e759a3ca0386a7345f596a51c2431fda82 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:45:12 -0700 Subject: [PATCH 69/84] [everywhere] Rename concept 'CommonRange' to 'common_range'. --- source/ranges.tex | 60 +++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index bbca55545d..63e1eb2788 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -99,7 +99,7 @@ concept contiguous_range = @\seebelow@; template - concept CommonRange = @\seebelow@; + concept common_range = @\seebelow@; template concept ViewableRange = @\seebelow@; @@ -228,7 +228,7 @@ // \ref{range.common}, common view template - requires (!CommonRange) + requires (!common_range) class common_view; namespace views { inline constexpr @\unspec@ common = @\unspec@; } @@ -1032,17 +1032,17 @@ \end{itemdecl} \pnum -The \libconcept{CommonRange} concept specifies requirements of +The \libconcept{common_range} concept specifies requirements of a \libconcept{range} type for which \tcode{ranges::begin} and \tcode{ranges::end} return objects of the same type. \begin{example} -The standard containers\iref{containers} model \libconcept{CommonRange}. +The standard containers\iref{containers} model \libconcept{common_range}. \end{example} -\indexlibrary{\idxcode{CommonRange}}% +\indexlibrary{\idxcode{common_range}}% \begin{itemdecl} template - concept CommonRange = + concept common_range = range && same_as, sentinel_t>; \end{itemdecl} @@ -1142,9 +1142,9 @@ constexpr decltype(auto) front() requires ForwardRange; constexpr decltype(auto) front() const requires ForwardRange; - constexpr decltype(auto) back() requires bidirectional_range && CommonRange; + constexpr decltype(auto) back() requires bidirectional_range && common_range; constexpr decltype(auto) back() const - requires bidirectional_range && CommonRange; + requires bidirectional_range && common_range; template constexpr decltype(auto) operator[](range_difference_t n) { @@ -1183,9 +1183,9 @@ \indexlibrary{\idxcode{view_interface}!\idxcode{back}}% \begin{itemdecl} -constexpr decltype(auto) back() requires bidirectional_range && CommonRange; +constexpr decltype(auto) back() requires bidirectional_range && common_range; constexpr decltype(auto) back() const - requires bidirectional_range && CommonRange; + requires bidirectional_range && common_range; \end{itemdecl} \begin{itemdescr} @@ -2678,7 +2678,7 @@ constexpr iterator begin(); constexpr auto end() { - if constexpr (CommonRange) + if constexpr (common_range) return iterator{*this, ranges::end(base_)}; else return sentinel{*this}; @@ -3077,12 +3077,12 @@ regular_invocable>; constexpr sentinel end(); - constexpr iterator end() requires CommonRange; + constexpr iterator end() requires common_range; constexpr sentinel end() const requires range && regular_invocable>; constexpr iterator end() const - requires CommonRange && + requires common_range && regular_invocable>; constexpr auto size() requires sized_range { return ranges::size(base_); } @@ -3172,7 +3172,7 @@ \indexlibrary{\idxcode{end}!\idxcode{transform_view}}% \begin{itemdecl} -constexpr iterator end() requires CommonRange; +constexpr iterator end() requires common_range; \end{itemdecl} \begin{itemdescr} @@ -3201,7 +3201,7 @@ \indexlibrary{\idxcode{end}!\idxcode{transform_view}}% \begin{itemdecl} constexpr iterator end() const - requires CommonRange && + requires common_range && regular_invocable>; \end{itemdecl} @@ -4352,7 +4352,7 @@ constexpr auto end() { if constexpr (ForwardRange && is_reference_v && ForwardRange && - CommonRange && CommonRange) + common_range && common_range) return iterator<@\placeholder{simple-view}@>{*this, ranges::end(base_)}; else return sentinel<@\placeholder{simple-view}@>{*this}; @@ -4364,8 +4364,8 @@ if constexpr (ForwardRange && is_reference_v> && ForwardRange> && - CommonRange && - CommonRange>) + common_range && + common_range>) return iterator{*this, ranges::end(base_)}; else return sentinel{*this}; @@ -4831,12 +4831,12 @@ return outer_iterator{*this, ranges::begin(base_)}; } - constexpr auto end() requires ForwardRange && CommonRange { + constexpr auto end() requires ForwardRange && common_range { return outer_iterator<@\placeholder{simple-view}@>{*this, ranges::end(base_)}; } constexpr auto end() const { - if constexpr (ForwardRange && ForwardRange && CommonRange) + if constexpr (ForwardRange && ForwardRange && common_range) return outer_iterator{*this, ranges::end(base_)}; else return default_sentinel; @@ -5303,7 +5303,7 @@ \begin{codeblock} namespace std::ranges { template - requires (!CommonRange) + requires (!common_range) class common_view : public view_interface> { private: V base_ = V(); // \expos @@ -5313,7 +5313,7 @@ constexpr explicit common_view(V r); template - requires (!CommonRange && constructible_from>) + requires (!common_range && constructible_from>) constexpr explicit common_view(R&& r); constexpr V base() const; @@ -5372,7 +5372,7 @@ \indexlibrary{\idxcode{common_view}!\idxcode{common_view}}% \begin{itemdecl} template - requires (!CommonRange && constructible_from>) + requires (!common_range && constructible_from>) constexpr explicit common_view(R&& r); \end{itemdecl} @@ -5401,7 +5401,7 @@ \begin{itemize} \item \tcode{views::all(E)}, - if \tcode{decltype((E))} models \libconcept{CommonRange} + if \tcode{decltype((E))} models \libconcept{common_range} and \tcode{views::all(E)} is a well-formed expression. \item Otherwise, \tcode{common_view\{E\}}. @@ -5447,13 +5447,13 @@ constexpr V base() const; constexpr reverse_iterator> begin(); - constexpr reverse_iterator> begin() requires CommonRange; + constexpr reverse_iterator> begin() requires common_range; constexpr reverse_iterator> begin() const - requires CommonRange; + requires common_range; constexpr reverse_iterator> end(); constexpr reverse_iterator> end() const - requires CommonRange; + requires common_range; constexpr auto size() requires sized_range { return ranges::size(base_); @@ -5520,9 +5520,9 @@ \indexlibrary{\idxcode{begin}!\idxcode{reverse_view}}% \begin{itemdecl} -constexpr reverse_iterator> begin() requires CommonRange; +constexpr reverse_iterator> begin() requires common_range; constexpr reverse_iterator> begin() const - requires CommonRange; + requires common_range; \end{itemdecl} \begin{itemdescr} @@ -5534,7 +5534,7 @@ \begin{itemdecl} constexpr reverse_iterator> end(); constexpr reverse_iterator> end() const - requires CommonRange; + requires common_range; \end{itemdecl} \begin{itemdescr} From 1a6bda1409e5e02c8e5e1329d8803fe4e6489460 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:45:34 -0700 Subject: [PATCH 70/84] [everywhere] Rename concept 'ViewableRange' to 'viewable_range'. --- source/ranges.tex | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 63e1eb2788..2e510d4815 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -102,7 +102,7 @@ concept common_range = @\seebelow@; template - concept ViewableRange = @\seebelow@; + concept viewable_range = @\seebelow@; // \ref{view.interface}, class template \tcode{view_interface} template @@ -153,7 +153,7 @@ // \ref{range.all}, all view namespace views { inline constexpr @\unspec@ all = @\unspec@; } - template + template using all_view = decltype(views::all(declval())); template @@ -1047,13 +1047,13 @@ \end{itemdecl} \pnum -The \libconcept{ViewableRange} concept specifies the requirements of a +The \libconcept{viewable_range} concept specifies the requirements of a \libconcept{range} type that can be converted to a \libconcept{view} safely. -\indexlibrary{\idxcode{ViewableRange}}% +\indexlibrary{\idxcode{viewable_range}}% \begin{itemdecl} template - concept ViewableRange = + concept viewable_range = range && (@\placeholder{forwarding-range}@ || view>); \end{itemdecl} @@ -2454,9 +2454,9 @@ \pnum A \term{range adaptor closure object} is a unary function object that accepts -a \libconcept{ViewableRange} argument and returns a \libconcept{view}. For +a \libconcept{viewable_range} argument and returns a \libconcept{view}. For a range adaptor closure object \tcode{C} and an expression \tcode{R} such that -\tcode{decltype((R))} models \libconcept{ViewableRange}, the following +\tcode{decltype((R))} models \libconcept{viewable_range}, the following expressions are equivalent and yield a \libconcept{view}: \begin{codeblock} @@ -2476,7 +2476,7 @@ \pnum A \term{range adaptor object} is a customization point object\iref{customization.point.object} -that accepts a \libconcept{ViewableRange} as its first argument and returns a +that accepts a \libconcept{viewable_range} as its first argument and returns a \libconcept{view}. \pnum @@ -2671,7 +2671,7 @@ filter_view() = default; constexpr filter_view(V base, Pred pred); template - requires ViewableRange && constructible_from> + requires viewable_range && constructible_from> constexpr filter_view(R&& r, Pred pred); constexpr V base() const; @@ -2704,7 +2704,7 @@ \indexlibrary{\idxcode{filter_view}!\idxcode{filter_view}}% \begin{itemdecl} template - requires ViewableRange && constructible_from> + requires viewable_range && constructible_from> constexpr filter_view(R&& r, Pred pred); \end{itemdecl} @@ -3066,7 +3066,7 @@ transform_view() = default; constexpr transform_view(V base, F fun); template - requires ViewableRange && constructible_from> + requires viewable_range && constructible_from> constexpr transform_view(R&& r, F fun); constexpr V base() const; @@ -3109,7 +3109,7 @@ \indexlibrary{\idxcode{transform_view}!\idxcode{transform_view}}% \begin{itemdecl} template - requires ViewableRange && constructible_from> + requires viewable_range && constructible_from> constexpr transform_view(R&& r, F fun); \end{itemdecl} @@ -3709,7 +3709,7 @@ public: take_view() = default; constexpr take_view(V base, range_difference_t count); - template + template requires constructible_from> constexpr take_view(R&& r, range_difference_t count); @@ -3785,7 +3785,7 @@ \indexlibrary{\idxcode{take_view}!\idxcode{take_view}}% \begin{itemdecl} -template +template requires constructible_from> constexpr take_view(R&& r, range_difference_t count); \end{itemdecl} @@ -4336,7 +4336,7 @@ constexpr explicit join_view(V base); template - requires ViewableRange && constructible_from> + requires viewable_range && constructible_from> constexpr explicit join_view(R&& r); constexpr auto begin() { @@ -4390,7 +4390,7 @@ \indexlibrary{\idxcode{join_view}!\idxcode{join_view}}% \begin{itemdecl} template - requires ViewableRange && constructible_from> + requires viewable_range && constructible_from> constexpr explicit join_view(R&& r); \end{itemdecl} @@ -5312,7 +5312,7 @@ constexpr explicit common_view(V r); - template + template requires (!common_range && constructible_from>) constexpr explicit common_view(R&& r); @@ -5371,7 +5371,7 @@ \indexlibrary{\idxcode{common_view}!\idxcode{common_view}}% \begin{itemdecl} -template +template requires (!common_range && constructible_from>) constexpr explicit common_view(R&& r); \end{itemdecl} @@ -5440,7 +5440,7 @@ constexpr explicit reverse_view(V r); - template + template requires bidirectional_range && constructible_from> constexpr explicit reverse_view(R&& r); @@ -5480,7 +5480,7 @@ \indexlibrary{\idxcode{reverse_view}!\idxcode{reverse_view}}% \begin{itemdecl} -template +template requires bidirectional_range && constructible_from> constexpr explicit reverse_view(R&& r); \end{itemdecl} From 0236c04349698e814b51b88815456a52ded66bf4 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:46:26 -0700 Subject: [PATCH 71/84] [everywhere] Rename concept 'UniformRandomBitGenerator' to 'uniform_random_bit_generator'. --- source/algorithms.tex | 8 ++++---- source/numerics.tex | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 992e937bf0..d87c1de562 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1769,11 +1769,11 @@ namespace ranges { template S, class Gen> requires permutable && - UniformRandomBitGenerator> + uniform_random_bit_generator> I shuffle(I first, S last, Gen&& g); template requires permutable> && - UniformRandomBitGenerator> + uniform_random_bit_generator> safe_iterator_t shuffle(R&& r, Gen&& g); } @@ -5615,11 +5615,11 @@ template S, class Gen> requires permutable && - UniformRandomBitGenerator> + uniform_random_bit_generator> I ranges::shuffle(I first, S last, Gen&& g); template requires permutable> && - UniformRandomBitGenerator> + uniform_random_bit_generator> safe_iterator_t ranges::shuffle(R&& r, Gen&& g); \end{itemdecl} diff --git a/source/numerics.tex b/source/numerics.tex index 0dc3e4bd9b..2e13081fc6 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -1760,7 +1760,7 @@ namespace std { // \ref{rand.req.urng}, uniform random bit generator requirements template - concept UniformRandomBitGenerator = @\seebelow@; + concept uniform_random_bit_generator = @\seebelow@; // \ref{rand.eng.lcong}, class template \tcode{linear_congruential_engine} template @@ -2153,7 +2153,7 @@ \begin{codeblock} template - concept UniformRandomBitGenerator = + concept uniform_random_bit_generator = invocable && unsigned_integral> && requires { { G::min() } -> same_as>; @@ -2163,7 +2163,7 @@ \pnum Let \tcode{g} be an object of type \tcode{G}. \tcode{G} models -\libconcept{UniformRandomBitGenerator} only if +\libconcept{uniform_random_bit_generator} only if \begin{itemize} \item both \tcode{G::min()} and \tcode{G::max()} are constant @@ -2178,7 +2178,7 @@ \indextext{uniform random bit generator!requirements|)}% \pnum A class \tcode{G} meets the \term{uniform random bit generator} requirements if -\tcode{G} models \libconcept{UniformRandomBitGenerator}, +\tcode{G} models \libconcept{uniform_random_bit_generator}, \tcode{invoke_result_t} is an unsigned integer type\iref{basic.fundamental}, and \tcode{G} provides a nested \grammarterm{typedef-name} \tcode{result_type} From 80324ff7385730b04089bf4c4f654e5d5617abd0 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:48:25 -0700 Subject: [PATCH 72/84] [expr.new], [uninitialized.copy], [uninitialized_move], [memory.syn] Rename non-normative names that collide with new concept names. --- source/expressions.tex | 4 ++-- source/utilities.tex | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index 484ce6d3f4..1c622c727e 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -4934,7 +4934,7 @@ \begin{example} \begin{codeblock} - void mergeable(int x) { + void can_merge(int x) { // These allocations are safe for merging: std::unique_ptr a{new (std::nothrow) char[8]}; std::unique_ptr b{new (std::nothrow) char[8]}; @@ -4943,7 +4943,7 @@ g(a.get(), b.get(), c.get()); } - void unmergeable(int x) { + void cannot_merge(int x) { std::unique_ptr a{new char[8]}; try { // Merging this allocation would change its catch handler. diff --git a/source/utilities.tex b/source/utilities.tex index b83636f529..ca5d229b52 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -6537,7 +6537,7 @@ template requires constructible_from, range_reference_t> uninitialized_copy_result, safe_iterator_t> - uninitialized_copy(IR&& input_range, OR&& output_range); + uninitialized_copy(IR&& in_range, OR&& out_range); template using uninitialized_copy_n_result = uninitialized_copy_result; @@ -6573,7 +6573,7 @@ template requires constructible_from, range_rvalue_reference_t> uninitialized_move_result, safe_iterator_t> - uninitialized_move(IR&& input_range, OR&& output_range); + uninitialized_move(IR&& in_range, OR&& out_range); template using uninitialized_move_n_result = uninitialized_copy_result; @@ -8213,7 +8213,7 @@ template requires constructible_from, range_reference_t> uninitialized_copy_result, safe_iterator_t> - uninitialized_copy(IR&& input_range, OR&& output_range); + uninitialized_copy(IR&& in_range, OR&& out_range); } \end{itemdecl} @@ -8318,7 +8318,7 @@ template requires constructible_from, range_rvalue_reference_t> uninitialized_move_result, safe_iterator_t> - uninitialized_move(IR&& input_range, OR&& output_range); + uninitialized_move(IR&& in_range, OR&& out_range); } \end{itemdecl} From ecfc5be1f66a8b2506534176965afac9947cad28 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:50:30 -0700 Subject: [PATCH 73/84] [everywhere] Rename concept 'FloatingPoint' to 'floating_point'. --- source/concepts.tex | 4 ++-- source/numerics.tex | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 72d4811195..7dc9d888a2 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -175,7 +175,7 @@ template concept unsigned_integral = @\seebelow@; template - concept FloatingPoint = @\seebelow@; + concept floating_point = @\seebelow@; // \ref{concept.assignable}, concept \libconcept{assignable_from} template @@ -479,7 +479,7 @@ template concept unsigned_integral = integral && !signed_integral; template - concept FloatingPoint = is_floating_point_v; + concept floating_point = is_floating_point_v; \end{itemdecl} \begin{itemdescr} diff --git a/source/numerics.tex b/source/numerics.tex index 2e13081fc6..0fbf13a386 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -10484,19 +10484,19 @@ template inline constexpr T egamma_v = @\unspec@; template inline constexpr T phi_v = @\unspec@; - template inline constexpr T e_v = @\seebelow@; - template inline constexpr T log2e_v = @\seebelow@; - template inline constexpr T log10e_v = @\seebelow@; - template inline constexpr T pi_v = @\seebelow@; - template inline constexpr T inv_pi_v = @\seebelow@; - template inline constexpr T inv_sqrtpi_v = @\seebelow@; - template inline constexpr T ln2_v = @\seebelow@; - template inline constexpr T ln10_v = @\seebelow@; - template inline constexpr T sqrt2_v = @\seebelow@; - template inline constexpr T sqrt3_v = @\seebelow@; - template inline constexpr T inv_sqrt3_v = @\seebelow@; - template inline constexpr T egamma_v = @\seebelow@; - template inline constexpr T phi_v = @\seebelow@; + template inline constexpr T e_v = @\seebelow@; + template inline constexpr T log2e_v = @\seebelow@; + template inline constexpr T log10e_v = @\seebelow@; + template inline constexpr T pi_v = @\seebelow@; + template inline constexpr T inv_pi_v = @\seebelow@; + template inline constexpr T inv_sqrtpi_v = @\seebelow@; + template inline constexpr T ln2_v = @\seebelow@; + template inline constexpr T ln10_v = @\seebelow@; + template inline constexpr T sqrt2_v = @\seebelow@; + template inline constexpr T sqrt3_v = @\seebelow@; + template inline constexpr T inv_sqrt3_v = @\seebelow@; + template inline constexpr T egamma_v = @\seebelow@; + template inline constexpr T phi_v = @\seebelow@; inline constexpr double e = e_v; inline constexpr double log2e = log2e_v; From c60590b66a151a9612799968b0d6aea298672594 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:52:50 -0700 Subject: [PATCH 74/84] [everywhere] Rename concept 'ForwardRange' to 'forward_range'. --- source/algorithms.tex | 88 ++++++++++++++++---------------- source/ranges.tex | 116 +++++++++++++++++++++--------------------- 2 files changed, 102 insertions(+), 102 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index d87c1de562..2ce6340f53 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -778,7 +778,7 @@ constexpr subrange find_end(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr safe_subrange_t @@ -817,7 +817,7 @@ constexpr I1 find_first_of(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template, Proj1>, projected, Proj2>> Pred = ranges::equal_to> constexpr safe_iterator_t @@ -849,7 +849,7 @@ indirect_relation> Pred = ranges::equal_to> constexpr I adjacent_find(I first, S last, Pred pred = {}, Proj proj = {}); - template, Proj>> Pred = ranges::equal_to> constexpr safe_iterator_t adjacent_find(R&& r, Pred pred = {}, Proj proj = {}); @@ -1038,7 +1038,7 @@ constexpr bool is_permutation(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr bool is_permutation(R1&& r1, R2&& r2, Pred pred = {}, @@ -1076,7 +1076,7 @@ constexpr subrange search(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr safe_subrange_t @@ -1113,7 +1113,7 @@ constexpr subrange search_n(I first, S last, iter_difference_t count, const T& value, Pred pred = {}, Proj proj = {}); - template requires indirectly_comparable, const T*, Pred, Proj> constexpr safe_subrange_t @@ -1536,7 +1536,7 @@ template S, class T, class Proj = identity> requires indirect_relation, const T*> constexpr subrange remove(I first, S last, const T& value, Proj proj = {}); - template + template requires permutable> && indirect_relation, Proj>, const T*> constexpr safe_subrange_t @@ -1544,7 +1544,7 @@ template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr subrange remove_if(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> requires permutable> constexpr safe_subrange_t @@ -1621,7 +1621,7 @@ template S, class Proj = identity, indirect_relation> C = ranges::equal_to> constexpr subrange unique(I first, S last, C comp = {}, Proj proj = {}); - template, Proj>> C = ranges::equal_to> requires permutable> constexpr safe_subrange_t @@ -1724,7 +1724,7 @@ namespace ranges { template S> constexpr subrange rotate(I first, I middle, S last); - template + template requires permutable> constexpr safe_subrange_t rotate(R&& r, iterator_t middle); } @@ -1747,7 +1747,7 @@ requires indirectly_copyable constexpr rotate_copy_result rotate_copy(I first, I middle, S last, O result); - template + template requires indirectly_copyable, O> constexpr rotate_copy_result, O> rotate_copy(R&& r, iterator_t middle, O result); @@ -1944,7 +1944,7 @@ template S, class Proj = identity, indirect_strict_weak_order> Comp = ranges::less> constexpr bool is_sorted(I first, S last, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> constexpr bool is_sorted(R&& r, Comp comp = {}, Proj proj = {}); } @@ -1970,7 +1970,7 @@ template S, class Proj = identity, indirect_strict_weak_order> Comp = ranges::less> constexpr I is_sorted_until(I first, S last, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> constexpr safe_iterator_t is_sorted_until(R&& r, Comp comp = {}, Proj proj = {}); @@ -2019,7 +2019,7 @@ indirect_strict_weak_order> Comp = ranges::less> constexpr I lower_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> constexpr safe_iterator_t @@ -2039,7 +2039,7 @@ template S, class T, class Proj = identity, indirect_strict_weak_order> Comp = ranges::less> constexpr I upper_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> constexpr safe_iterator_t @@ -2060,7 +2060,7 @@ indirect_strict_weak_order> Comp = ranges::less> constexpr subrange equal_range(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> constexpr safe_subrange_t @@ -2081,7 +2081,7 @@ indirect_strict_weak_order> Comp = ranges::less> constexpr bool binary_search(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> constexpr bool binary_search(R&& r, const T& value, Comp comp = {}, @@ -2119,7 +2119,7 @@ indirect_unary_predicate> Pred> constexpr subrange partition(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> requires permutable> constexpr safe_subrange_t @@ -2207,7 +2207,7 @@ template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr I partition_point(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> constexpr safe_iterator_t partition_point(R&& r, Pred pred, Proj proj = {}); @@ -2727,7 +2727,7 @@ template S, class Proj = identity, indirect_strict_weak_order> Comp = ranges::less> constexpr I min_element(I first, S last, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> constexpr safe_iterator_t min_element(R&& r, Comp comp = {}, Proj proj = {}); @@ -2750,7 +2750,7 @@ template S, class Proj = identity, indirect_strict_weak_order> Comp = ranges::less> constexpr I max_element(I first, S last, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> constexpr safe_iterator_t max_element(R&& r, Comp comp = {}, Proj proj = {}); @@ -2779,7 +2779,7 @@ indirect_strict_weak_order> Comp = ranges::less> constexpr minmax_element_result minmax_element(I first, S last, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> constexpr minmax_element_result> minmax_element(R&& r, Comp comp = {}, Proj proj = {}); @@ -3304,7 +3304,7 @@ constexpr subrange ranges::find_end(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr safe_subrange_t @@ -3390,7 +3390,7 @@ constexpr I1 ranges::find_first_of(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template, Proj1>, projected, Proj2>> Pred = ranges::equal_to> @@ -3453,7 +3453,7 @@ template S, class Proj = identity, indirect_relation> Pred = ranges::equal_to> constexpr I ranges::adjacent_find(I first, S last, Pred pred = {}, Proj proj = {}); -template, Proj>> Pred = ranges::equal_to> constexpr safe_iterator_t ranges::adjacent_find(R&& r, Pred pred = {}, Proj proj = {}); \end{itemdecl} @@ -3835,7 +3835,7 @@ constexpr bool ranges::is_permutation(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr bool ranges::is_permutation(R1&& r1, R2&& r2, Pred pred = {}, @@ -3923,7 +3923,7 @@ constexpr subrange ranges::search(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); -template requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr safe_subrange_t @@ -4010,7 +4010,7 @@ constexpr subrange ranges::search_n(I first, S last, iter_difference_t count, const T& value, Pred pred = {}, Proj proj = {}); -template requires indirectly_comparable, const T*, Pred, Proj> constexpr safe_subrange_t @@ -4969,7 +4969,7 @@ template S, class T, class Proj = identity> requires indirect_relation, const T*> constexpr subrange ranges::remove(I first, S last, const T& value, Proj proj = {}); -template +template requires permutable> && indirect_relation, Proj>, const T*> constexpr safe_subrange_t @@ -4977,7 +4977,7 @@ template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr subrange ranges::remove_if(I first, S last, Pred pred, Proj proj = {}); -template, Proj>> Pred> requires permutable> constexpr safe_subrange_t @@ -5148,7 +5148,7 @@ template S, class Proj = identity, indirect_relation> C = ranges::equal_to> constexpr subrange ranges::unique(I first, S last, C comp = {}, Proj proj = {}); -template, Proj>> C = ranges::equal_to> requires permutable> constexpr safe_subrange_t @@ -5458,7 +5458,7 @@ \end{itemdescr} \begin{itemdecl} -template +template requires permutable> constexpr safe_subrange_t ranges::rotate(R&& r, iterator_t middle); \end{itemdecl} @@ -5520,7 +5520,7 @@ \end{itemdescr} \begin{itemdecl} -template +template requires indirectly_copyable, O> constexpr ranges::rotate_copy_result, O> ranges::rotate_copy(R&& r, iterator_t middle, O result); @@ -6207,7 +6207,7 @@ template S, class Proj = identity, indirect_strict_weak_order> Comp = ranges::less> constexpr bool ranges::is_sorted(I first, S last, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> constexpr bool ranges::is_sorted(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -6242,7 +6242,7 @@ template S, class Proj = identity, indirect_strict_weak_order> Comp = ranges::less> constexpr I ranges::is_sorted_until(I first, S last, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> constexpr safe_iterator_t ranges::is_sorted_until(R&& r, Comp comp = {}, Proj proj = {}); @@ -6378,7 +6378,7 @@ indirect_strict_weak_order> Comp = ranges::less> constexpr I ranges::lower_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> constexpr safe_iterator_t @@ -6425,7 +6425,7 @@ template S, class T, class Proj = identity, indirect_strict_weak_order> Comp = ranges::less> constexpr I ranges::upper_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> constexpr safe_iterator_t @@ -6474,7 +6474,7 @@ indirect_strict_weak_order> Comp = ranges::less> constexpr subrange ranges::equal_range(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> constexpr safe_subrange_t @@ -6538,7 +6538,7 @@ indirect_strict_weak_order> Comp = ranges::less> constexpr bool ranges::binary_search(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> constexpr bool ranges::binary_search(R&& r, const T& value, Comp comp = {}, @@ -6623,7 +6623,7 @@ indirect_unary_predicate> Pred> constexpr subrange ranges::partition(I first, S last, Pred pred, Proj proj = {}); -template, Proj>> Pred> requires permutable> constexpr safe_subrange_t @@ -6825,7 +6825,7 @@ template S, class Proj = identity, indirect_unary_predicate> Pred> constexpr I ranges::partition_point(I first, S last, Pred pred, Proj proj = {}); -template, Proj>> Pred> constexpr safe_iterator_t ranges::partition_point(R&& r, Pred pred, Proj proj = {}); @@ -8125,7 +8125,7 @@ template S, class Proj = identity, indirect_strict_weak_order> Comp = ranges::less> constexpr I ranges::min_element(I first, S last, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> constexpr safe_iterator_t ranges::min_element(R&& r, Comp comp = {}, Proj proj = {}); @@ -8172,7 +8172,7 @@ template S, class Proj = identity, indirect_strict_weak_order> Comp = ranges::less> constexpr I ranges::max_element(I first, S last, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> constexpr safe_iterator_t ranges::max_element(R&& r, Comp comp = {}, Proj proj = {}); @@ -8222,7 +8222,7 @@ indirect_strict_weak_order> Comp = ranges::less> constexpr ranges::minmax_result ranges::minmax_element(I first, S last, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> constexpr ranges::minmax_result> ranges::minmax_element(R&& r, Comp comp = {}, Proj proj = {}); diff --git a/source/ranges.tex b/source/ranges.tex index 2e510d4815..87e3e2981b 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -87,7 +87,7 @@ concept input_range = @\seebelow@; template - concept ForwardRange = @\seebelow@; + concept forward_range = @\seebelow@; template concept bidirectional_range = @\seebelow@; @@ -215,10 +215,10 @@ template concept @\placeholder{tiny-range}@ = @\seebelow@; // \expos - template + template requires view && view && indirectly_comparable, iterator_t, ranges::equal_to> && - (ForwardRange || @\placeholder{tiny-range}@) + (forward_range || @\placeholder{tiny-range}@) class split_view; namespace views { inline constexpr @\unspec@ split = @\unspec@; } @@ -986,12 +986,12 @@ The \libconcept{output_range} concept specifies requirements of a \libconcept{range} type for which \tcode{ranges::begin} returns a model of \libconcept{output_iterator}\iref{iterator.concept.output}. -\libconcept{input_range}, \libconcept{ForwardRange}, \libconcept{bidirectional_range}, +\libconcept{input_range}, \libconcept{forward_range}, \libconcept{bidirectional_range}, and \libconcept{random_access_range} are defined similarly. \indexlibrary{\idxcode{output_range}}% \indexlibrary{\idxcode{input_range}}% -\indexlibrary{\idxcode{ForwardRange}}% +\indexlibrary{\idxcode{forward_range}}% \indexlibrary{\idxcode{bidirectional_range}}% \indexlibrary{\idxcode{random_access_range}}% \begin{itemdecl} @@ -1004,12 +1004,12 @@ range && input_iterator>; template - concept ForwardRange = + concept forward_range = input_range && forward_iterator>; template concept bidirectional_range = - ForwardRange && bidirectional_iterator>; + forward_range && bidirectional_iterator>; template concept random_access_range = @@ -1106,10 +1106,10 @@ return static_cast(*this); } public: - constexpr bool empty() requires ForwardRange { + constexpr bool empty() requires forward_range { return ranges::begin(derived()) == ranges::end(derived()); } - constexpr bool empty() const requires ForwardRange { + constexpr bool empty() const requires forward_range { return ranges::begin(derived()) == ranges::end(derived()); } @@ -1130,17 +1130,17 @@ return to_address(ranges::begin(derived())); } - constexpr auto size() requires ForwardRange && + constexpr auto size() requires forward_range && sized_sentinel_for, iterator_t> { return ranges::end(derived()) - ranges::begin(derived()); } - constexpr auto size() const requires ForwardRange && + constexpr auto size() const requires forward_range && sized_sentinel_for, iterator_t> { return ranges::end(derived()) - ranges::begin(derived()); } - constexpr decltype(auto) front() requires ForwardRange; - constexpr decltype(auto) front() const requires ForwardRange; + constexpr decltype(auto) front() requires forward_range; + constexpr decltype(auto) front() const requires forward_range; constexpr decltype(auto) back() requires bidirectional_range && common_range; constexpr decltype(auto) back() const @@ -1169,8 +1169,8 @@ \indexlibrary{\idxcode{view_interface}!\idxcode{front}}% \begin{itemdecl} -constexpr decltype(auto) front() requires ForwardRange; -constexpr decltype(auto) front() const requires ForwardRange; +constexpr decltype(auto) front() requires forward_range; +constexpr decltype(auto) front() const requires forward_range; \end{itemdecl} \begin{itemdescr} @@ -2770,7 +2770,7 @@ constexpr iterator& operator++(); constexpr void operator++(int); - constexpr iterator operator++(int) requires ForwardRange; + constexpr iterator operator++(int) requires forward_range; constexpr iterator& operator--() requires bidirectional_range; constexpr iterator operator--(int) requires bidirectional_range; @@ -2798,7 +2798,7 @@ \item If \tcode{V} models \libconcept{bidirectional_range}, then \tcode{iterator_concept} denotes \tcode{bidirectional_iterator_tag}. -\item Otherwise, if \tcode{V} models \libconcept{ForwardRange}, then +\item Otherwise, if \tcode{V} models \libconcept{forward_range}, then \tcode{iterator_concept} denotes \tcode{forward_iterator_tag}. \item Otherwise, \tcode{iterator_concept} denotes \tcode{input_iterator_tag}. @@ -2888,7 +2888,7 @@ \indexlibrary{\idxcode{operator++}!\idxcode{filter_view::iterator}}% \begin{itemdecl} -constexpr iterator operator++(int) requires ForwardRange; +constexpr iterator operator++(int) requires forward_range; \end{itemdecl} \begin{itemdescr} @@ -3246,7 +3246,7 @@ constexpr iterator& operator++(); constexpr void operator++(int); - constexpr iterator operator++(int) requires ForwardRange; + constexpr iterator operator++(int) requires forward_range; constexpr iterator& operator--() requires bidirectional_range; constexpr iterator operator--(int) requires bidirectional_range; @@ -3309,7 +3309,7 @@ \item Otherwise, if \tcode{V} models \libconcept{bidirectional_range}, then \tcode{iterator_concept} denotes \tcode{bidirectional_iterator_tag}. -\item Otherwise, if \tcode{V} models \libconcept{ForwardRange}, then +\item Otherwise, if \tcode{V} models \libconcept{forward_range}, then \tcode{iterator_concept} denotes \tcode{forward_iterator_tag}. \item Otherwise, \tcode{iterator_concept} denotes \tcode{input_iterator_tag}. @@ -3382,7 +3382,7 @@ \indexlibrary{\idxcode{operator++}!\idxcode{transform_view::iterator}} \begin{itemdecl} -constexpr iterator operator++(int) requires ForwardRange; +constexpr iterator operator++(int) requires forward_range; \end{itemdecl} \begin{itemdescr} @@ -4350,8 +4350,8 @@ } constexpr auto end() { - if constexpr (ForwardRange && - is_reference_v && ForwardRange && + if constexpr (forward_range && + is_reference_v && forward_range && common_range && common_range) return iterator<@\placeholder{simple-view}@>{*this, ranges::end(base_)}; else @@ -4361,9 +4361,9 @@ constexpr auto end() const requires input_range && is_reference_v> { - if constexpr (ForwardRange && + if constexpr (forward_range && is_reference_v> && - ForwardRange> && + forward_range> && common_range && common_range>) return iterator{*this, ranges::end(base_)}; @@ -4443,8 +4443,8 @@ constexpr iterator& operator++(); constexpr void operator++(int); constexpr iterator operator++(int) - requires ref_is_glvalue && ForwardRange && - ForwardRange>; + requires ref_is_glvalue && forward_range && + forward_range>; constexpr iterator& operator--() requires ref_is_glvalue && bidirectional_range && @@ -4478,7 +4478,7 @@ \libconcept{bidirectional_range}, then \tcode{iterator_concept} denotes \tcode{bidirectional_iterator_tag}. \item Otherwise, if \tcode{Base} and \tcode{range_reference_t} - each model \libconcept{ForwardRange}, then \tcode{iterator_concept} denotes + each model \libconcept{forward_range}, then \tcode{iterator_concept} denotes \tcode{forward_iterator_tag}. \end{itemize} \item Otherwise, \tcode{iterator_concept} denotes \tcode{input_iterator_tag}. @@ -4617,8 +4617,8 @@ \indexlibrary{\idxcode{operator++}!\idxcode{join_view::iterator}} \begin{itemdecl} constexpr iterator operator++(int) - requires ref_is_glvalue && ForwardRange && - ForwardRange>; + requires ref_is_glvalue && forward_range && + forward_range>; \end{itemdecl} \begin{itemdescr} @@ -4791,15 +4791,15 @@ requires { typename @\placeholdernc{require-constant}@::size()>; } && (remove_reference_t::size() <= 1); - template + template requires view && view && indirectly_comparable, iterator_t, ranges::equal_to> && - (ForwardRange || @\placeholdernc{tiny-range}@) + (forward_range || @\placeholdernc{tiny-range}@) class split_view : public view_interface> { private: V base_ = V(); // \expos Pattern pattern_ = Pattern(); // \expos - iterator_t current_ = iterator_t(); // \expos, present only if \tcode{!ForwardRange} + iterator_t current_ = iterator_t(); // \expos, present only if \tcode{!forward_range} // \ref{range.split.outer}, class template \tcode{split_view::outer_iterator} template struct outer_iterator; // \expos // \ref{range.split.inner}, class template \tcode{split_view::inner_iterator} @@ -4808,7 +4808,7 @@ split_view() = default; constexpr split_view(V base, Pattern pattern); - template + template requires constructible_from> && constructible_from> constexpr split_view(R&& r, P&& p); @@ -4819,7 +4819,7 @@ constexpr split_view(R&& r, range_value_t e); constexpr auto begin() { - if constexpr (ForwardRange) + if constexpr (forward_range) return outer_iterator<@\placeholder{simple-view}@>{*this, ranges::begin(base_)}; else { current_ = ranges::begin(base_); @@ -4827,16 +4827,16 @@ } } - constexpr auto begin() const requires ForwardRange && ForwardRange { + constexpr auto begin() const requires forward_range && forward_range { return outer_iterator{*this, ranges::begin(base_)}; } - constexpr auto end() requires ForwardRange && common_range { + constexpr auto end() requires forward_range && common_range { return outer_iterator<@\placeholder{simple-view}@>{*this, ranges::end(base_)}; } constexpr auto end() const { - if constexpr (ForwardRange && ForwardRange && common_range) + if constexpr (forward_range && forward_range && common_range) return outer_iterator{*this, ranges::end(base_)}; else return default_sentinel; @@ -4865,7 +4865,7 @@ \indexlibrary{\idxcode{split_view}!\idxcode{split_view}}% \begin{itemdecl} -template +template requires constructible_from> && constructible_from> constexpr split_view(R&& r, P&& p); @@ -4906,12 +4906,12 @@ using Base = // \expos conditional_t; Parent* parent_ = nullptr; // \expos - iterator_t current_ = // \expos, present only if \tcode{V} models \libconcept{ForwardRange} + iterator_t current_ = // \expos, present only if \tcode{V} models \libconcept{forward_range} iterator_t(); public: using iterator_concept = - conditional_t, forward_iterator_tag, input_iterator_tag>; + conditional_t, forward_iterator_tag, input_iterator_tag>; using iterator_category = input_iterator_tag; // \ref{range.split.outer.value}, class \tcode{split_view::outer_iterator::value_type} struct value_type; @@ -4919,9 +4919,9 @@ outer_iterator() = default; constexpr explicit outer_iterator(Parent& parent) - requires (!ForwardRange); + requires (!forward_range); constexpr outer_iterator(Parent& parent, iterator_t current) - requires ForwardRange; + requires forward_range; constexpr outer_iterator(outer_iterator i) requires Const && convertible_to, iterator_t>; @@ -4929,7 +4929,7 @@ constexpr outer_iterator& operator++(); constexpr decltype(auto) operator++(int) { - if constexpr (ForwardRange) { + if constexpr (forward_range) { auto tmp = *this; ++*this; return tmp; @@ -4938,7 +4938,7 @@ } friend constexpr bool operator==(const outer_iterator& x, const outer_iterator& y) - requires ForwardRange; + requires forward_range; friend constexpr bool operator==(const outer_iterator& x, default_sentinel_t); }; @@ -4949,12 +4949,12 @@ Many of the following specifications refer to the notional member \tcode{\placeholder{current}} of \tcode{outer_iterator}. \tcode{\placeholder{current}} is equivalent to \tcode{current_} if \tcode{V} -models \libconcept{ForwardRange}, and \tcode{parent_->current_} otherwise. +models \libconcept{forward_range}, and \tcode{parent_->current_} otherwise. \indexlibrary{\idxcode{outer_iterator}!\idxcode{split_view::outer_iterator}}% \begin{itemdecl} constexpr explicit outer_iterator(Parent& parent) - requires (!ForwardRange); + requires (!forward_range); \end{itemdecl} \begin{itemdescr} @@ -4965,7 +4965,7 @@ \indexlibrary{\idxcode{outer_iterator}!\idxcode{split_view::outer_iterator}}% \begin{itemdecl} constexpr outer_iterator(Parent& parent, iterator_t current) - requires ForwardRange; + requires forward_range; \end{itemdecl} \begin{itemdescr} @@ -5025,7 +5025,7 @@ \indexlibrary{\idxcode{operator==}!\idxcode{split_view::outer_iterator}}% \begin{itemdecl} friend constexpr bool operator==(const outer_iterator& x, const outer_iterator& y) - requires ForwardRange; + requires forward_range; \end{itemdecl} \begin{itemdescr} @@ -5118,7 +5118,7 @@ constexpr inner_iterator& operator++(); constexpr decltype(auto) operator++(int) { - if constexpr (ForwardRange) { + if constexpr (forward_range) { auto tmp = *this; ++*this; return tmp; @@ -5127,7 +5127,7 @@ } friend constexpr bool operator==(const inner_iterator& x, const inner_iterator& y) - requires ForwardRange; + requires forward_range; friend constexpr bool operator==(const inner_iterator& x, default_sentinel_t); @@ -5170,7 +5170,7 @@ \effects Equivalent to: \begin{codeblock} incremented_ = true; -if constexpr (!ForwardRange) { +if constexpr (!forward_range) { if constexpr (Pattern::size() == 0) { return *this; } @@ -5183,7 +5183,7 @@ \indexlibrary{\idxcode{operator==}!\idxcode{split_view::inner_iterator}}% \begin{itemdecl} friend constexpr bool operator==(const inner_iterator& x, const inner_iterator& y) - requires ForwardRange; + requires forward_range; \end{itemdecl} \begin{itemdescr} @@ -5289,7 +5289,7 @@ template size_t count(ForwardIterator first, ForwardIterator last); -template +template void my_algo(R&& r) { auto&& common = common_view{r}; auto cnt = count(common.begin(), common.end()); @@ -5926,8 +5926,8 @@ { return get(*current_); } constexpr iterator& operator++(); - constexpr void operator++(int) requires (!ForwardRange); - constexpr iterator operator++(int) requires ForwardRange; + constexpr void operator++(int) requires (!forward_range); + constexpr iterator operator++(int) requires forward_range; constexpr iterator& operator--() requires bidirectional_range; constexpr iterator operator--(int) requires bidirectional_range; @@ -6021,7 +6021,7 @@ \end{itemdescr} \begin{itemdecl} -constexpr void operator++(int) requires (!ForwardRange); +constexpr void operator++(int) requires (!forward_range); \end{itemdecl} \begin{itemdescr} @@ -6031,7 +6031,7 @@ \end{itemdescr} \begin{itemdecl} -constexpr iterator operator++(int) requires ForwardRange; +constexpr iterator operator++(int) requires forward_range; \end{itemdecl} \begin{itemdescr} From 5c00353357befbb92b93d03c9b3d8d96c0a5c3fc Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:54:14 -0700 Subject: [PATCH 75/84] [everywhere] Rename exposition-only concept 'Decrementable' to 'decrementable'. --- source/ranges.tex | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 87e3e2981b..c171682d48 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1769,7 +1769,7 @@ \begin{codeblock} namespace std::ranges { template - concept @\placeholdernc{Decrementable}@ = // \expos + concept @\placeholdernc{decrementable}@ = // \expos @\seebelow@; template concept @\placeholdernc{Advanceable}@ = // \expos @@ -1828,10 +1828,10 @@ \end{itemize} \pnum -The exposition-only \tcode{\placeholder{Decrementable}} concept is equivalent to: +The exposition-only \tcode{\placeholder{decrementable}} concept is equivalent to: \begin{itemdecl} template - concept @\placeholder{Decrementable}@ = + concept @\placeholder{decrementable}@ = incrementable && requires(I i) { { --i } -> same_as; { i-- } -> same_as; @@ -1845,7 +1845,7 @@ \pnum Let \tcode{a} and \tcode{b} be equal objects of type \tcode{I}. -\tcode{I} models \tcode{\placeholdernc{Decrementable}} only if +\tcode{I} models \tcode{\placeholdernc{decrementable}} only if \begin{itemize} \item If \tcode{a} and \tcode{b} are decrementable, then the following are all true: @@ -1865,7 +1865,7 @@ \begin{itemdecl} template concept @\placeholder{Advanceable}@ = - @\placeholdernc{Decrementable}@ && totally_ordered && + @\placeholdernc{decrementable}@ && totally_ordered && requires(I i, const I j, const @\placeholdernc{IOTA-DIFF-T}@(I) n) { { i += n } -> same_as; { i -= n } -> same_as; @@ -2020,8 +2020,8 @@ constexpr void operator++(int); constexpr iterator operator++(int) requires incrementable; - constexpr iterator& operator--() requires @\placeholdernc{Decrementable}@; - constexpr iterator operator--(int) requires @\placeholdernc{Decrementable}@; + constexpr iterator& operator--() requires @\placeholdernc{decrementable}@; + constexpr iterator operator--(int) requires @\placeholdernc{decrementable}@; constexpr iterator& operator+=(difference_type n) requires @\placeholdernc{Advanceable}@; @@ -2063,7 +2063,7 @@ \begin{itemize} \item If \tcode{W} models \tcode{\placeholder{Advanceable}}, then \tcode{iterator_category} is \tcode{random_access_iterator_tag}. -\item Otherwise, if \tcode{W} models \tcode{\placeholder{Decrementable}}, then +\item Otherwise, if \tcode{W} models \tcode{\placeholder{decrementable}}, then \tcode{iterator_category} is \tcode{bidirectional_iterator_tag}. \item Otherwise, if \tcode{W} models \libconcept{incrementable}, then \tcode{iterator_category} is \tcode{forward_iterator_tag}. @@ -2142,7 +2142,7 @@ \indexlibrary{\idxcode{operator\dcr}!\idxcode{iota_view::iterator}} \begin{itemdecl} -constexpr iterator& operator--() requires @\placeholdernc{Decrementable}@; +constexpr iterator& operator--() requires @\placeholdernc{decrementable}@; \end{itemdecl} \begin{itemdescr} @@ -2156,7 +2156,7 @@ \indexlibrary{\idxcode{operator\dcr}!\idxcode{iota_view::iterator}} \begin{itemdecl} -constexpr iterator operator--(int) requires @\placeholdernc{Decrementable}@; +constexpr iterator operator--(int) requires @\placeholdernc{decrementable}@; \end{itemdecl} \begin{itemdescr} From 731832237195a5d2dff8f6185efcd0525198da64 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:55:09 -0700 Subject: [PATCH 76/84] [everywhere] Rename exposition-only concept 'Advanceable' to 'advanceable'. --- source/ranges.tex | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index c171682d48..82af1c4654 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1772,7 +1772,7 @@ concept @\placeholdernc{decrementable}@ = // \expos @\seebelow@; template - concept @\placeholdernc{Advanceable}@ = // \expos + concept @\placeholdernc{advanceable}@ = // \expos @\seebelow@; template @@ -1861,10 +1861,10 @@ \end{itemdescr} \pnum -The exposition-only \tcode{\placeholder{Advanceable}} concept is equivalent to: +The exposition-only \tcode{\placeholder{advanceable}} concept is equivalent to: \begin{itemdecl} template - concept @\placeholder{Advanceable}@ = + concept @\placeholder{advanceable}@ = @\placeholdernc{decrementable}@ && totally_ordered && requires(I i, const I j, const @\placeholdernc{IOTA-DIFF-T}@(I) n) { { i += n } -> same_as; @@ -1881,7 +1881,7 @@ \tcode{b} is reachable from \tcode{a} after \tcode{n} applications of \tcode{++a}, for some value \tcode{n} of type \tcode{D}. -\tcode{I} models \tcode{\placeholdernc{Advanceable}} only if +\tcode{I} models \tcode{\placeholdernc{advanceable}} only if \begin{itemize} \item \tcode{(a += n)} is equal to \tcode{b}. \item \tcode{addressof(a += n)} is equal to \tcode{addressof(a)}. @@ -1993,7 +1993,7 @@ \pnum \remarks The expression in the \grammarterm{requires-clause} is equivalent to \begin{codeblock} -(same_as && Advanceable) || (integral && integral) || +(same_as && @\placeholder{advanceable}@) || (integral && integral) || sized_sentinel_for \end{codeblock} \end{itemdescr} @@ -2024,11 +2024,11 @@ constexpr iterator operator--(int) requires @\placeholdernc{decrementable}@; constexpr iterator& operator+=(difference_type n) - requires @\placeholdernc{Advanceable}@; + requires @\placeholdernc{advanceable}@; constexpr iterator& operator-=(difference_type n) - requires @\placeholdernc{Advanceable}@; + requires @\placeholdernc{advanceable}@; constexpr W operator[](difference_type n) const - requires @\placeholdernc{Advanceable}@; + requires @\placeholdernc{advanceable}@; friend constexpr bool operator==(const iterator& x, const iterator& y) requires equality_comparable; @@ -2046,14 +2046,14 @@ requires totally_ordered && ThreeWayComparable; friend constexpr iterator operator+(iterator i, difference_type n) - requires @\placeholdernc{Advanceable}@; + requires @\placeholdernc{advanceable}@; friend constexpr iterator operator+(difference_type n, iterator i) - requires @\placeholdernc{Advanceable}@; + requires @\placeholdernc{advanceable}@; friend constexpr iterator operator-(iterator i, difference_type n) - requires @\placeholdernc{Advanceable}@; + requires @\placeholdernc{advanceable}@; friend constexpr difference_type operator-(const iterator& x, const iterator& y) - requires @\placeholdernc{Advanceable}@; + requires @\placeholdernc{advanceable}@; }; } \end{codeblock} @@ -2061,7 +2061,7 @@ \pnum \tcode{iterator::iterator_category} is defined as follows: \begin{itemize} -\item If \tcode{W} models \tcode{\placeholder{Advanceable}}, then +\item If \tcode{W} models \tcode{\placeholder{advanceable}}, then \tcode{iterator_category} is \tcode{random_access_iterator_tag}. \item Otherwise, if \tcode{W} models \tcode{\placeholder{decrementable}}, then \tcode{iterator_category} is \tcode{bidirectional_iterator_tag}. @@ -2172,7 +2172,7 @@ \indexlibrary{\idxcode{operator+=}!\idxcode{iota_view::iterator}} \begin{itemdecl} constexpr iterator& operator+=(difference_type n) - requires @\placeholdernc{Advanceable}@; + requires @\placeholdernc{advanceable}@; \end{itemdecl} \begin{itemdescr} @@ -2194,7 +2194,7 @@ \indexlibrary{\idxcode{operator-=}!\idxcode{iota_view::iterator}} \begin{itemdecl} constexpr iterator& operator-=(difference_type n) - requires @\placeholdernc{Advanceable}@; + requires @\placeholdernc{advanceable}@; \end{itemdecl} \begin{itemdescr} @@ -2216,7 +2216,7 @@ \indexlibrary{\idxcode{operator[]}!\idxcode{iota_view::iterator}} \begin{itemdecl} constexpr W operator[](difference_type n) const - requires @\placeholdernc{Advanceable}@; + requires @\placeholdernc{advanceable}@; \end{itemdecl} \begin{itemdescr} @@ -2295,7 +2295,7 @@ \indexlibrary{\idxcode{operator+}!\idxcode{iota_view::iterator}} \begin{itemdecl} friend constexpr iterator operator+(iterator i, difference_type n) - requires @\placeholdernc{Advanceable}@; + requires @\placeholdernc{advanceable}@; \end{itemdecl} \begin{itemdescr} @@ -2306,7 +2306,7 @@ \indexlibrary{\idxcode{operator+}!\idxcode{iota_view::iterator}} \begin{itemdecl} friend constexpr iterator operator+(difference_type n, iterator i) - requires @\placeholdernc{Advanceable}@; + requires @\placeholdernc{advanceable}@; \end{itemdecl} \begin{itemdescr} @@ -2317,7 +2317,7 @@ \indexlibrary{\idxcode{operator-}!\idxcode{iota_view::iterator}} \begin{itemdecl} friend constexpr iterator operator-(iterator i, difference_type n) - requires @\placeholdernc{Advanceable}@; + requires @\placeholdernc{advanceable}@; \end{itemdecl} \begin{itemdescr} @@ -2328,7 +2328,7 @@ \indexlibrary{\idxcode{operator-}!\idxcode{iota_view::iterator}} \begin{itemdecl} friend constexpr difference_type operator-(const iterator& x, const iterator& y) - requires @\placeholdernc{Advanceable}@; + requires @\placeholdernc{advanceable}@; \end{itemdecl} \begin{itemdescr} From 731b30f337f7870d35acba2989ea4f43f55f42fa Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:57:14 -0700 Subject: [PATCH 77/84] [everywhere] Rename concept 'ThreeWayComparable' to 'three_way_comparable'. --- source/containers.tex | 8 ++++---- source/ranges.tex | 12 ++++++------ source/support.tex | 17 +++++++++-------- source/time.tex | 2 +- source/utilities.tex | 4 ++-- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 45344b96e2..24b4216aaf 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -9398,7 +9398,7 @@ bool operator<=(const queue& x, const queue& y); template bool operator>=(const queue& x, const queue& y); - template + template compare_three_way_result_t operator<=>(const queue& x, const queue& y); @@ -9440,7 +9440,7 @@ bool operator<=(const stack& x, const stack& y); template bool operator>=(const stack& x, const stack& y); - template + template compare_three_way_result_t operator<=>(const stack& x, const stack& y); @@ -9678,7 +9678,7 @@ \indexlibrary{\idxcode{operator<=>}!\idxcode{queue}}% \begin{itemdecl} -template +template compare_three_way_result_t operator<=>(const queue& x, const queue& y); \end{itemdecl} @@ -10238,7 +10238,7 @@ \indexlibrary{\idxcode{operator<=>}!\idxcode{stack}}% \begin{itemdecl} -template +template compare_three_way_result_t operator<=>(const stack& x, const stack& y); \end{itemdecl} diff --git a/source/ranges.tex b/source/ranges.tex index 82af1c4654..53c911131c 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -2043,7 +2043,7 @@ requires totally_ordered; friend constexpr compare_three_way_result_t operator<=>( const iterator& x, const iterator& y) - requires totally_ordered && ThreeWayComparable; + requires totally_ordered && three_way_comparable; friend constexpr iterator operator+(iterator i, difference_type n) requires @\placeholdernc{advanceable}@; @@ -2283,7 +2283,7 @@ \begin{itemdecl} friend constexpr compare_three_way_result_t operator<=>(const iterator& x, const iterator& y) - requires totally_ordered && ThreeWayComparable; + requires totally_ordered && three_way_comparable; \end{itemdecl} \begin{itemdescr} @@ -3272,7 +3272,7 @@ requires random_access_range; friend constexpr compare_three_way_result_t> operator<=>(const iterator& x, const iterator& y) - requires random_access_range && ThreeWayComparable>; + requires random_access_range && three_way_comparable>; friend constexpr iterator operator+(iterator i, difference_type n) requires random_access_range; @@ -3513,7 +3513,7 @@ \begin{itemdecl} friend constexpr compare_three_way_result_t> operator<=>(const iterator& x, const iterator& y) - requires random_access_range && ThreeWayComparable>; + requires random_access_range && three_way_comparable>; \end{itemdecl} \begin{itemdescr} @@ -5955,7 +5955,7 @@ requires random_access_range; friend constexpr compare_three_way_result_t> operator<=>(const iterator& x, const iterator& y) - requires random_access_range && ThreeWayComparable>; + requires random_access_range && three_way_comparable>; friend constexpr iterator operator+(const iterator& x, difference_type y) requires random_access_range; @@ -6171,7 +6171,7 @@ \begin{itemdecl} friend constexpr compare_three_way_result_t> operator<=>(const iterator& x, const iterator& y) - requires random_access_range && ThreeWayComparable>; + requires random_access_range && three_way_comparable>; \end{itemdecl} \begin{itemdescr} diff --git a/source/support.tex b/source/support.tex index 340d836c63..6616863891 100644 --- a/source/support.tex +++ b/source/support.tex @@ -4021,9 +4021,9 @@ template using common_comparison_category_t = typename common_comparison_category::type; - // \ref{cmp.concept}, concept \tcode{ThreeWayComparable} + // \ref{cmp.concept}, concept \tcode{three_way_comparable} template - concept ThreeWayComparable = @\seebelow@; + concept three_way_comparable = @\seebelow@; template concept ThreeWayComparableWith = @\seebelow@; @@ -4709,7 +4709,7 @@ \end{note} \end{itemdescr} -\rSec2[cmp.concept]{Concept \tcode{ThreeWayComparable}} +\rSec2[cmp.concept]{Concept \tcode{three_way_comparable}} \begin{codeblock} template @@ -4757,9 +4757,10 @@ \tcode{bool(u <= t) == bool(t >= u)} is \tcode{true}. \end{itemize} +\indexlibrary{\idxcode{three_way_comparable}}% \begin{codeblock} template - concept ThreeWayComparable = + concept three_way_comparable = @\placeholder{weakly-equality-comparable-with}@ && (!convertible_to || @\placeholder{partially-ordered-with}@) && requires(const remove_reference_t& a, const remove_reference_t& b) { @@ -4771,7 +4772,7 @@ Let \tcode{a} and \tcode{b} be lvalues of type \tcode{const remove_reference_t}. \tcode{T} and \tcode{Cat} -model \tcode{\libconcept{ThreeWayComparable}} only if: +model \tcode{\libconcept{three_way_comparable}} only if: \begin{itemize} \item \tcode{(a <=> b == 0) == bool(a == b)} is \tcode{true}; @@ -4804,10 +4805,10 @@ concept ThreeWayComparableWith = @\placeholder{weakly-equality-comparable-with}@ && (!convertible_to || @\placeholder{partially-ordered-with}@) && - ThreeWayComparable && - ThreeWayComparable && + three_way_comparable && + three_way_comparable && common_reference_with&, const remove_reference_t&> && - ThreeWayComparable< + three_way_comparable< common_reference_t&, const remove_reference_t&>, Cat> && requires(const remove_reference_t& t, const remove_reference_t& u) { { t <=> u } -> @\placeholder{compares-as}@; diff --git a/source/time.tex b/source/time.tex index db94a82ec7..13e1a9a6b3 100644 --- a/source/time.tex +++ b/source/time.tex @@ -1701,7 +1701,7 @@ \indexlibrarymember{operator<=>}{duration}% \begin{itemdecl} template - requires ThreeWayComparable + requires three_way_comparable constexpr auto operator<=>(const duration& lhs, const duration& rhs); \end{itemdecl} diff --git a/source/utilities.tex b/source/utilities.tex index ca5d229b52..f2d05ff1c9 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -3618,7 +3618,7 @@ constexpr bool operator<=(const variant&, const variant&); template constexpr bool operator>=(const variant&, const variant&); - template requires (ThreeWayComparable && ...) + template requires (three_way_comparable && ...) constexpr common_comparison_category_t...> operator<=>(const variant&, const variant&); @@ -4712,7 +4712,7 @@ \indexlibrarymember{operator<=>}{variant}% \begin{itemdecl} -template requires (ThreeWayComparable && ...) +template requires (three_way_comparable && ...) constexpr common_comparison_category_t...> operator<=>(const variant& v, const variant& w); \end{itemdecl} From c046b65ead6b11eacc4ec818ae6a21cd60efeca4 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 16:58:55 -0700 Subject: [PATCH 78/84] [everywhere] Rename concept 'ThreeWayComparableWith' to 'three_way_comparable_with'. --- source/iterators.tex | 8 ++++---- source/lib-intro.tex | 2 +- source/support.tex | 10 ++++++---- source/time.tex | 8 ++++---- source/utilities.tex | 20 ++++++++++---------- 5 files changed, 25 insertions(+), 23 deletions(-) diff --git a/source/iterators.tex b/source/iterators.tex index 0d8c37cb17..05812e9146 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -292,7 +292,7 @@ constexpr bool operator>=( const reverse_iterator& x, const reverse_iterator& y); - template Iterator2> + template Iterator2> constexpr compare_three_way_result_t operator<=>(const reverse_iterator& x, const reverse_iterator& y); @@ -347,7 +347,7 @@ template constexpr bool operator>=( const move_iterator& x, const move_iterator& y); - template Iterator2> + template Iterator2> constexpr compare_three_way_result_t operator<=>(const move_iterator& x, const move_iterator& y); @@ -3521,7 +3521,7 @@ \indexlibrarymember{operator<=>}{reverse_iterator}% \begin{itemdecl} -template Iterator2> +template Iterator2> constexpr compare_three_way_result_t operator<=>(const reverse_iterator& x, const reverse_iterator& y); @@ -4438,7 +4438,7 @@ \indexlibrarymember{operator<=>}{move_iterator}% \begin{itemdecl} -template Iterator2> +template Iterator2> constexpr compare_three_way_result_t operator<=>(const move_iterator& x, const move_iterator& y); diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 170f3481ef..79d3194552 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -722,7 +722,7 @@ { u < t } -> convertible_to; } { - if constexpr (ThreeWayComparableWith) { + if constexpr (three_way_comparable_with) { return t <=> u; } else { if (t < u) return weak_ordering::less; diff --git a/source/support.tex b/source/support.tex index 6616863891..6c0e80bb76 100644 --- a/source/support.tex +++ b/source/support.tex @@ -4025,7 +4025,7 @@ template concept three_way_comparable = @\seebelow@; template - concept ThreeWayComparableWith = @\seebelow@; + concept three_way_comparable_with = @\seebelow@; // \ref{cmp.result}, result of three-way comparison template struct compare_three_way_result; @@ -4800,9 +4800,10 @@ \libconcept{totally_ordered}\iref{concept.stricttotallyordered}. \end{itemize} +\indexlibrary{\idxcode{three_way_comparable_with}}% \begin{codeblock} template - concept ThreeWayComparableWith = + concept three_way_comparable_with = @\placeholder{weakly-equality-comparable-with}@ && (!convertible_to || @\placeholder{partially-ordered-with}@) && three_way_comparable && @@ -4823,7 +4824,7 @@ Let \tcode{C} be \tcode{common_reference_t\&, const remove_reference_t\&>}. \tcode{T}, \tcode{U}, and \tcode{Cat} -model \tcode{\libconcept{ThreeWayComparableWith}} only if: +model \tcode{\libconcept{three_way_comparable_with}} only if: \begin{itemize} \item \tcode{t <=> u} and \tcode{u <=> t} have the same domain; @@ -4888,10 +4889,11 @@ \end{codeblock} resolves to a built-in operator comparing pointers. +\indexlibrary{\idxcode{compare_three_way}}% \begin{codeblock} struct compare_three_way { template - requires ThreeWayComparableWith || @\placeholdernc{BUILTIN-PTR-THREE-WAY}@(T, U) + requires three_way_comparable_with || @\placeholdernc{BUILTIN-PTR-THREE-WAY}@(T, U) constexpr auto operator()(T&& t, U&& u) const; using is_transparent = @\unspec@; diff --git a/source/time.tex b/source/time.tex index 13e1a9a6b3..82fbcd6aff 100644 --- a/source/time.tex +++ b/source/time.tex @@ -207,7 +207,7 @@ template constexpr bool operator>=(const time_point& lhs, const time_point& rhs); - template Duration2> + template Duration2> constexpr auto operator<=>(const time_point& lhs, const time_point& rhs); @@ -790,7 +790,7 @@ bool operator>=(const leap& x, const sys_time& y); template bool operator>=(const sys_time& x, const leap& y); - template Duration> + template Duration> auto operator<=>(const leap& x, const sys_time& y); // \ref{time.zone.link}, class \tcode{link} @@ -2358,7 +2358,7 @@ \indexlibrarymember{operator>=}{time_point}% \begin{itemdecl} template Duration2> + three_way_comparable_with Duration2> constexpr auto operator<=>(const time_point& lhs, const time_point& rhs); \end{itemdecl} @@ -9654,7 +9654,7 @@ \indexlibrarymember{operator<=>}{leap}% \indexlibrarymember{operator<=>}{sys_time}% \begin{itemdecl} -template Duration> +template Duration> constexpr auto operator<=>(const leap& x, const sys_time& y) noexcept; \end{itemdecl} diff --git a/source/utilities.tex b/source/utilities.tex index f2d05ff1c9..7788d51b56 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -2061,7 +2061,7 @@ constexpr bool operator<=(const optional&, const optional&); template constexpr bool operator>=(const optional&, const optional&); - template U> + template U> constexpr compare_three_way_result_t operator<=>(const optional&, const optional&); @@ -2083,7 +2083,7 @@ template constexpr bool operator<=(const T&, const optional&); template constexpr bool operator>=(const optional&, const U&); template constexpr bool operator>=(const T&, const optional&); - template U> + template U> constexpr compare_three_way_result_t operator<=>(const optional&, const U&); @@ -3206,7 +3206,7 @@ \indexlibrarymember{operator<=>}{optional}% \begin{itemdecl} -template U> +template U> constexpr compare_three_way_result_t operator<=>(const optional& x, const optional& y); \end{itemdecl} @@ -3446,7 +3446,7 @@ \indexlibrarymember{operator<=>}{optional}% \begin{itemdecl} -template U> +template U> constexpr compare_three_way_result_t operator<=>(const optional& x, const U& v); \end{itemdecl} @@ -6681,8 +6681,8 @@ template bool operator>=(const unique_ptr& x, const unique_ptr& y); template - requires ThreeWayComparableWith::pointer, - typename unique_ptr::pointer> + requires three_way_comparable_with::pointer, + typename unique_ptr::pointer> compare_three_way_result_t::pointer, typename unique_ptr::pointer> operator<=>(const unique_ptr& x, const unique_ptr& y); @@ -6706,7 +6706,7 @@ template bool operator>=(nullptr_t, const unique_ptr& y); template - requires ThreeWayComparableWith::pointer, nullptr_t> + requires three_way_comparable_with::pointer, nullptr_t> compare_three_way_result_t::pointer, nullptr_t> operator<=>(const unique_ptr& x, nullptr_t); @@ -9675,8 +9675,8 @@ \indexlibrarymember{operator<=>}{unique_ptr}% \begin{itemdecl} template - requires ThreeWayComparableWith::pointer, - typename unique_ptr::pointer> + requires three_way_comparable_with::pointer, + typename unique_ptr::pointer> compare_three_way_result_t::pointer, typename unique_ptr::pointer> operator<=>(const unique_ptr& x, const unique_ptr& y); @@ -9773,7 +9773,7 @@ \indexlibrarymember{operator<=>}{unique_ptr}% \begin{itemdecl} template - requires ThreeWayComparableWith::pointer, nullptr_t> + requires three_way_comparable_with::pointer, nullptr_t> compare_three_way_result_t::pointer, nullptr_t> operator<=>(const unique_ptr& x, nullptr_t); \end{itemdecl} From 1f2669e287959ce650ffcafb1d413ef6ea084253 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 17:21:06 -0700 Subject: [PATCH 79/84] [everywhere] Rename exposition-only concept 'same-impl' to 'same-as-impl'. --- source/concepts.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 7dc9d888a2..f4b9118534 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -276,10 +276,10 @@ \indexlibrary{\idxcode{same_as}}% \begin{itemdecl} template - concept @\placeholdernc{same-impl}@ = is_same_v; // \expos + concept @\placeholdernc{same-as-impl}@ = is_same_v; // \expos template - concept same_as = @\placeholdernc{same-impl}@ && @\placeholdernc{same-impl}@; + concept same_as = @\placeholdernc{same-as-impl}@ && @\placeholdernc{same-as-impl}@; \end{itemdecl} \begin{itemdescr} From 115bf2806dcc97d29730ea4f06e52f8cb7534dda Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 17:18:46 -0700 Subject: [PATCH 80/84] Fix overfull hboxes. --- source/algorithms.tex | 10 ++++++---- source/concepts.tex | 3 ++- source/iterators.tex | 17 ++++++++++------- source/ranges.tex | 28 +++++++++++++++++++--------- 4 files changed, 37 insertions(+), 21 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 2ce6340f53..b25b757d43 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1436,8 +1436,8 @@ template using replace_copy_result = copy_result; - template S, class T1, class T2, output_iterator O, - class Proj = identity> + template S, class T1, class T2, + output_iterator O, class Proj = identity> requires indirectly_copyable && indirect_relation, const T1*> constexpr replace_copy_result @@ -1909,7 +1909,8 @@ namespace ranges { template using partial_sort_copy_result = copy_result; - template S1, random_access_iterator I2, sentinel_for S2, + template S1, + random_access_iterator I2, sentinel_for S2, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> requires indirectly_copyable && sortable && indirect_strict_weak_order, projected> @@ -2183,7 +2184,8 @@ } }; - template S, weakly_incrementable O1, weakly_incrementable O2, + template S, + weakly_incrementable O1, weakly_incrementable O2, class Proj = identity, indirect_unary_predicate> Pred> requires indirectly_copyable && indirectly_copyable constexpr partition_copy_result diff --git a/source/concepts.tex b/source/concepts.tex index f4b9118534..6da7d2c09e 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -1044,7 +1044,8 @@ \indexlibrary{\idxcode{regular}}% \begin{itemdecl} template - concept movable = is_object_v && move_constructible && assignable_from && swappable; + concept movable = is_object_v && move_constructible && + assignable_from && swappable; template concept copyable = copy_constructible && movable && assignable_from; template diff --git a/source/iterators.tex b/source/iterators.tex index 05812e9146..1707373eb6 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -513,13 +513,15 @@ \pnum The six categories of iterators correspond to the iterator concepts -\libconcept{input_iterator}\iref{iterator.concept.input}, -\libconcept{output_iterator}\iref{iterator.concept.output}, -\libconcept{forward_iterator}\iref{iterator.concept.forward}, -\libconcept{bidirectional_iterator}\iref{iterator.concept.bidir} -\libconcept{random_access_iterator}\iref{iterator.concept.random.access}, +\begin{itemize} +\item \libconcept{input_iterator}\iref{iterator.concept.input}, +\item \libconcept{output_iterator}\iref{iterator.concept.output}, +\item \libconcept{forward_iterator}\iref{iterator.concept.forward}, +\item \libconcept{bidirectional_iterator}\iref{iterator.concept.bidir} +\item \libconcept{random_access_iterator}\iref{iterator.concept.random.access}, and -\libconcept{contiguous_iterator}\iref{iterator.concept.contiguous}, +\item \libconcept{contiguous_iterator}\iref{iterator.concept.contiguous}, +\end{itemize} respectively. The generic term \defn{iterator} refers to any type that models the \libconcept{input_or_output_iterator} concept\iref{iterator.concept.iterator}. @@ -1536,7 +1538,8 @@ \pnum The \libconcept{sized_sentinel_for} concept specifies -requirements on an \libconcept{input_or_output_iterator} and a \libconcept{sentinel_for} +requirements on an \libconcept{input_or_output_iterator} and +a corresponding \libconcept{sentinel_for} that allow the use of the \tcode{-} operator to compute the distance between them in constant time. diff --git a/source/ranges.tex b/source/ranges.tex index 53c911131c..b17370029b 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -360,12 +360,17 @@ Otherwise, if \tcode{E} is an lvalue, \tcode{\placeholdernc{decay-copy}(E.end())} if it is a valid expression and its type \tcode{S} models - \tcode{sentinel_for}. + \begin{codeblock} + sentinel_for + \end{codeblock} \item Otherwise, \tcode{\placeholdernc{decay-copy}(end(E))} if it is a valid expression and its type \tcode{S} models - \tcode{sentinel_for} with overload + \begin{codeblock} + sentinel_for + \end{codeblock} + with overload resolution performed in a context that includes the declarations: \begin{codeblock} template void end(T&&) = delete; @@ -480,12 +485,17 @@ \item If \tcode{E} is an lvalue, \tcode{\placeholdernc{decay-copy}(E.rend())} if it is a valid expression and its type \tcode{S} models - \tcode{sentinel_for<\brk{}decltype(ranges::rbegin(E))>}. + \begin{codeblock} + sentinel_for + \end{codeblock} \item Otherwise, \tcode{\placeholdernc{decay-copy}(rend(E))} if it is a valid expression and its type \tcode{S} models - \tcode{sentinel_for} with overload + \begin{codeblock} + sentinel_for + \end{codeblock} + with overload resolution performed in a context that includes the declaration: \begin{codeblock} template void rend(T&&) = delete; @@ -4874,8 +4884,8 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{base_} with \tcode{views::all(std::forward(r))} and -\tcode{pattern_} with \tcode{views::all(std\brk{}::forward

(p))}. +Initializes \tcode{base_} with \tcode{views::all(std::forward(r))}, and +\tcode{pattern_} with \tcode{views::all(\brk{}std::forward

(p))}. \end{itemdescr} \indexlibrary{\idxcode{split_view}!\idxcode{split_view}}% @@ -4889,7 +4899,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{base_} with \tcode{views::all(std::forward(r))} and +Initializes \tcode{base_} with \tcode{views::all(std::forward(r))}, and \tcode{pattern_} with \tcode{single_view\{\brk{}std::move(e)\}}. \end{itemdescr} @@ -5252,10 +5262,10 @@ \begin{itemize} \item If \tcode{T} models \libconcept{input_or_output_iterator} and - \tcode{decltype((F))} models \tcode{\libconcept{convertible_to}>}, + \tcode{decltype((F))} models \tcode{\libconcept{convertible_to}>}, \begin{itemize} \item \tcode{subrange\{E, E + static_cast>(F)\}} - if \tcode{T} models \libconcept{random_access_iterator}. + if \tcode{T} models \libconcept{random_access_\-it\-er\-ator}. \item Otherwise, \tcode{subrange\{counted_iterator\{E, F\}, default_sentinel\}}. \end{itemize} From 058e65b19dea3a9e8be12da9b0699672116cb430 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Mon, 29 Jul 2019 15:02:38 -0700 Subject: [PATCH 81/84] [utilities] Use "\expos" instead of "exposition only" in declarations. --- source/utilities.tex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index 7788d51b56..2ff5d761d9 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -1705,7 +1705,7 @@ Given the exposition-only function: \begin{codeblock} template -constexpr T @\placeholdernc{make-from-tuple-impl}@(Tuple&& t, index_sequence) { // exposition only +constexpr T @\placeholdernc{make-from-tuple-impl}@(Tuple&& t, index_sequence) { // \expos return T(get(std::forward(t))...); } \end{codeblock} @@ -7924,7 +7924,7 @@ \begin{itemdecl} template -concept @\placeholdernc{no-throw-input-iterator}@ = // exposition only +concept @\placeholdernc{no-throw-input-iterator}@ = // \expos input_iterator && is_lvalue_reference_v> && same_as>, iter_value_t>; @@ -7947,7 +7947,7 @@ \begin{itemdecl} template -concept @\placeholdernc{no-throw-sentinel}@ = sentinel_for; // exposition only +concept @\placeholdernc{no-throw-sentinel}@ = sentinel_for; // \expos \end{itemdecl} \begin{itemdescr} @@ -7966,7 +7966,7 @@ \begin{itemdecl} template -concept @\placeholdernc{no-throw-input-range}@ = // exposition only +concept @\placeholdernc{no-throw-input-range}@ = // \expos range && @\placeholder{no-throw-input-iterator}@> && @\placeholdernc{no-throw-sentinel}@, iterator_t>; @@ -7981,7 +7981,7 @@ \begin{itemdecl} template -concept @\placeholdernc{no-throw-forward-iterator}@ = // exposition only +concept @\placeholdernc{no-throw-forward-iterator}@ = // \expos @\placeholder{no-throw-input-iterator}@ && forward_iterator && @\placeholdernc{no-throw-sentinel}@; @@ -7997,7 +7997,7 @@ \begin{itemdecl} template -concept @\placeholdernc{no-throw-forward-range}@ = // exposition only +concept @\placeholdernc{no-throw-forward-range}@ = // \expos @\placeholder{no-throw-input-range}@ && @\placeholder{no-throw-forward-iterator}@>; \end{itemdecl} From 7beed51f4388074f46fd55a7c5f559cd82b7c40c Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 30 Jul 2019 20:36:34 -0700 Subject: [PATCH 82/84] [alg.is.permutation] Add parameters to \libconcept{sized_sentinel_for} as suggested in PR #3099. --- source/algorithms.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index b25b757d43..4b4c31cb1c 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -3859,8 +3859,8 @@ \complexity No applications of the corresponding predicate and projections if: \begin{itemize} -\item \tcode{S1} and \tcode{I1} model \libconcept{sized_sentinel_for}, -\item \tcode{S2} and \tcode{I2} model \libconcept{sized_sentinel_for}, and +\item \tcode{S1} and \tcode{I1} model \tcode{\libconcept{sized_sentinel_for}}, +\item \tcode{S2} and \tcode{I2} model \tcode{\libconcept{sized_sentinel_for}}, and \item \tcode{last1 - first1 != last2 - first2}. \end{itemize} Otherwise, exactly \tcode{last1 - first1} applications From fbb0691134e39059adaa4a886e7d746b0e56c81c Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 31 Jul 2019 12:52:26 -0700 Subject: [PATCH 83/84] [concepts] Renamed concepts' section names to remove trailing prepositions for consistency. * concept.convertibleto => concept.convertible * concept.derivedfrom => concept.derived * concept.stricttotallyordered => concept.totallyordered --- source/concepts.tex | 12 ++++++------ source/iterators.tex | 2 +- source/lib-intro.tex | 2 +- source/support.tex | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 6da7d2c09e..b94f4cce6f 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -151,11 +151,11 @@ template concept same_as = @\seebelow@; - // \ref{concept.derivedfrom}, concept \libconcept{derived_from} + // \ref{concept.derived}, concept \libconcept{derived_from} template concept derived_from = @\seebelow@; - // \ref{concept.convertibleto}, concept \libconcept{convertible_to} + // \ref{concept.convertible}, concept \libconcept{convertible_to} template concept convertible_to = @\seebelow@; @@ -223,7 +223,7 @@ template concept equality_comparable_with = @\seebelow@; - // \ref{concept.stricttotallyordered}, concept \libconcept{totally_ordered} + // \ref{concept.totallyordered}, concept \libconcept{totally_ordered} template concept totally_ordered = @\seebelow@; template @@ -290,7 +290,7 @@ \end{note} \end{itemdescr} -\rSec2[concept.derivedfrom]{Concept \libconcept{derived_from}} +\rSec2[concept.derived]{Concept \libconcept{derived_from}} \indexlibrary{\idxcode{derived_from}}% \begin{itemdecl} @@ -309,7 +309,7 @@ \end{note} \end{itemdescr} -\rSec2[concept.convertibleto]{Concept \libconcept{convertible_to}} +\rSec2[concept.convertible]{Concept \libconcept{convertible_to}} \pnum The \libconcept{convertible_to} concept requires an expression of a particular @@ -951,7 +951,7 @@ \tcode{bool(t == u) == bool(C(t) == C(u))}. \end{itemdescr} -\rSec2[concept.stricttotallyordered]{Concept \libconcept{totally_ordered}} +\rSec2[concept.totallyordered]{Concept \libconcept{totally_ordered}} \indexlibrary{\idxcode{totally_ordered}}% \begin{itemdecl} diff --git a/source/iterators.tex b/source/iterators.tex index 1707373eb6..9e95e92656 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -1359,7 +1359,7 @@ \pnum All integer-class types model \libconcept{regular}\iref{concepts.object} and -\libconcept{totally_ordered}\iref{concept.stricttotallyordered}. +\libconcept{totally_ordered}\iref{concept.totallyordered}. \pnum A value-initialized object of integer-class type has value 0. diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 79d3194552..cfa259e339 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -533,7 +533,7 @@ result in the required semantics failing to be met. \begin{example} The required \tcode{<} operator of the \libconcept{totally_ordered} -concept\iref{concept.stricttotallyordered} does not meet the +concept\iref{concept.totallyordered} does not meet the semantic requirements of that concept when operating on NaNs. \end{example} This does not affect whether a type models the concept. diff --git a/source/support.tex b/source/support.tex index 6c0e80bb76..479ef83eb6 100644 --- a/source/support.tex +++ b/source/support.tex @@ -4797,7 +4797,7 @@ \end{itemize} \item If \tcode{Cat} is convertible to \tcode{strong_ordering}, \tcode{T} models - \libconcept{totally_ordered}\iref{concept.stricttotallyordered}. + \libconcept{totally_ordered}\iref{concept.totallyordered}. \end{itemize} \indexlibrary{\idxcode{three_way_comparable_with}}% @@ -4855,7 +4855,7 @@ \item if \tcode{Cat} is convertible to \tcode{strong_ordering}, \tcode{T} and \tcode{U} model - \tcode{\libconcept{totally_ordered_with}}\iref{concept.stricttotallyordered}. + \tcode{\libconcept{totally_ordered_with}}\iref{concept.totallyordered}. \end{itemize} \rSec2[cmp.result]{Result of three-way comparison} From aedd3f7850ae1a3bc58b18be88a6ce34f9787331 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Aug 2019 17:48:17 -0700 Subject: [PATCH 84/84] [algorithms] Fix some bad indentation in itemdecls. --- source/algorithms.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 4b4c31cb1c..2a14136950 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -3305,13 +3305,13 @@ requires indirectly_comparable constexpr subrange ranges::find_end(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, - Proj1 proj1 = {}, Proj2 proj2 = {}); + Proj1 proj1 = {}, Proj2 proj2 = {}); template requires indirectly_comparable, iterator_t, Pred, Proj1, Proj2> constexpr safe_subrange_t ranges::find_end(R1&& r1, R2&& r2, Pred pred = {}, - Proj1 proj1 = {}, Proj2 proj2 = {}); + Proj1 proj1 = {}, Proj2 proj2 = {}); \end{itemdecl} \begin{itemdescr} @@ -6767,7 +6767,7 @@ requires indirectly_copyable && indirectly_copyable constexpr ranges::partition_copy_result ranges::partition_copy(I first, S last, O1 out_true, O2 out_false, Pred pred, - Proj proj = {}); + Proj proj = {}); template, Proj>> Pred>