From 9a87982f05822ce2fc62ed88be720d299486857d Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Thu, 25 Jul 2019 08:45:21 -0700 Subject: [PATCH 01/10] 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 | 38 +++++++-------- source/utilities.tex | 6 +-- 5 files changed, 80 insertions(+), 80 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index f68441ae72..f21bef7c0e 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -3740,7 +3740,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 a2969a1163..d235330af3 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -561,7 +561,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 @@ -605,8 +605,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 a1e55fe57d..625394b367 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@; @@ -669,7 +669,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 @@ -731,7 +731,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 @@ -1126,7 +1126,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. @@ -1217,10 +1217,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}}% @@ -1240,7 +1240,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 @@ -1268,13 +1268,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}. @@ -1316,10 +1316,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} @@ -1358,7 +1358,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 @@ -1380,7 +1380,7 @@ WeaklyIncrementable; \end{codeblock} -\rSec3[iterator.concept.sentinel]{Concept \tcode{Sentinel}} +\rSec3[iterator.concept.sentinel]{Concept \libconcept{Sentinel}} \pnum The \libconcept{Sentinel} concept specifies the relationship @@ -1400,7 +1400,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. @@ -1418,7 +1418,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 @@ -1445,7 +1445,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}, @@ -1469,12 +1469,12 @@ counted iterators and their sentinels\iref{counted.iterator}. \end{example} -\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}, @@ -1492,12 +1492,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} @@ -1515,7 +1515,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; @@ -1528,7 +1528,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 equality comparison and @@ -2318,7 +2318,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)); @@ -2363,7 +2363,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); @@ -2731,9 +2731,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}. @@ -2753,12 +2753,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)}. @@ -2798,7 +2798,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} @@ -2978,7 +2978,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} @@ -3962,7 +3962,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} @@ -4370,7 +4370,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 5872a5dac8..671c82b245 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -320,7 +320,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}} @@ -357,7 +357,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}} @@ -430,7 +430,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. @@ -445,7 +445,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}} @@ -483,7 +483,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}} @@ -526,8 +526,8 @@ 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{SizedSentinel}\iref{iterator.concept.sizedsentinel} and - \tcode{Forward\-Iterator}. + \tcode{\libconcept{SizedSentinel}}\iref{iterator.concept.sizedsentinel} and + \tcode{\libconcept{Forward\-Iterator}}. However, \tcode{E} is evaluated only once. \item @@ -643,7 +643,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. @@ -655,7 +655,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 @@ -809,7 +809,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} \pnum @@ -822,7 +822,7 @@ \rSec2[range.view]{Views} \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}. @@ -893,11 +893,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}}% @@ -942,11 +942,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}}% @@ -1073,7 +1073,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} @@ -4870,7 +4870,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 977e5b5b39..f273fe2c8a 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -8118,7 +8118,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} @@ -8137,7 +8137,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} @@ -8168,7 +8168,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 cbc84ade41fa5c807e0d23b664411854bf0789be Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 26 Jul 2019 01:45:16 -0700 Subject: [PATCH 02/10] P1754R1 Rename concepts to standard_case for C++20, while we still can Fixed whitespace issues seen during review. Fixed additional inconsistencies in the Latex used for concept names. [concept.strictweakorder] Fix \indexlibrary for strict_weak_order. [ranges] Change ranges::view to ranges::views. Fixes #3015. --- source/algorithms.tex | 1590 ++++++++++++++++++++-------------------- source/concepts.tex | 446 +++++------ source/containers.tex | 4 +- source/expressions.tex | 4 +- source/iterators.tex | 984 ++++++++++++------------- source/lib-intro.tex | 8 +- source/numerics.tex | 18 +- source/ranges.tex | 1030 +++++++++++++------------- source/strings.tex | 2 +- source/utilities.tex | 187 ++--- 10 files changed, 2141 insertions(+), 2132 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index f21bef7c0e..789bd25b7b 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. @@ -617,11 +617,11 @@ ForwardIterator first, ForwardIterator last, Predicate pred); namespace ranges { - template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + template S, class Proj = identity, + indirect_unary_predicate> Pred> constexpr bool all_of(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> + template, Proj>> Pred> constexpr bool all_of(R&& r, Pred pred, Proj proj = {}); } @@ -633,11 +633,11 @@ ForwardIterator first, ForwardIterator last, Predicate pred); namespace ranges { - template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + template S, class Proj = identity, + indirect_unary_predicate> Pred> constexpr bool any_of(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> + template, Proj>> Pred> constexpr bool any_of(R&& r, Pred pred, Proj proj = {}); } @@ -649,11 +649,11 @@ ForwardIterator first, ForwardIterator last, Predicate pred); namespace ranges { - template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + template S, class Proj = identity, + indirect_unary_predicate> Pred> constexpr bool none_of(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> + template, Proj>> Pred> constexpr bool none_of(R&& r, Pred pred, Proj proj = {}); } @@ -671,24 +671,24 @@ [[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)}; } }; - template S, class Proj = identity, - IndirectUnaryInvocable> Fun> + template S, class Proj = identity, + indirectly_unary_invocable> Fun> constexpr for_each_result for_each(I first, S last, Fun f, Proj proj = {}); - template, Proj>> Fun> + template, Proj>> Fun> constexpr for_each_result, Fun> for_each(R&& r, Fun f, Proj proj = {}); } @@ -723,25 +723,25 @@ Predicate pred); namespace ranges { - template S, class T, class Proj = identity> - requires IndirectRelation, const T*> + 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 - requires IndirectRelation, Proj>, const T*> + template + requires indirect_relation, Proj>, const T*> constexpr safe_iterator_t find(R&& r, const T& value, Proj proj = {}); - template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + template S, class Proj = identity, + indirect_unary_predicate> Pred> constexpr I find_if(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> + template, Proj>> Pred> constexpr safe_iterator_t find_if(R&& r, Pred pred, Proj proj = {}); - template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + 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> + template, Proj>> Pred> constexpr safe_iterator_t find_if_not(R&& r, Pred pred, Proj proj = {}); } @@ -770,15 +770,15 @@ BinaryPredicate pred); namespace ranges { - template S1, ForwardIterator I2, Sentinel S2, + 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 = {}); @@ -808,16 +808,16 @@ BinaryPredicate pred); namespace ranges { - template S1, ForwardIterator I2, Sentinel S2, + 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> + template, Proj1>, + projected, Proj2>> Pred = ranges::equal_to> constexpr safe_iterator_t find_first_of(R1&& r1, R2&& r2, Pred pred = {}, @@ -843,12 +843,12 @@ BinaryPredicate pred); namespace ranges { - template S, class Proj = identity, - IndirectRelation> Pred = ranges::equal_to> + template S, class Proj = identity, + indirect_relation> Pred = ranges::equal_to> constexpr I adjacent_find(I first, S last, Pred pred = {}, Proj proj = {}); - template, Proj>> Pred = ranges::equal_to> + template, Proj>> Pred = ranges::equal_to> constexpr safe_iterator_t adjacent_find(R&& r, Pred pred = {}, Proj proj = {}); } @@ -870,20 +870,20 @@ ForwardIterator first, ForwardIterator last, Predicate pred); namespace ranges { - template S, class T, class Proj = identity> - requires IndirectRelation, const T*> + template S, class T, class Proj = identity> + 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*> + template + requires indirect_relation, Proj>, const T*> constexpr iter_difference_t> count(R&& r, const T& value, Proj proj = {}); - template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + template S, class Proj = identity, + indirect_unary_predicate> Pred> constexpr iter_difference_t count_if(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> + template, Proj>> Pred> constexpr iter_difference_t> count_if(R&& r, Pred pred, Proj proj = {}); } @@ -937,29 +937,29 @@ [[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)}; } }; - template S1, InputIterator I2, Sentinel S2, + 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 = {}); @@ -1000,15 +1000,15 @@ BinaryPredicate pred); namespace ranges { - template S1, InputIterator I2, Sentinel S2, + 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 = {}); } @@ -1029,16 +1029,16 @@ BinaryPredicate pred); namespace ranges { - template S1, ForwardIterator I2, - Sentinel S2, class Pred = ranges::equal_to, class Proj1 = identity, + 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 = {}); } @@ -1067,16 +1067,16 @@ BinaryPredicate pred); namespace ranges { - template S1, ForwardIterator I2, - Sentinel S2, class Pred = ranges::equal_to, + 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 = {}); @@ -1105,15 +1105,15 @@ BinaryPredicate pred); namespace ranges { - template S, class T, + 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, iter_difference_t> count, const T& value, Pred pred = {}, Proj proj = {}); @@ -1140,24 +1140,24 @@ [[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)}; } }; - template S, WeaklyIncrementable O> - requires IndirectlyCopyable + template S, weakly_incrementable O> + requires indirectly_copyable constexpr copy_result copy(I first, S last, O result); - template - requires IndirectlyCopyable, O> + template + requires indirectly_copyable, O> constexpr copy_result, O> copy(R&& r, O result); } @@ -1175,8 +1175,8 @@ template using copy_n_result = copy_result; - template - requires IndirectlyCopyable + template + requires indirectly_copyable constexpr copy_n_result copy_n(I first, iter_difference_t n, O result); } @@ -1194,14 +1194,14 @@ template using copy_if_result = copy_result; - template S, WeaklyIncrementable O, class Proj = identity, - IndirectUnaryPredicate> Pred> - requires IndirectlyCopyable + template S, weakly_incrementable O, class Proj = identity, + indirect_unary_predicate> Pred> + 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> + template, Proj>> Pred> + requires indirectly_copyable, O> constexpr copy_if_result, O> copy_if(R&& r, O result, Pred pred, Proj proj = {}); } @@ -1215,12 +1215,12 @@ template using copy_backward_result = copy_result; - template S1, BidirectionalIterator I2> - requires IndirectlyCopyable + template S1, bidirectional_iterator I2> + requires indirectly_copyable constexpr copy_backward_result copy_backward(I1 first, S1 last, I2 result); - template - requires IndirectlyCopyable, I> + template + requires indirectly_copyable, I> constexpr copy_backward_result, I> copy_backward(R&& r, I result); } @@ -1239,12 +1239,12 @@ template using move_result = copy_result; - template S, WeaklyIncrementable O> - requires IndirectlyMovable + template S, weakly_incrementable O> + requires indirectly_movable constexpr move_result move(I first, S last, O result); - template - requires IndirectlyMovable, O> + template + requires indirectly_movable, O> constexpr move_result, O> move(R&& r, O result); } @@ -1258,12 +1258,12 @@ template using move_backward_result = copy_result; - template S1, BidirectionalIterator I2> - requires IndirectlyMovable + template S1, bidirectional_iterator I2> + requires indirectly_movable constexpr move_backward_result move_backward(I1 first, S1 last, I2 result); - template - requires IndirectlyMovable, I> + template + requires indirectly_movable, I> constexpr move_backward_result, I> move_backward(R&& r, I result); } @@ -1281,12 +1281,12 @@ template using swap_ranges_result = mismatch_result; - template S1, InputIterator I2, Sentinel S2> - requires IndirectlySwappable + template S1, input_iterator I2, sentinel_for S2> + requires indirectly_swappable constexpr swap_ranges_result swap_ranges(I1 first1, S1 last1, I2 first2, S2 last2); - template - requires IndirectlySwappable, iterator_t> + template + requires indirectly_swappable, iterator_t> constexpr swap_ranges_result, safe_iterator_t> swap_ranges(R1&& r1, R2&& r2); } @@ -1323,14 +1323,14 @@ template using unary_transform_result = copy_result; - template S, WeaklyIncrementable O, - CopyConstructible F, class Proj = identity> - requires Writable>> + 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>>> + requires writable, Proj>>> constexpr unary_transform_result, O> transform(R&& r, O result, F op, Proj proj = {}); @@ -1341,31 +1341,31 @@ [[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)}; } }; - template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, CopyConstructible F, class Proj1 = identity, + template S1, input_iterator I2, sentinel_for S2, + weakly_incrementable 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>, + template + requires writable, Proj1>, projected, Proj2>>> constexpr binary_transform_result, safe_iterator_t, O> transform(R1&& r1, R2&& r2, O result, @@ -1389,23 +1389,23 @@ Predicate pred, const T& new_value); namespace ranges { - template S, class T1, class T2, class Proj = identity> - requires Writable && - IndirectRelation, const T1*> + template S, class T1, class T2, class Proj = identity> + requires writable && + 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*> + template + requires writable, const T2&> && + 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, - IndirectUnaryPredicate> Pred> - requires Writable + template S, class T, class Proj = identity, + 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&> + template, Proj>> Pred> + requires writable, const T&> constexpr safe_iterator_t replace_if(R&& r, Pred pred, const T& new_value, Proj proj = {}); } @@ -1434,17 +1434,18 @@ 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*> + 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, + template O, class Proj = identity> - requires IndirectlyCopyable, O> && - IndirectRelation, Proj>, const T1*> + 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, Proj proj = {}); @@ -1452,15 +1453,16 @@ template using replace_copy_if_result = copy_result; - template S, class T, OutputIterator O, - class Proj = identity, IndirectUnaryPredicate> Pred> - requires IndirectlyCopyable + template S, class T, output_iterator O, + class Proj = identity, indirect_unary_predicate> Pred> + 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, - IndirectUnaryPredicate, Proj>> Pred> - requires IndirectlyCopyable, O> + template O, + class Proj = identity, + indirect_unary_predicate, Proj>> Pred> + 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 = {}); @@ -1480,11 +1482,11 @@ 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> + 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); } @@ -1503,14 +1505,14 @@ ForwardIterator first, Size n, Generator gen); namespace ranges { - template S, CopyConstructible F> - requires Invocable && Writable> + template S, copy_constructible F> + requires invocable && writable> constexpr O generate(O first, S last, F gen); - template - requires Invocable && OutputRange> + template + requires invocable && output_range> constexpr safe_iterator_t generate(R&& r, F gen); - template - requires Invocable && Writable> + template + requires invocable && writable> constexpr O generate_n(O first, iter_difference_t n, F gen); } @@ -1531,20 +1533,20 @@ Predicate pred); namespace ranges { - template S, class T, class Proj = identity> - requires IndirectRelation, const T*> + template S, class T, class Proj = identity> + requires indirect_relation, const T*> constexpr I remove(I first, S last, const T& value, Proj proj = {}); - template - requires Permutable> && - IndirectRelation, Proj>, const T*> + template + requires permutable> && + indirect_relation, Proj>, const T*> constexpr safe_iterator_t remove(R&& r, const T& value, Proj proj = {}); - template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + template S, class Proj = identity, + indirect_unary_predicate> Pred> constexpr I remove_if(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> - requires Permutable> + template, Proj>> Pred> + requires permutable> constexpr safe_iterator_t remove_if(R&& r, Pred pred, Proj proj = {}); } @@ -1574,29 +1576,29 @@ 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*> + 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> && - IndirectRelation, Proj>, const T*> + template + 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 = {}); template using remove_copy_if_result = copy_result; - template S, WeaklyIncrementable O, - class Proj = identity, IndirectUnaryPredicate> Pred> - requires IndirectlyCopyable + template S, weakly_incrementable O, + class Proj = identity, indirect_unary_predicate> Pred> + 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> + template, Proj>> Pred> + requires indirectly_copyable, O> constexpr remove_copy_if_result, O> remove_copy_if(R&& r, O result, Pred pred, Proj proj = {}); } @@ -1616,12 +1618,12 @@ BinaryPredicate pred); namespace ranges { - template S, class Proj = identity, - IndirectRelation> C = ranges::equal_to> + template S, class Proj = identity, + indirect_relation> C = ranges::equal_to> constexpr I unique(I first, S last, C comp = {}, Proj proj = {}); - template, Proj>> C = ranges::equal_to> - requires Permutable> + template, Proj>> C = ranges::equal_to> + requires permutable> constexpr safe_iterator_t unique(R&& r, C comp = {}, Proj proj = {}); } @@ -1650,20 +1652,20 @@ template using unique_copy_result = copy_result; - template S, WeaklyIncrementable O, - class Proj = identity, IndirectRelation> C = ranges::equal_to> - requires IndirectlyCopyable && - (ForwardIterator || - (InputIterator && Same, iter_value_t>) || - IndirectlyCopyableStorable) + template S, weakly_incrementable O, + class Proj = identity, indirect_relation> C = ranges::equal_to> + requires indirectly_copyable && + (forward_iterator || + (input_iterator && same_to, iter_value_t>) || + 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 IndirectlyCopyable, O> && - (ForwardIterator> || - (InputIterator && Same>, iter_value_t>) || - IndirectlyCopyableStorable, O>) + template, Proj>> C = ranges::equal_to> + requires indirectly_copyable, O> && + (forward_iterator> || + (input_iterator && same_to>, iter_value_t>) || + indirectly_copyable_storable, O>) constexpr unique_copy_result, O> unique_copy(R&& r, O result, C comp = {}, Proj proj = {}); } @@ -1676,11 +1678,11 @@ BidirectionalIterator first, BidirectionalIterator last); namespace ranges { - template S> - requires Permutable + template S> + requires permutable constexpr I reverse(I first, S last); - template - requires Permutable> + template + requires permutable> constexpr safe_iterator_t reverse(R&& r); } @@ -1698,12 +1700,12 @@ template using reverse_copy_result = copy_result; - template S, WeaklyIncrementable O> - requires IndirectlyCopyable + template S, weakly_incrementable O> + requires indirectly_copyable constexpr reverse_copy_result reverse_copy(I first, S last, O result); - template - requires IndirectlyCopyable, O> + template + requires indirectly_copyable, O> constexpr reverse_copy_result, O> reverse_copy(R&& r, O result); } @@ -1720,10 +1722,10 @@ ForwardIterator last); namespace ranges { - template S> + template S> constexpr subrange rotate(I first, I middle, S last); - template - requires Permutable> + template + requires permutable> constexpr safe_subrange_t rotate(R&& r, iterator_t middle); } @@ -1741,12 +1743,12 @@ template using rotate_copy_result = copy_result; - template S, WeaklyIncrementable O> - requires IndirectlyCopyable + template S, weakly_incrementable O> + requires indirectly_copyable constexpr rotate_copy_result rotate_copy(I first, I middle, S last, O result); - template - requires IndirectlyCopyable, O> + template + requires indirectly_copyable, O> constexpr rotate_copy_result, O> rotate_copy(R&& r, iterator_t middle, O result); } @@ -1765,15 +1767,15 @@ UniformRandomBitGenerator&& g); namespace ranges { - template S, class Gen> - requires Permutable && - UniformRandomBitGenerator> && - ConvertibleTo, iter_difference_t> + template S, class Gen> + requires permutable && + uniform_random_bit_generator> && + convertible_to, iter_difference_t> I shuffle(I first, S last, Gen&& g); - template - requires Permutable> && - UniformRandomBitGenerator> && - ConvertibleTo, iter_difference_t>> + template + requires permutable> && + uniform_random_bit_generator> && + convertible_to, iter_difference_t>> safe_iterator_t shuffle(R&& r, Gen&& g); } @@ -1813,13 +1815,13 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + 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> + template + requires sortable, Comp, Proj> constexpr safe_iterator_t sort(R&& r, Comp comp = {}, Proj proj = {}); } @@ -1838,12 +1840,12 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + 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> + template + requires sortable, Comp, Proj> safe_iterator_t stable_sort(R&& r, Comp comp = {}, Proj proj = {}); } @@ -1868,13 +1870,13 @@ RandomAccessIterator last, Compare comp); namespace ranges { - template S, class Comp = ranges::less, + 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> + template + requires sortable, Comp, Proj> constexpr safe_iterator_t partial_sort(R&& r, iterator_t middle, Comp comp = {}, Proj proj = {}); @@ -1907,19 +1909,20 @@ Compare comp); namespace ranges { - template S1, RandomAccessIterator I2, Sentinel 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> + requires indirectly_copyable && sortable && + indirect_strict_weak_order, projected> constexpr I2 partial_sort_copy(I1 first, S1 last, I2 result_first, S2 result_last, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); - template - requires IndirectlyCopyable, iterator_t> && - Sortable, Comp, Proj2> && - IndirectStrictWeakOrder, Proj1>, - projected, Proj2>> + requires indirectly_copyable, iterator_t> && + sortable, Comp, Proj2> && + indirect_strict_weak_order, Proj1>, + projected, Proj2>> constexpr safe_iterator_t partial_sort_copy(R1&& r, R2&& result_r, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -1939,11 +1942,11 @@ Compare comp); namespace ranges { - template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + 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> + template, Proj>> Comp = ranges::less> constexpr bool is_sorted(R&& r, Comp comp = {}, Proj proj = {}); } @@ -1965,11 +1968,11 @@ Compare comp); namespace ranges { - template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + 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> + template, Proj>> Comp = ranges::less> constexpr safe_iterator_t is_sorted_until(R&& r, Comp comp = {}, Proj proj = {}); } @@ -1991,13 +1994,13 @@ RandomAccessIterator last, Compare comp); namespace ranges { - template S, class Comp = ranges::less, + 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> + template + requires sortable, Comp, Proj> constexpr safe_iterator_t nth_element(R&& r, iterator_t nth, Comp comp = {}, Proj proj = {}); } @@ -2013,12 +2016,12 @@ const T& value, Compare comp); namespace ranges { - template S, class T, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + template S, class T, class Proj = identity, + 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 = + template, Proj>> Comp = ranges::less> constexpr safe_iterator_t lower_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {}); @@ -2034,11 +2037,11 @@ const T& value, Compare comp); namespace ranges { - template S, class T, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + 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 = + template, Proj>> Comp = ranges::less> constexpr safe_iterator_t upper_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {}); @@ -2054,12 +2057,12 @@ const T& value, Compare comp); namespace ranges { - template S, class T, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + template S, class T, class Proj = identity, + 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 = + template, Proj>> Comp = ranges::less> constexpr safe_subrange_t equal_range(R&& r, const T& value, Comp comp = {}, Proj proj = {}); @@ -2075,12 +2078,12 @@ const T& value, Compare comp); namespace ranges { - template S, class T, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + template S, class T, class Proj = identity, + 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 = + template, Proj>> Comp = ranges::less> constexpr bool binary_search(R&& r, const T& value, Comp comp = {}, Proj proj = {}); @@ -2094,11 +2097,11 @@ ForwardIterator first, ForwardIterator last, Predicate pred); namespace ranges { - template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + template S, class Proj = identity, + indirect_unary_predicate> Pred> constexpr bool is_partitioned(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> + template, Proj>> Pred> constexpr bool is_partitioned(R&& r, Pred pred, Proj proj = {}); } @@ -2113,13 +2116,13 @@ Predicate pred); namespace ranges { - template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + template S, class Proj = identity, + indirect_unary_predicate> Pred> constexpr I partition(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> - requires Permutable> + template, Proj>> Pred> + requires permutable> constexpr safe_iterator_t partition(R&& r, Pred pred, Proj proj = {}); } @@ -2135,13 +2138,13 @@ Predicate pred); namespace ranges { - template S, class Proj = identity, - IndirectUnaryPredicate> Pred> - requires Permutable + template S, class Proj = identity, + indirect_unary_predicate> Pred> + requires permutable I stable_partition(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> - requires Permutable> + template, Proj>> Pred> + requires permutable> safe_iterator_t stable_partition(R&& r, Pred pred, Proj proj = {}); } @@ -2167,31 +2170,34 @@ [[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)}; } }; - template S, WeaklyIncrementable O1, WeaklyIncrementable O2, - class Proj = identity, IndirectUnaryPredicate> Pred> - requires IndirectlyCopyable && IndirectlyCopyable + template S, + weakly_incrementable O1, weakly_incrementable O2, + class Proj = identity, + indirect_unary_predicate> Pred> + 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> + indirect_unary_predicate, Proj>> Pred> + 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 = {}); } @@ -2202,11 +2208,11 @@ Predicate pred); namespace ranges { - template S, class Proj = identity, - IndirectUnaryPredicate> Pred> + template S, class Proj = identity, + indirect_unary_predicate> Pred> constexpr I partition_point(I first, S last, Pred pred, Proj proj = {}); - template, Proj>> Pred> + template, Proj>> Pred> constexpr safe_iterator_t partition_point(R&& r, Pred pred, Proj proj = {}); } @@ -2242,16 +2248,16 @@ template using merge_result = binary_transform_result; - template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, class Proj1 = identity, + 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 = {}); @@ -2277,12 +2283,12 @@ BidirectionalIterator last, Compare comp); namespace ranges { - template S, class Comp = ranges::less, + 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> + template + requires sortable, Comp, Proj> safe_iterator_t inplace_merge(R&& r, iterator_t middle, Comp comp = {}, Proj proj = {}); @@ -2308,16 +2314,16 @@ Compare comp); namespace ranges { - template S1, InputIterator I2, Sentinel S2, + 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 = {}); } @@ -2351,16 +2357,16 @@ template using set_union_result = binary_transform_result; - template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, + 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 = {}); @@ -2395,16 +2401,16 @@ template using set_intersection_result = binary_transform_result; - template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, + 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 = {}); @@ -2439,16 +2445,16 @@ template using set_difference_result = copy_result; - template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, + 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 = {}); @@ -2483,17 +2489,17 @@ template using set_symmetric_difference_result = binary_transform_result; - template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, + 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 = {}); @@ -2507,13 +2513,13 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + 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> + template + requires sortable, Comp, Proj> constexpr safe_iterator_t push_heap(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2525,13 +2531,13 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + 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> + template + requires sortable, Comp, Proj> constexpr safe_iterator_t pop_heap(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2543,13 +2549,13 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + 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> + template + requires sortable, Comp, Proj> constexpr safe_iterator_t make_heap(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2561,13 +2567,13 @@ Compare comp); namespace ranges { - template S, class Comp = ranges::less, + 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> + template + requires sortable, Comp, Proj> constexpr safe_iterator_t sort_heap(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2586,11 +2592,11 @@ Compare comp); namespace ranges { - template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + 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> + template, Proj>> Comp = ranges::less> constexpr bool is_heap(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2612,11 +2618,11 @@ Compare comp); namespace ranges { - template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + 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> + template, Proj>> Comp = ranges::less> constexpr safe_iterator_t is_heap_until(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2632,14 +2638,14 @@ 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> + template> Comp = ranges::less> constexpr T min(initializer_list r, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> - requires IndirectlyCopyableStorable, iter_value_t>*> + template, Proj>> Comp = ranges::less> + requires indirectly_copyable_storable, iter_value_t>*> constexpr iter_value_t> min(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2654,14 +2660,14 @@ 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> + template> Comp = ranges::less> constexpr T max(initializer_list r, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> - requires IndirectlyCopyableStorable, iter_value_t>*> + template, Proj>> Comp = ranges::less> + requires indirectly_copyable_storable, iter_value_t>*> constexpr iter_value_t> max(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2681,29 +2687,29 @@ [[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)}; } }; 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> + template> Comp = ranges::less> constexpr minmax_result minmax(initializer_list r, Comp comp = {}, Proj proj = {}); - template, Proj>> Comp = ranges::less> - requires IndirectlyCopyableStorable, iter_value_t>*> + template, Proj>> Comp = ranges::less> + requires indirectly_copyable_storable, iter_value_t>*> constexpr minmax_result>> minmax(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2722,11 +2728,11 @@ Compare comp); namespace ranges { - template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + 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> + template, Proj>> Comp = ranges::less> constexpr safe_iterator_t min_element(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2745,11 +2751,11 @@ Compare comp); namespace ranges { - template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + 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> + template, Proj>> Comp = ranges::less> constexpr safe_iterator_t max_element(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2773,12 +2779,12 @@ template using minmax_element_result = minmax_result; - template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> + template S, class Proj = identity, + 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> + template, Proj>> Comp = ranges::less> constexpr minmax_element_result> minmax_element(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2813,17 +2819,17 @@ Compare comp); namespace ranges { - template S1, InputIterator I2, Sentinel S2, + 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 = {}); @@ -2852,14 +2858,14 @@ BidirectionalIterator last, Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr bool next_permutation(I first, S last, Comp comp = {}, Proj proj = {}); - template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr bool next_permutation(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2872,14 +2878,14 @@ BidirectionalIterator last, Compare comp); namespace ranges { - template S, class Comp = ranges::less, + template S, class Comp = ranges::less, class Proj = identity> - requires Sortable + requires sortable constexpr bool prev_permutation(I first, S last, Comp comp = {}, Proj proj = {}); - template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr bool prev_permutation(R&& r, Comp comp = {}, Proj proj = {}); } @@ -2898,11 +2904,11 @@ bool all_of(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class Proj = identity, - IndirectUnaryPredicate> Pred> +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> +template, Proj>> Pred> constexpr bool ranges::all_of(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -2932,11 +2938,11 @@ bool any_of(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class Proj = identity, - IndirectUnaryPredicate> Pred> +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> +template, Proj>> Pred> constexpr bool ranges::any_of(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -2965,11 +2971,11 @@ bool none_of(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class Proj = identity, - IndirectUnaryPredicate> Pred> +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> +template, Proj>> Pred> constexpr bool ranges::none_of(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -3072,12 +3078,12 @@ \indexlibrary{\idxcode{for_each}}% \begin{itemdecl} -template S, class Proj = identity, - IndirectUnaryInvocable> Fun> +template S, class Proj = identity, + indirectly_unary_invocable> Fun> constexpr ranges::for_each_result ranges::for_each(I first, S last, Fun f, Proj proj = {}); -template, Proj>> Fun> +template, Proj>> Fun> constexpr ranges::for_each_result, Fun> ranges::for_each(R&& r, Fun f, Proj proj = {}); \end{itemdecl} @@ -3108,7 +3114,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} @@ -3214,25 +3220,25 @@ ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class T, class Proj = identity> - requires IndirectRelation, const T*> +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 - requires IndirectRelation, Proj>, const T*> +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, - IndirectUnaryPredicate> Pred> +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> +template, Proj>> Pred> constexpr safe_iterator_t ranges::find_if(R&& r, Pred pred, Proj proj = {}); -template S, class Proj = identity, - IndirectUnaryPredicate> Pred> +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> +template, Proj>> Pred> constexpr safe_iterator_t ranges::find_if_not(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -3289,18 +3295,18 @@ ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); -template S1, ForwardIterator I2, Sentinel S2, +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 = {}); + Proj1 proj1 = {}, Proj2 proj2 = {}); \end{itemdecl} \begin{itemdescr} @@ -3374,17 +3380,17 @@ ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); -template S1, ForwardIterator I2, Sentinel S2, +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 = {}, @@ -3441,11 +3447,11 @@ ForwardIterator first, ForwardIterator last, BinaryPredicate pred); -template S, class Proj = identity, - IndirectRelation> Pred = ranges::equal_to> +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> +template, Proj>> Pred = ranges::equal_to> constexpr safe_iterator_t ranges::adjacent_find(R&& r, Pred pred = {}, Proj proj = {}); \end{itemdecl} @@ -3498,20 +3504,20 @@ count_if(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class T, class Proj = identity> - requires IndirectRelation, const T*> +template S, class T, class Proj = identity> + 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*> +template + requires indirect_relation, Proj>, const T*> constexpr iter_difference_t> ranges::count(R&& r, const T& value, Proj proj = {}); -template S, class Proj = identity, - IndirectUnaryPredicate> Pred> +template S, class Proj = identity, + indirect_unary_predicate> Pred> constexpr iter_difference_t ranges::count_if(I first, S last, Pred pred, Proj proj = {}); -template, Proj>> Pred> +template, Proj>> Pred> constexpr iter_difference_t> ranges::count_if(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -3595,17 +3601,17 @@ ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); -template S1, InputIterator I2, Sentinel S2, +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 = {}); @@ -3688,15 +3694,15 @@ ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate pred); -template S1, InputIterator I2, Sentinel S2, +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} @@ -3740,7 +3746,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}, @@ -3819,16 +3825,16 @@ \indexlibrary{\idxcode{is_permutation}}% \begin{itemdecl} -template S1, ForwardIterator I2, - Sentinel S2, class Pred = ranges::equal_to, class Proj1 = identity, +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} @@ -3848,8 +3854,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 @@ -3907,16 +3913,16 @@ \indexlibrary{\idxcode{search}}% \begin{itemdecl} -template S1, ForwardIterator I2, - Sentinel S2, class Pred = ranges::equal_to, +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 = {}); @@ -3995,15 +4001,15 @@ \indexlibrary{\idxcode{search_n}}% \begin{itemdecl} -template S, class T, +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, iter_difference_t> count, const T& value, Pred pred = {}, Proj proj = {}); @@ -4052,11 +4058,11 @@ constexpr OutputIterator copy(InputIterator first, InputIterator last, OutputIterator result); -template S, WeaklyIncrementable O> - requires IndirectlyCopyable +template S, weakly_incrementable O> + requires indirectly_copyable constexpr ranges::copy_result ranges::copy(I first, S last, O result); -template - requires IndirectlyCopyable, O> +template + requires indirectly_copyable, O> constexpr ranges::copy_result, O> ranges::copy(R&& r, O result); \end{itemdecl} @@ -4130,8 +4136,8 @@ ForwardIterator1 first, Size n, ForwardIterator2 result); -template - requires IndirectlyCopyable +template + requires indirectly_copyable constexpr ranges::copy_n_result ranges::copy_n(I first, iter_difference_t n, O result); \end{itemdecl} @@ -4172,14 +4178,14 @@ ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 result, Predicate pred); -template S, WeaklyIncrementable O, class Proj = identity, - IndirectUnaryPredicate> Pred> - requires IndirectlyCopyable +template S, weakly_incrementable O, class Proj = identity, + indirect_unary_predicate> Pred> + 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> +template, Proj>> Pred> + requires indirectly_copyable, O> constexpr ranges::copy_if_result, O> ranges::copy_if(R&& r, O result, Pred pred, Proj proj = {}); \end{itemdecl} @@ -4244,12 +4250,12 @@ BidirectionalIterator1 last, BidirectionalIterator2 result); -template S1, BidirectionalIterator I2> - requires IndirectlyCopyable +template S1, bidirectional_iterator I2> + requires indirectly_copyable constexpr ranges::copy_backward_result ranges::copy_backward(I1 first, S1 last, I2 result); -template - requires IndirectlyCopyable, I> +template + requires indirectly_copyable, I> constexpr ranges::copy_backward_result, I> ranges::copy_backward(R&& r, I result); \end{itemdecl} @@ -4296,12 +4302,12 @@ constexpr OutputIterator move(InputIterator first, InputIterator last, OutputIterator result); -template S, WeaklyIncrementable O> - requires IndirectlyMovable +template S, weakly_incrementable O> + requires indirectly_movable constexpr ranges::move_result ranges::move(I first, S last, O result); -template - requires IndirectlyMovable, O> +template + requires indirectly_movable, O> constexpr ranges::move_result, O> ranges::move(R&& r, O result); \end{itemdecl} @@ -4386,12 +4392,12 @@ move_backward(BidirectionalIterator1 first, BidirectionalIterator1 last, BidirectionalIterator2 result); -template S1, BidirectionalIterator I2> - requires IndirectlyMovable +template S1, bidirectional_iterator I2> + requires indirectly_movable constexpr ranges::move_backward_result ranges::move_backward(I1 first, S1 last, I2 result); -template - requires IndirectlyMovable, I> +template + requires indirectly_movable, I> constexpr ranges::move_backward_result, I> ranges::move_backward(R&& r, I result); \end{itemdecl} @@ -4453,12 +4459,12 @@ ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2); -template S1, InputIterator I2, Sentinel S2> - requires IndirectlySwappable +template S1, input_iterator I2, sentinel_for S2> + requires indirectly_swappable constexpr ranges::swap_ranges_result ranges::swap_ranges(I1 first1, S1 last1, I2 first2, S2 last2); -template - requires IndirectlySwappable, iterator_t> +template + requires indirectly_swappable, iterator_t> constexpr ranges::swap_ranges_result, safe_iterator_t> ranges::swap_ranges(R1&& r1, R2&& r2); \end{itemdecl} @@ -4556,27 +4562,27 @@ ForwardIterator2 first2, ForwardIterator result, BinaryOperation binary_op); -template S, WeaklyIncrementable O, - CopyConstructible F, class Proj = identity> - requires Writable>> +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>>> + 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, +template S1, input_iterator I2, sentinel_for S2, + weakly_incrementable 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>, +template + requires writable, Proj1>, projected, Proj2>>> constexpr ranges::binary_transform_result, safe_iterator_t, O> ranges::transform(R1&& r1, R2&& r2, O result, @@ -4675,23 +4681,23 @@ ForwardIterator first, ForwardIterator last, Predicate pred, const T& new_value); -template S, class T1, class T2, class Proj = identity> - requires Writable && - IndirectRelation, const T1*> +template S, class T1, class T2, class Proj = identity> + requires writable && + 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*> +template + requires writable, const T2&> && + 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, - IndirectUnaryPredicate> Pred> - requires Writable +template S, class T, class Proj = identity, + 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&> +template, Proj>> Pred> + requires writable, const T&> constexpr safe_iterator_t ranges::replace_if(R&& r, Pred pred, const T& new_value, Proj proj = {}); \end{itemdecl} @@ -4754,30 +4760,30 @@ 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*> + 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, +template O, class Proj = identity> - requires IndirectlyCopyable, O> && - IndirectRelation, Proj>, const T1*> + 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, Proj proj = {}); -template S, class T, OutputIterator O, - class Proj = identity, IndirectUnaryPredicate> Pred> - requires IndirectlyCopyable +template S, class T, output_iterator O, + class Proj = identity, indirect_unary_predicate> Pred> + 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, - IndirectUnaryPredicate, Proj>> Pred> - requires IndirectlyCopyable, O> +template O, class Proj = identity, + indirect_unary_predicate, Proj>> Pred> + 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 = {}); @@ -4848,11 +4854,11 @@ 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> +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} @@ -4901,14 +4907,14 @@ ForwardIterator generate_n(ExecutionPolicy&& exec, ForwardIterator first, Size n, Generator gen); -template S, CopyConstructible F> - requires Invocable && Writable> +template S, copy_constructible F> + requires invocable && writable> constexpr O ranges::generate(O first, S last, F gen); -template - requires Invocable && OutputRange> +template + requires invocable && output_range> constexpr safe_iterator_t ranges::generate(R&& r, F gen); -template - requires Invocable && Writable> +template + requires invocable && writable> constexpr O ranges::generate_n(O first, iter_difference_t n, F gen); \end{itemdecl} @@ -4957,20 +4963,20 @@ ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class T, class Proj = identity> - requires IndirectRelation, const T*> +template S, class T, class Proj = identity> + requires indirect_relation, const T*> constexpr I ranges::remove(I first, S last, const T& value, Proj proj = {}); -template - requires Permutable> && - IndirectRelation, Proj>, const T*> +template + requires permutable> && + indirect_relation, Proj>, const T*> constexpr safe_iterator_t ranges::remove(R&& r, const T& value, Proj proj = {}); -template S, class Proj = identity, - IndirectUnaryPredicate> Pred> +template S, class Proj = identity, + indirect_unary_predicate> Pred> constexpr I ranges::remove_if(I first, S last, Pred pred, Proj proj = {}); -template, Proj>> Pred> - requires Permutable> +template, Proj>> Pred> + requires permutable> constexpr safe_iterator_t ranges::remove_if(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -5044,25 +5050,25 @@ 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*> + 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> && - IndirectRelation, Proj>, const T*> +template + 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, WeaklyIncrementable O, - class Proj = identity, IndirectUnaryPredicate> Pred> - requires IndirectlyCopyable +template S, weakly_incrementable O, + class Proj = identity, indirect_unary_predicate> Pred> + 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> +template, Proj>> Pred> + 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} @@ -5132,12 +5138,12 @@ ForwardIterator first, ForwardIterator last, BinaryPredicate pred); -template S, class Proj = identity, - IndirectRelation> C = ranges::equal_to> +template S, class Proj = identity, + indirect_relation> C = ranges::equal_to> constexpr I ranges::unique(I first, S last, C comp = {}, Proj proj = {}); -template, Proj>> C = ranges::equal_to> - requires Permutable> +template, Proj>> C = ranges::equal_to> + requires permutable> constexpr safe_iterator_t ranges::unique(R&& r, C comp = {}, Proj proj = {}); \end{itemdecl} @@ -5206,20 +5212,20 @@ ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 result, BinaryPredicate pred); -template S, WeaklyIncrementable O, - class Proj = identity, IndirectRelation> C = ranges::equal_to> - requires IndirectlyCopyable && - (ForwardIterator || - (InputIterator && Same, iter_value_t>) || - IndirectlyCopyableStorable) +template S, weakly_incrementable O, + class Proj = identity, indirect_relation> C = ranges::equal_to> + requires indirectly_copyable && + (forward_iterator || + (input_iterator && same_to, iter_value_t>) || + 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 IndirectlyCopyable, O> && - (ForwardIterator> || - (InputIterator && Same>, iter_value_t>) || - IndirectlyCopyableStorable, O>) +template, Proj>> C = ranges::equal_to> + requires indirectly_copyable, O> && + (forward_iterator> || + (input_iterator && same_to>, iter_value_t>) || + indirectly_copyable_storable, O>) constexpr ranges::unique_copy_result, O> ranges::unique_copy(R&& r, O result, C comp = {}, Proj proj = {}); \end{itemdecl} @@ -5305,11 +5311,11 @@ void reverse(ExecutionPolicy&& exec, BidirectionalIterator first, BidirectionalIterator last); -template S> - requires Permutable +template S> + requires permutable constexpr I ranges::reverse(I first, S last); -template - requires Permutable> +template + requires permutable> constexpr safe_iterator_t ranges::reverse(R&& r); \end{itemdecl} @@ -5348,12 +5354,12 @@ BidirectionalIterator first, BidirectionalIterator last, ForwardIterator result); -template S, WeaklyIncrementable O> - requires IndirectlyCopyable +template S, weakly_incrementable O> + requires indirectly_copyable constexpr ranges::reverse_copy_result ranges::reverse_copy(I first, S last, O result); -template - requires IndirectlyCopyable, O> +template + requires indirectly_copyable, O> constexpr ranges::reverse_copy_result, O> ranges::reverse_copy(R&& r, O result); \end{itemdecl} @@ -5400,7 +5406,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} @@ -5441,8 +5447,8 @@ \end{itemdescr} \begin{itemdecl} -template - requires Permutable> +template + requires permutable> constexpr safe_subrange_t ranges::rotate(R&& r, iterator_t middle); \end{itemdecl} @@ -5465,8 +5471,8 @@ ForwardIterator1 first, ForwardIterator1 middle, ForwardIterator1 last, ForwardIterator2 result); - template S, WeaklyIncrementable O> - requires IndirectlyCopyable + template S, weakly_incrementable O> + requires indirectly_copyable constexpr ranges::rotate_copy_result ranges::rotate_copy(I first, I middle, S last, O result); \end{itemdecl} @@ -5503,8 +5509,8 @@ \end{itemdescr} \begin{itemdecl} -template - requires IndirectlyCopyable, O> +template + requires indirectly_copyable, O> constexpr ranges::rotate_copy_result, O> ranges::rotate_copy(R&& r, iterator_t middle, O result); \end{itemdecl} @@ -5596,13 +5602,13 @@ RandomAccessIterator last, UniformRandomBitGenerator&& g); -template S, class Gen> - requires Permutable && - UniformRandomBitGenerator> +template S, class Gen> + requires permutable && + uniform_random_bit_generator> I ranges::shuffle(I first, S last, Gen&& g); -template - requires Permutable> && - UniformRandomBitGenerator> +template + requires permutable> && + uniform_random_bit_generator> safe_iterator_t ranges::shuffle(R&& r, Gen&& g); \end{itemdecl} @@ -5827,13 +5833,13 @@ RandomAccessIterator first, RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +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> +template + requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::sort(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -5886,12 +5892,12 @@ RandomAccessIterator first, RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +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> +template + requires sortable, Comp, Proj> safe_iterator_t ranges::stable_sort(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -5958,9 +5964,9 @@ RandomAccessIterator last, Compare comp); -template S, class Comp = ranges::less, +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} @@ -6002,8 +6008,8 @@ \end{itemdescr} \begin{itemdecl} -template - requires Sortable, Comp, Proj> +template + requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::partial_sort(R&& r, iterator_t middle, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -6049,19 +6055,19 @@ RandomAccessIterator result_last, Compare comp); -template S1, RandomAccessIterator I2, Sentinel 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> + requires indirectly_copyable && sortable && + indirect_strict_weak_order, projected> constexpr I2 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> && - Sortable, Comp, Proj2> && - IndirectStrictWeakOrder, Proj1>, - projected, Proj2>> + requires indirectly_copyable, iterator_t> && + sortable, Comp, Proj2> && + indirect_strict_weak_order, Proj1>, + projected, Proj2>> constexpr safe_iterator_t ranges::partial_sort_copy(R1&& r, R2&& result_r, Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); @@ -6181,11 +6187,11 @@ \indexlibrary{\idxcode{is_sorted}}% \begin{itemdecl} -template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> +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> +template, Proj>> Comp = ranges::less> constexpr bool ranges::is_sorted(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -6216,11 +6222,11 @@ ForwardIterator first, ForwardIterator last, Compare comp); -template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> +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> +template, Proj>> Comp = ranges::less> constexpr safe_iterator_t ranges::is_sorted_until(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -6262,9 +6268,9 @@ 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 + requires sortable constexpr I ranges::nth_element(I first, I nth, S last, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -6308,8 +6314,8 @@ \end{itemdescr} \begin{itemdecl} -template - requires Sortable, Comp, Proj> +template + requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::nth_element(R&& r, iterator_t nth, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -6351,12 +6357,12 @@ lower_bound(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); -template S, class T, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> +template S, class T, class Proj = identity, + 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 = +template, Proj>> Comp = ranges::less> constexpr safe_iterator_t ranges::lower_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {}); @@ -6399,11 +6405,11 @@ upper_bound(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); -template S, class T, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> +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 = +template, Proj>> Comp = ranges::less> constexpr safe_iterator_t ranges::upper_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {}); @@ -6447,12 +6453,12 @@ ForwardIterator last, const T& value, Compare comp); -template S, class T, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> +template S, class T, class Proj = identity, + 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 = +template, Proj>> Comp = ranges::less> constexpr safe_subrange_t ranges::equal_range(R&& r, const T& value, Comp comp = {}, Proj proj = {}); @@ -6511,12 +6517,12 @@ binary_search(ForwardIterator first, ForwardIterator last, const T& value, Compare comp); -template S, class T, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> +template S, class T, class Proj = identity, + 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 = +template, Proj>> Comp = ranges::less> constexpr bool ranges::binary_search(R&& r, const T& value, Comp comp = {}, Proj proj = {}); @@ -6561,11 +6567,11 @@ bool is_partitioned(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class Proj = identity, - IndirectUnaryPredicate> Pred> +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> +template, Proj>> Pred> constexpr bool ranges::is_partitioned(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -6596,13 +6602,13 @@ partition(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class Proj = identity, - IndirectUnaryPredicate> Pred> +template S, class Proj = identity, + indirect_unary_predicate> Pred> constexpr I ranges::partition(I first, S last, Pred pred, Proj proj = {}); -template, Proj>> Pred> - requires Permutable> +template, Proj>> Pred> + requires permutable> constexpr safe_iterator_t ranges::partition(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -6639,7 +6645,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 @@ -6659,13 +6665,13 @@ stable_partition(ExecutionPolicy&& exec, BidirectionalIterator first, BidirectionalIterator last, Predicate pred); -template S, class Proj = identity, - IndirectUnaryPredicate> Pred> - requires Permutable +template S, class Proj = identity, + indirect_unary_predicate> Pred> + requires permutable I ranges::stable_partition(I first, S last, Pred pred, Proj proj = {}); -template, Proj>> Pred> - requires Permutable> +template, Proj>> Pred> + requires permutable> safe_iterator_t ranges::stable_partition(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -6725,17 +6731,17 @@ ForwardIterator first, ForwardIterator last, ForwardIterator1 out_true, ForwardIterator2 out_false, Predicate pred); -template S, WeaklyIncrementable O1, WeaklyIncrementable O2, - class Proj = identity, IndirectUnaryPredicate> Pred> - requires IndirectlyCopyable && IndirectlyCopyable +template S, weakly_incrementable O1, weakly_incrementable O2, + class Proj = identity, indirect_unary_predicate> Pred> + 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> + indirect_unary_predicate, Proj>> Pred> + 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} @@ -6787,11 +6793,11 @@ constexpr ForwardIterator partition_point(ForwardIterator first, ForwardIterator last, Predicate pred); -template S, class Proj = identity, - IndirectUnaryPredicate> Pred> +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> +template, Proj>> Pred> constexpr safe_iterator_t ranges::partition_point(R&& r, Pred pred, Proj proj = {}); \end{itemdecl} @@ -6852,16 +6858,16 @@ ForwardIterator2 first2, ForwardIterator2 last2, ForwardIterator result, Compare comp); -template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, class Proj1 = identity, +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 = {}); @@ -6943,9 +6949,9 @@ BidirectionalIterator middle, BidirectionalIterator last, Compare comp); -template S, class Comp = ranges::less, +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} @@ -6995,8 +7001,8 @@ \end{itemdescr} \begin{itemdecl} -template - requires Sortable, Comp, Proj> +template + requires sortable, Comp, Proj> safe_iterator_t ranges::inplace_merge(R&& r, iterator_t middle, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7043,16 +7049,16 @@ ForwardIterator2 first2, ForwardIterator2 last2, Compare comp); -template S1, InputIterator I2, Sentinel S2, +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} @@ -7117,16 +7123,16 @@ ForwardIterator2 first2, ForwardIterator2 last2, ForwardIterator result, Compare comp); -template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, +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 = {}); @@ -7212,16 +7218,16 @@ ForwardIterator2 first2, ForwardIterator2 last2, ForwardIterator result, Compare comp); -template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, +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 = {}); @@ -7305,16 +7311,16 @@ ForwardIterator2 first2, ForwardIterator2 last2, ForwardIterator result, Compare comp); -template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, +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 = {}); @@ -7399,17 +7405,17 @@ ForwardIterator2 first2, ForwardIterator2 last2, ForwardIterator result, Compare comp); -template S1, InputIterator I2, Sentinel S2, - WeaklyIncrementable O, class Comp = ranges::less, +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 = {}); @@ -7506,13 +7512,13 @@ 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 + requires sortable constexpr I ranges::push_heap(I first, S last, Comp comp = {}, Proj proj = {}); -template - requires Sortable, Comp, Proj> +template + requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::push_heap(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7557,13 +7563,13 @@ 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 + requires sortable constexpr I ranges::pop_heap(I first, S last, Comp comp = {}, Proj proj = {}); -template - requires Sortable, Comp, Proj> +template + requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::pop_heap(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7615,13 +7621,13 @@ 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 + requires sortable constexpr I ranges::make_heap(I first, S last, Comp comp = {}, Proj proj = {}); -template - requires Sortable, Comp, Proj> +template + requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::make_heap(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7664,13 +7670,13 @@ 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 + requires sortable constexpr I ranges::sort_heap(I first, S last, Comp comp = {}, Proj proj = {}); -template - requires Sortable, Comp, Proj> +template + requires sortable, Comp, Proj> constexpr safe_iterator_t ranges::sort_heap(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7769,11 +7775,11 @@ \indexlibrary{\idxcode{is_heap}}% \begin{itemdecl} -template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> +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> +template, Proj>> Comp = ranges::less> constexpr bool ranges::is_heap(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7804,11 +7810,11 @@ RandomAccessIterator first, RandomAccessIterator last, Compare comp); -template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> +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> +template, Proj>> Comp = ranges::less> constexpr safe_iterator_t ranges::is_heap_until(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7841,7 +7847,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} @@ -7874,12 +7880,12 @@ template constexpr T min(initializer_list r, Compare comp); -template> Comp = ranges::less> +template> Comp = ranges::less> constexpr T ranges::min(initializer_list r, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> - requires IndirectlyCopyableStorable, iter_value_t>*> +template, Proj>> Comp = ranges::less> + requires indirectly_copyable_storable, iter_value_t>*> constexpr iter_value_t> ranges::min(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7918,7 +7924,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} @@ -7951,12 +7957,12 @@ template constexpr T max(initializer_list r, Compare comp); -template> Comp = ranges::less> +template> Comp = ranges::less> constexpr T ranges::max(initializer_list r, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> - requires IndirectlyCopyableStorable, iter_value_t>*> +template, Proj>> Comp = ranges::less> + requires indirectly_copyable_storable, iter_value_t>*> constexpr iter_value_t> ranges::max(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -7995,7 +8001,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} @@ -8030,13 +8036,13 @@ template constexpr pair minmax(initializer_list t, Compare comp); -template> Comp = ranges::less> +template> Comp = ranges::less> constexpr ranges::minmax_result ranges::minmax(initializer_list r, Comp comp = {}, Proj proj = {}); -template, Proj>> Comp = ranges::less> - requires IndirectlyCopyableStorable, iter_value_t>*> +template, Proj>> Comp = ranges::less> + requires indirectly_copyable_storable, iter_value_t>*> constexpr ranges::minmax_result>> ranges::minmax(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -8087,11 +8093,11 @@ ForwardIterator first, ForwardIterator last, Compare comp); -template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> +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> +template, Proj>> Comp = ranges::less> constexpr safe_iterator_t ranges::min_element(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -8134,11 +8140,11 @@ ForwardIterator first, ForwardIterator last, Compare comp); -template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> +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> +template, Proj>> Comp = ranges::less> constexpr safe_iterator_t ranges::max_element(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -8183,12 +8189,12 @@ minmax_element(ExecutionPolicy&& exec, ForwardIterator first, ForwardIterator last, Compare comp); -template S, class Proj = identity, - IndirectStrictWeakOrder> Comp = ranges::less> +template S, class Proj = identity, + 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> +template, Proj>> Comp = ranges::less> constexpr ranges::minmax_result> ranges::minmax_element(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -8271,17 +8277,17 @@ ForwardIterator2 first2, ForwardIterator2 last2, Compare comp); -template S1, InputIterator I2, Sentinel S2, +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 = {}); @@ -8427,14 +8433,14 @@ 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 + requires sortable constexpr bool ranges::next_permutation(I first, S last, Comp comp = {}, Proj proj = {}); -template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr bool ranges::next_permutation(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} @@ -8480,14 +8486,14 @@ 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 + requires sortable constexpr bool ranges::prev_permutation(I first, S last, Comp comp = {}, Proj proj = {}); -template - requires Sortable, Comp, Proj> + requires sortable, Comp, Proj> constexpr bool ranges::prev_permutation(R&& r, Comp comp = {}, Proj proj = {}); \end{itemdecl} diff --git a/source/concepts.tex b/source/concepts.tex index d235330af3..6f3e52d1c3 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -147,116 +147,116 @@ \begin{codeblock} namespace std { // \ref{concepts.lang}, language-related concepts - // \ref{concept.same}, concept \libconcept{Same} + // \ref{concept.same}, concept \libconcept{same_to} template - concept Same = @\seebelow@; + concept same_to = @\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} + // \ref{concept.convertibleto}, concept \libconcept{convertible_to} template - concept ConvertibleTo = @\seebelow@; + 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} + // \ref{concept.common}, concept \libconcept{common_with} template - concept Common = @\seebelow@; + concept common_with = @\seebelow@; // \ref{concepts.integral}, integral concepts template - concept Integral = @\seebelow@; + concept integral = @\seebelow@; template - concept SignedIntegral = @\seebelow@; + concept signed_integral = @\seebelow@; template - concept UnsignedIntegral = @\seebelow@; + concept unsigned_integral = @\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} + // \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@; + 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} + // \ref{concept.constructible}, concept \libconcept{constructible_from} template - concept Constructible = @\seebelow@; + 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} + // \ref{concept.moveconstructible}, concept \libconcept{move_constructible} template - concept MoveConstructible = @\seebelow@; + 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} + // \ref{concept.boolean}, concept \libconcept{boolean} template - concept Boolean = @\seebelow@; + 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@; + 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@; + concept totally_ordered_with = @\seebelow@; // \ref{concepts.object}, object concepts template - concept Movable = @\seebelow@; + concept movable = @\seebelow@; template - concept Copyable = @\seebelow@; + concept copyable = @\seebelow@; template - concept Semiregular = @\seebelow@; + concept semiregular = @\seebelow@; template - concept Regular = @\seebelow@; + 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} + // \ref{concept.regularinvocable}, concept \libconcept{regular_invocable} template - concept RegularInvocable = @\seebelow@; + 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} + // \ref{concept.relation}, concept \libconcept{relation} template - concept Relation = @\seebelow@; + 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} @@ -269,31 +269,31 @@ 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_to}} -\indexlibrary{\idxcode{Same}}% +\indexlibrary{\idxcode{same_to}}% \begin{itemdecl} template concept @\placeholdernc{same-impl}@ = is_same_v; // \expos template - concept Same = @\placeholdernc{same-impl}@ && @\placeholdernc{same-impl}@; + concept same_to = @\placeholdernc{same-impl}@ && @\placeholdernc{same-impl}@; \end{itemdecl} \begin{itemdescr} \pnum \begin{note} -\tcode{\libconcept{Same}} subsumes \tcode{\libconcept{Same}} and +\tcode{\libconcept{same_to}} subsumes \tcode{\libconcept{same_to}} and vice versa. \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} @@ -301,24 +301,24 @@ \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} \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()); @@ -336,7 +336,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} @@ -361,14 +361,14 @@ \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} 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} @@ -376,13 +376,13 @@ different type. \tcode{C} may be a reference type. \end{note} -\indexlibrary{\idxcode{CommonReference}}% +\indexlibrary{\idxcode{common_reference_with}}% \begin{itemdecl} template - concept CommonReference = - Same, common_reference_t> && - ConvertibleTo> && - ConvertibleTo>; + concept common_reference_with = + same_to, common_reference_t> && + convertible_to> && + convertible_to>; \end{itemdecl} \begin{itemdescr} @@ -393,7 +393,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 @@ -404,12 +404,12 @@ \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} -\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, @@ -420,19 +420,19 @@ different type. \tcode{C} might not be unique. \end{note} -\indexlibrary{\idxcode{Common}}% +\indexlibrary{\idxcode{common_with}}% \begin{itemdecl} template - concept Common = - Same, common_type_t> && + concept common_with = + same_to, common_type_t> && requires { 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, @@ -447,7 +447,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 @@ -458,7 +458,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} @@ -466,42 +466,42 @@ \rSec2[concepts.integral]{Integral concepts} -\indexlibrary{\idxcode{Integral}}% -\indexlibrary{\idxcode{SignedIntegral}}% -\indexlibrary{\idxcode{UnsignedIntegral}}% +\indexlibrary{\idxcode{integral}}% +\indexlibrary{\idxcode{signed_integral}}% +\indexlibrary{\idxcode{unsigned_integral}}% \begin{itemdecl} template - concept Integral = is_integral_v; + 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 unsigned_integral = integral && !signed_integral; \end{itemdecl} \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} \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} -\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 && - CommonReference&, const remove_reference_t&> && + common_reference_with&, const remove_reference_t&> && requires(LHS lhs, RHS&& rhs) { - { lhs = std::forward(rhs) } -> Same; + { lhs = std::forward(rhs) } -> same_to; }; \end{itemdecl} @@ -516,7 +516,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)}. @@ -544,7 +544,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 @@ -561,7 +561,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 @@ -605,8 +605,8 @@ \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}}, + 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 \begin{itemize} @@ -639,17 +639,17 @@ \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}}% +\indexlibrary{\idxcode{swappable_with}}% \begin{itemdecl} template - concept SwappableWith = - CommonReference&, const remove_reference_t&> && + concept swappable_with = + 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)); @@ -660,7 +660,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} @@ -675,12 +675,12 @@ namespace ranges = std::ranges; -template U> +template U> void value_swap(T&& t, U&& u) { ranges::swap(std::forward(t), std::forward(u)); } -template +template void lv_swap(T& t1, T& t2) { ranges::swap(t1, t2); } @@ -708,17 +708,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} @@ -730,39 +730,39 @@ \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}} +\rSec2[concept.defaultconstructible]{Concept \libconcept{default_constructible}} -\indexlibrary{\idxcode{DefaultConstructible}}% +\indexlibrary{\idxcode{default_constructible}}% \begin{itemdecl} template - concept DefaultConstructible = Constructible; + 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 && ConvertibleTo; + 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}. @@ -774,23 +774,23 @@ \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 = - MoveConstructible && - Constructible && ConvertibleTo && - Constructible && ConvertibleTo && - Constructible && ConvertibleTo; + concept copy_constructible = + move_constructible && + constructible_from && convertible_to && + constructible_from && convertible_to && + constructible_from && convertible_to; \end{itemdecl} \begin{itemdescr} \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}. @@ -808,40 +808,40 @@ 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 = - Movable> && // (see \ref{concepts.object}) + concept boolean = + movable> && // (see \ref{concepts.object}) requires(const remove_reference_t& b1, const remove_reference_t& b2, const bool a) { - { b1 } -> ConvertibleTo; - { !b1 } -> ConvertibleTo; - { b1 && a } -> Same; - { b1 || a } -> Same; - { b1 && b2 } -> Same; - { a && b2 } -> Same; - { b1 || b2 } -> Same; - { a || b2 } -> Same; - { b1 == b2 } -> ConvertibleTo; - { b1 == a } -> ConvertibleTo; - { a == b2 } -> ConvertibleTo; - { b1 != b2 } -> ConvertibleTo; - { b1 != a } -> ConvertibleTo; - { a != b2 } -> ConvertibleTo; + { b1 } -> convertible_to; + { !b1 } -> convertible_to; + { b1 && a } -> same_to; + { b1 || a } -> same_to; + { b1 && b2 } -> same_to; + { a && b2 } -> same_to; + { b1 || b2 } -> same_to; + { a || b2 } -> same_to; + { 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} \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)}. @@ -864,22 +864,22 @@ \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}} +\rSec2[concept.equalitycomparable]{Concept \libconcept{equality_comparable}} \begin{itemdecl} template 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} @@ -900,16 +900,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. @@ -920,13 +920,13 @@ \end{note} \end{itemdescr} -\indexlibrary{\idxcode{EqualityComparableWith}}% +\indexlibrary{\idxcode{equality_comparable_with}}% \begin{itemdecl} template - concept EqualityComparableWith = - EqualityComparable && EqualityComparable && - CommonReference&, const remove_reference_t&> && - EqualityComparable< + concept equality_comparable_with = + equality_comparable && equality_comparable && + common_reference_with&, const remove_reference_t&> && + equality_comparable< common_reference_t< const remove_reference_t&, const remove_reference_t&>> && @@ -943,23 +943,23 @@ 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} -\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 = - EqualityComparable && + concept totally_ordered = + equality_comparable && 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} @@ -967,7 +967,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 @@ -983,24 +983,24 @@ \begin{itemdecl} template - concept StrictTotallyOrderedWith = - StrictTotallyOrdered && StrictTotallyOrdered && - CommonReference&, const remove_reference_t&> && - StrictTotallyOrdered< + concept totally_ordered_with = + totally_ordered && totally_ordered && + common_reference_with&, const remove_reference_t&> && + totally_ordered< 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; - { 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} @@ -1014,7 +1014,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)).} @@ -1034,32 +1034,34 @@ 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{Copyable}}% -\indexlibrary{\idxcode{Semiregular}}% -\indexlibrary{\idxcode{Regular}}% +\indexlibrary{\idxcode{movable}}% +\indexlibrary{\idxcode{copyable}}% +\indexlibrary{\idxcode{semiregular}}% +\indexlibrary{\idxcode{regular}}% \begin{itemdecl} template - concept Movable = is_object_v && MoveConstructible && Assignable && Swappable; + concept movable = is_object_v && move_constructible && + assignable_from && swappable; template - concept Copyable = CopyConstructible && Movable && Assignable; + concept copyable = copy_constructible && movable && + assignable_from; template - concept Semiregular = Copyable && DefaultConstructible; + concept semiregular = copyable && default_constructible; template - concept Regular = Semiregular && EqualityComparable; + 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} \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} @@ -1073,17 +1075,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} @@ -1091,18 +1093,18 @@ \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} \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} @@ -1112,50 +1114,50 @@ arguments\iref{concepts.equality}. \begin{note} This requirement supersedes the annotation in the definition of -\libconcept{Invocable}. +\libconcept{invocable}. \end{note} \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} -\rSec2[concept.predicate]{Concept \libconcept{Predicate}} +\rSec2[concept.predicate]{Concept \libconcept{predicate}} -\indexlibrary{\idxcode{Predicate}}% +\indexlibrary{\idxcode{predicate}}% \begin{itemdecl} template - concept Predicate = RegularInvocable && Boolean>; + 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 = - Predicate && Predicate && - Predicate && Predicate; + concept relation = + predicate && predicate && + predicate && predicate; \end{itemdecl} -\rSec2[concept.strictweakorder]{Concept \libconcept{StrictWeakOrder}} +\rSec2[concept.strictweakorder]{Concept \libconcept{strict_weak_order}} -\indexlibrary{\idxcode{Relation}}% +\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/containers.tex b/source/containers.tex index df227bfcd6..2424fdd9a9 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -456,7 +456,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 @@ -10967,7 +10967,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/expressions.tex b/source/expressions.tex index b8401275c6..83df175a89 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/iterators.tex b/source/iterators.tex index 625394b367..5ace8b9b90 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -81,128 +81,128 @@ = 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&>; - // \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} + // \ref{iterator.concept.winc}, concept \libconcept{weakly_incrementable} template - concept WeaklyIncrementable = @\seebelow@; + 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} + // \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} + // \ref{iterator.concept.sentinel}, concept \libconcept{sentinel_for} template - concept Sentinel = @\seebelow@; + 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} + // \ref{iterator.concept.input}, concept \libconcept{input_iterator} template - concept InputIterator = @\seebelow@; + 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} + // \ref{iterator.concept.forward}, concept \libconcept{forward_iterator} template - concept ForwardIterator = @\seebelow@; + 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} + // \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} + // \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 template - concept IndirectUnaryInvocable = @\seebelow@; + concept indirectly_unary_invocable = @\seebelow@; template - concept IndirectRegularUnaryInvocable = @\seebelow@; + concept indirectly_regular_unary_invocable = @\seebelow@; template - concept IndirectUnaryPredicate = @\seebelow@; + concept indirect_unary_predicate = @\seebelow@; template - concept IndirectRelation = @\seebelow@; + concept indirect_relation = @\seebelow@; template - concept IndirectStrictWeakOrder = @\seebelow@; + concept indirect_strict_weak_order = @\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 + template 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@; + 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@; + 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} + // \ref{alg.req.ind.cmp}, concept \libconcept{indirectly_comparable} template - concept IndirectlyComparable = @\seebelow@; + 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} + // \ref{alg.req.mergeable}, concept \libconcept{mergeable} template - concept Mergeable = @\seebelow@; + 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 @@ -232,35 +232,35 @@ // \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 + template constexpr iter_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} - 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); } @@ -307,7 +307,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; @@ -358,17 +358,17 @@ template constexpr move_iterator make_move_iterator(Iterator i); - template class move_sentinel; + template class move_sentinel; // \ref{iterators.common}, common iterators - template S> - requires (!Same) + template S> + requires (!same_to) class common_iterator; template struct incrementable_traits>; - template + template struct iterator_traits>; // \ref{default.sentinels}, default sentinels @@ -376,12 +376,12 @@ inline constexpr default_sentinel_t default_sentinel{}; // \ref{iterators.counted}, counted iterators - template class counted_iterator; + template class counted_iterator; template struct incrementable_traits>; - template + template struct iterator_traits>; // \ref{unreachable.sentinels}, unreachable sentinels @@ -514,16 +514,16 @@ \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{input_iterator}\iref{iterator.concept.input}, +\libconcept{out\-put_iterator}\iref{iterator.concept.output}, +\libconcept{forward_iterator}\iref{iterator.concept.forward}, +\libconcept{bidirectional_iterator}\iref{iterator.concept.bidir} +\libconcept{random_ac\-cess_iterator}\iref{iterator.concept.random.access}, and -\libconcept{Contiguous\-Iterator}\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{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 @@ -669,7 +669,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 @@ -699,7 +699,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())>; }; @@ -731,7 +731,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 @@ -796,15 +796,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 \libconcept{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 \libconcept{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 \libconcept{readable} and has no associated value type. \end{note} \rSec3[iterator.traits]{Iterator traits} @@ -856,52 +856,52 @@ \begin{codeblock} template concept @\placeholder{cpp17-iterator}@ = - Copyable && requires(I i) { + copyable && requires(I i) { { *i } -> @\placeholder{can-reference}@; - { ++i } -> Same; + { ++i } -> same_to; { *i++ } -> @\placeholder{can-reference}@; }; 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&&, typename readable_traits::value_type&>; typename common_reference_t::value_type&>; - requires SignedIntegral::difference_type>; + requires signed_integral::difference_type>; }; template concept @\placeholder{cpp17-forward-iterator}@ = - @\placeholder{cpp17-input-iterator}@ && Constructible && + @\placeholder{cpp17-input-iterator}@ && constructible_from && is_lvalue_reference_v> && - Same>, typename readable_traits::value_type> && + same_to>, typename readable_traits::value_type> && requires(I i) { { i++ } -> const I&; - { *i++ } -> Same>; + { *i++ } -> same_to>; }; template concept @\placeholder{cpp17-bidirectional-iterator}@ = @\placeholder{cpp17-forward-iterator}@ && requires(I i) { - { --i } -> Same; + { --i } -> same_to; { i-- } -> const I&; - { *i-- } -> Same>; + { *i-- } -> same_to>; }; 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; - { i -= n } -> Same; - { i + n } -> Same; - { n + i } -> Same; - { i - n } -> Same; - { i - i } -> Same; + { i += n } -> same_to; + { i -= n } -> same_to; + { i + n } -> same_to; + { n + i } -> same_to; + { i - n } -> same_to; + { i - i } -> same_to; { i[n] } -> iter_reference_t; }; \end{codeblock} @@ -1121,13 +1121,13 @@ 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} -model \libconcept{SwappableWith}\iref{concept.swappable}, +\libconcept{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)}. \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{\libconcept{indirectly_movable_storable}}, then \tcode{(void)(*E1 = \placeholdernc{iter-exchange-move}(E2, E1))}, except that \tcode{E1} is evaluated only once. @@ -1188,45 +1188,45 @@ 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; 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 -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 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 @@ -1240,11 +1240,11 @@ \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 - \tcode{Readable \&\& Same, decay_t{>}}, + \tcode{\libconcept{readable} \&\& \libconcept{same_to}, decay_t{>}}, then \tcode{*o} after any above assignment is equal to the value of \tcode{E} before the assignment. \end{itemize} @@ -1264,30 +1264,30 @@ \pnum \begin{note} -\tcode{Writable} has the awkward \tcode{const_cast} expressions to reject +\libconcept{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}} +\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{EqualityComparable}. +nor is the type required to be \libconcept{equality_comparable}. -\indexlibrary{\idxcode{WeaklyIncrementable}}% +\indexlibrary{\idxcode{weakly_incrementable}}% \begin{codeblock} template - concept WeaklyIncrementable = - Semiregular && + concept weakly_incrementable = + semiregular && requires(I i) { typename iter_difference_t; - requires SignedIntegral>; - { ++i } -> Same; // not required to be equality-preserving + requires signed_integral>; + { ++i } -> same_to; // not required to be equality-preserving i++; // not required to be equality-preserving }; \end{codeblock} @@ -1295,7 +1295,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{\libconcept{weakly_incrementable}} only if \begin{itemize} \item The expressions \tcode{++i} and \tcode{i++} have the same domain. @@ -1308,7 +1308,7 @@ \pnum \begin{note} -For \tcode{WeaklyIncrementable} types, \tcode{a} equals \tcode{b} does not imply that \tcode{++a} +For \libconcept{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 @@ -1316,31 +1316,31 @@ 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{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}. +in the definition of \libconcept{weakly_incrementable}. \end{note} -\indexlibrary{\idxcode{Incrementable}}% +\indexlibrary{\idxcode{incrementable}}% \begin{codeblock} template - concept Incrementable = - Regular && - WeaklyIncrementable && + concept incrementable = + regular && + weakly_incrementable && requires(I i) { - { i++ } -> Same; + { i++ } -> same_to; }; \end{codeblock} \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)}. @@ -1355,14 +1355,14 @@ \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{increment\-able}. \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 @@ -1370,29 +1370,29 @@ 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}@; } && - WeaklyIncrementable; + weakly_incrementable; \end{codeblock} -\rSec3[iterator.concept.sentinel]{Concept \libconcept{Sentinel}} +\rSec3[iterator.concept.sentinel]{Concept \libconcept{sentinel_for}} \pnum -The \libconcept{Sentinel} concept specifies the relationship -between an \libconcept{Iterator} type and a \libconcept{Semiregular} type +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 = - Semiregular && - Iterator && + concept sentinel_for = + semiregular && + input_or_output_iterator && @\placeholder{weakly-equality-comparable-with}@; // See \ref{concept.equalitycomparable} \end{itemdecl} @@ -1400,7 +1400,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. @@ -1418,24 +1418,24 @@ 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 -requirements on an \libconcept{Iterator} and a \libconcept{Sentinel} +The \libconcept{sized_sentinel_for} concept specifies +requirements on an \libconcept{input_or_output_iterator} and a \libconcept{senti\-nel_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 = - Sentinel && + concept sized_sentinel_for = + sentinel_for && !disable_sized_sentinel, remove_cv_t> && requires(const I& i, const S& s) { - { s - i } -> Same>; - { i - s } -> Same>; + { s - i } -> same_to>; + { i - s } -> same_to>; }; \end{itemdecl} @@ -1445,7 +1445,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}, @@ -1459,55 +1459,55 @@ \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 -\libconcept{RandomAccessIterator}s\iref{iterator.concept.random.access} and by +The \libconcept{sized_sentinel_for} concept is modeled by pairs of +\libconcept{random_access_iterator}s\iref{iterator.concept.random.access} and by counted iterators and their sentinels\iref{counted.iterator}. \end{example} -\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 +\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 = - Iterator && - Readable && + concept input_iterator = + input_or_output_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}} +\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. +\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}}% +\indexlibrary{\idxcode{output_iterator}}% \begin{codeblock} template - concept OutputIterator = - Iterator && - Writable && + concept output_iterator = + input_or_output_iterator && + writable && requires(I i, T&& t) { *i++ = std::forward(t); // not required to be equality-preserving }; @@ -1515,7 +1515,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; @@ -1528,20 +1528,20 @@ 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 equality comparison and +The \libconcept{forward_iterator} concept adds equality comparison and the multi-pass guarantee, specified below. -\indexlibrary{\idxcode{ForwardIterator}}% +\indexlibrary{\idxcode{forward_iterator}}% \begin{codeblock} template - concept ForwardIterator = - InputIterator && - DerivedFrom<@\placeholdernc{ITER_CONCEPT}@(I), forward_iterator_tag> && - Incrementable && - Sentinel; + concept forward_iterator = + input_iterator && + derived_from<@\placeholdernc{ITER_CONCEPT}@(I), forward_iterator_tag> && + incrementable && + sentinel_for; \end{codeblock} \pnum @@ -1579,21 +1579,21 @@ 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 = - ForwardIterator && - DerivedFrom<@\placeholdernc{ITER_CONCEPT}@(I), bidirectional_iterator_tag> && + concept bidirectional_iterator = + forward_iterator && + derived_from<@\placeholdernc{ITER_CONCEPT}@(I), bidirectional_iterator_tag> && requires(I i) { - { --i } -> Same; - { i-- } -> Same; + { --i } -> same_to; + { i-- } -> same_to; }; \end{codeblock} @@ -1604,7 +1604,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, @@ -1620,29 +1620,29 @@ \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 = - BidirectionalIterator && - DerivedFrom<@\placeholdernc{ITER_CONCEPT}@(I), random_access_iterator_tag> && - StrictTotallyOrdered && - SizedSentinel && + concept random_access_iterator = + bidirectional_iterator && + derived_from<@\placeholdernc{ITER_CONCEPT}@(I), random_access_iterator_tag> && + totally_ordered && + sized_sentinel_for && 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_to; + { j + n } -> same_to; + { n + j } -> same_to; + { i -= n } -> same_to; + { j - n } -> same_to; + { j[n] } -> same_to>; }; \end{codeblock} @@ -1652,7 +1652,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}. @@ -1674,27 +1674,27 @@ \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}@ = - RandomAccessIterator && - DerivedFrom<@\placeholdernc{ITER_CONCEPT}@(I), contiguous_iterator_tag> && + concept @\libconcept{contiguous_iterator}@ = + random_access_iterator && + derived_from<@\placeholdernc{ITER_CONCEPT}@(I), contiguous_iterator_tag> && is_lvalue_reference_v> && - Same, remove_cvref_t>>; + same_to, remove_cvref_t>>; \end{codeblock} \pnum Let \tcode{a} and \tcode{b} be dereferenceable iterators of type \tcode{I} such that \tcode{b} is reachable from \tcode{a}, 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 \tcode{addressof(*(a + D(b - a)))} is equal to \tcode{addressof(*a) + D(b - a)}. @@ -2171,62 +2171,62 @@ The indirect callable concepts are used to constrain those algorithms that accept callable objects~(\ref{func.def}) as arguments. -\indexlibrary{\idxcode{IndirectUnaryInvocable}}% -\indexlibrary{\idxcode{IndirectRegularUnaryInvocable}}% -\indexlibrary{\idxcode{IndirectUnaryPredicate}}% -\indexlibrary{\idxcode{IndirectRelation}}% -\indexlibrary{\idxcode{IndirectStrictWeakOrder}}% +\indexlibrary{\idxcode{indirectly_unary_invocable}}% +\indexlibrary{\idxcode{indirectly_regular_unary_invocable}}% +\indexlibrary{\idxcode{indirect_unary_predicate}}% +\indexlibrary{\idxcode{indirect_relation}}% +\indexlibrary{\idxcode{indirect_strict_weak_order}}% \begin{codeblock} namespace std { template - concept IndirectUnaryInvocable = - Readable && - CopyConstructible && - Invocable&> && - Invocable> && - Invocable> && - CommonReference< + concept indirectly_unary_invocable = + readable && + copy_constructible && + invocable&> && + invocable> && + invocable> && + common_reference_with< invoke_result_t&>, invoke_result_t>>; template - concept IndirectRegularUnaryInvocable = - Readable && - CopyConstructible && - RegularInvocable&> && - RegularInvocable> && - RegularInvocable> && - CommonReference< + concept indirectly_regular_unary_invocable = + readable && + copy_constructible && + regular_invocable&> && + regular_invocable> && + regular_invocable> && + common_reference_with< invoke_result_t&>, invoke_result_t>>; template - concept IndirectUnaryPredicate = - Readable && - CopyConstructible && - Predicate&> && - Predicate> && - Predicate>; + concept indirect_unary_predicate = + readable && + copy_constructible && + predicate&> && + predicate> && + predicate>; template - concept IndirectRelation = - Readable && Readable && - CopyConstructible && - Relation&, iter_value_t&> && - Relation&, iter_reference_t> && - Relation, iter_value_t&> && - Relation, iter_reference_t> && - Relation, iter_common_reference_t>; + concept indirect_relation = + 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>; template - concept IndirectStrictWeakOrder = - Readable && Readable && - CopyConstructible && - StrictWeakOrder&, iter_value_t&> && - StrictWeakOrder&, iter_reference_t> && - StrictWeakOrder, iter_value_t&> && - StrictWeakOrder, iter_reference_t> && - StrictWeakOrder, iter_common_reference_t>; + concept indirect_strict_weak_order = + readable && readable && + copy_constructible && + 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} @@ -2235,21 +2235,21 @@ \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 }; - template + template struct incrementable_traits> { using difference_type = iter_difference_t; }; @@ -2265,17 +2265,17 @@ 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 -\libconcept{Writable} types: -\libconcept{Indirectly\-Movable}, -\libconcept{Indir\-ect\-ly\-Copy\-able}, and -\libconcept{Indirectly\-Swappable}. +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}. There are three relational concepts for rearrangements: -\libconcept{Permut\-able}, -\libconcept{Mergeable}, and -\libconcept{Sortable}. +\libconcept{permut\-able}, +\libconcept{mergeable}, and +\libconcept{sortable}. There is one relational concept for comparing values from different sequences: -\libconcept{IndirectlyComparable}. +\libconcept{indirectly_comparable}. \pnum \begin{note} @@ -2284,41 +2284,41 @@ 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 -a \libconcept{Readable} type and a \libconcept{Writable} type between which +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 = - Readable && - Writable>; + concept indirectly_movable = + readable && + writable>; \end{codeblock} \pnum -The \libconcept{IndirectlyMovableStorable} concept augments -\libconcept{IndirectlyMovable} with additional requirements enabling +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. +\libconcept{readable} type's value type. -\indexlibrary{\idxcode{IndirectlyMovableStorable}}% +\indexlibrary{\idxcode{indirectly_movable_storable}}% \begin{codeblock} template - concept IndirectlyMovableStorable = - IndirectlyMovable && - Writable> && - Movable> && - Constructible, iter_rvalue_reference_t> && - Assignable&, iter_rvalue_reference_t>; + concept indirectly_movable_storable = + indirectly_movable && + writable> && + movable> && + constructible_from, iter_rvalue_reference_t> && + assignable_from&, iter_rvalue_reference_t>; \end{codeblock} \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)); @@ -2328,42 +2328,42 @@ 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 -a \libconcept{Readable} type and a \libconcept{Writable} type between which +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 = - Readable && - Writable>; + concept indirectly_copyable = + readable && + writable>; \end{codeblock} \pnum -The \libconcept{IndirectlyCopyableStorable} concept augments -\libconcept{IndirectlyCopyable} with additional requirements enabling +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 +\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 = - IndirectlyCopyable && - Writable&> && - Copyable> && - Constructible, iter_reference_t> && - Assignable&, iter_reference_t>; + concept indirectly_copyable_storable = + indirectly_copyable && + writable&> && + copyable> && + constructible_from, iter_reference_t> && + assignable_from&, iter_reference_t>; \end{codeblock} \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); @@ -2373,17 +2373,17 @@ 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 -between the values referenced by two \libconcept{Readable} types. +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 = - Readable && Readable && + concept indirectly_swappable = + readable && readable && requires(I1& i1, I2& i2) { ranges::iter_swap(i1, i1); ranges::iter_swap(i2, i2); @@ -2392,67 +2392,67 @@ }; \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 = - IndirectRelation, projected>; + concept indirectly_comparable = + indirect_relation, 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 = - ForwardIterator && - IndirectlyMovableStorable && - IndirectlySwappable; + concept permutable = + forward_iterator && + indirectly_movable_storable && + 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 = - InputIterator && - InputIterator && - WeaklyIncrementable && - IndirectlyCopyable && - IndirectlyCopyable && - IndirectStrictWeakOrder, projected>; + concept mergeable = + input_iterator && + input_iterator && + weakly_incrementable && + indirectly_copyable && + indirectly_copyable && + 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 = - Permutable && - IndirectStrictWeakOrder>; + concept sortable = + permutable && + indirect_strict_weak_order>; \end{codeblock} \rSec1[iterator.primitives]{Iterator primitives} @@ -2658,8 +2658,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} @@ -2696,20 +2696,20 @@ \indexlibrary{\idxcode{advance}}% \begin{itemdecl} -template +template constexpr void ranges::advance(I& i, iter_difference_t n); \end{itemdecl} \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 \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}. @@ -2719,7 +2719,7 @@ \indexlibrary{\idxcode{advance}}% \begin{itemdecl} -template S> +template S> constexpr void ranges::advance(I& i, S bound); \end{itemdecl} @@ -2731,9 +2731,9 @@ \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}}, +\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}. @@ -2742,7 +2742,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} @@ -2752,13 +2752,13 @@ 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} and \tcode{S} model \tcode{\libconcept{Same}}. +\tcode{I} models \libconcept{bidirectional_iterator}, and +\tcode{I} and \tcode{S} model \tcode{\libconcept{same_to}}. \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)}. @@ -2784,7 +2784,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} @@ -2794,11 +2794,11 @@ \range{first}{last} denotes a range, or \range{last}{first} denotes a range and \tcode{S} and \tcode{I} model -\tcode{Same \&\& SizedSentinel}. +\tcode{\libconcept{same_to} \&\& \libconcept{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} @@ -2808,14 +2808,14 @@ \indexlibrary{\idxcode{distance}}% \begin{itemdecl} -template +template constexpr iter_difference_t> ranges::distance(R&& r); \end{itemdecl} \begin{itemdescr} \pnum \effects -If \tcode{R} models \libconcept{SizedRange}, equivalent to: +If \tcode{R} models \libconcept{sized_range}, equivalent to: \begin{codeblock} return ranges::size(r); // \ref{range.prim.size} \end{codeblock} @@ -2829,7 +2829,7 @@ \indexlibrary{\idxcode{next}}% \begin{itemdecl} -template +template constexpr I ranges::next(I x); \end{itemdecl} @@ -2840,7 +2840,7 @@ \indexlibrary{\idxcode{next}}% \begin{itemdecl} -template +template constexpr I ranges::next(I x, iter_difference_t n); \end{itemdecl} @@ -2851,7 +2851,7 @@ \indexlibrary{\idxcode{next}}% \begin{itemdecl} -template S> +template S> constexpr I ranges::next(I x, S bound); \end{itemdecl} @@ -2862,7 +2862,7 @@ \indexlibrary{\idxcode{next}}% \begin{itemdecl} -template S> +template S> constexpr I ranges::next(I x, iter_difference_t n, S bound); \end{itemdecl} @@ -2874,7 +2874,7 @@ \rSec3[range.iter.op.prev]{\tcode{ranges::prev}} \indexlibrary{\idxcode{prev}}% \begin{itemdecl} -template +template constexpr I ranges::prev(I x); \end{itemdecl} @@ -2885,7 +2885,7 @@ \indexlibrary{\idxcode{prev}}% \begin{itemdecl} -template +template constexpr I ranges::prev(I x, iter_difference_t n); \end{itemdecl} @@ -2896,7 +2896,7 @@ \indexlibrary{\idxcode{prev}}% \begin{itemdecl} -template +template constexpr I ranges::prev(I x, iter_difference_t n, I bound); \end{itemdecl} @@ -2950,7 +2950,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@); @@ -2966,7 +2966,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} @@ -2978,7 +2978,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} @@ -2991,7 +2991,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, @@ -2999,7 +2999,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 @@ -3431,7 +3431,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@); @@ -3923,28 +3923,28 @@ 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> + template S> friend constexpr bool operator==(const move_sentinel& x, const move_iterator& y); - template S> + template S> friend constexpr bool operator!=(const move_iterator& x, const move_sentinel& y); - template S> + template S> friend constexpr bool operator!=(const move_sentinel& x, const move_iterator& 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 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))); @@ -3962,7 +3962,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} @@ -3972,16 +3972,16 @@ \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} -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} or model -\libconcept{RandomAccess\-Iterator}\iref{iterator.concept.random.access}. +\libconcept{random_access_iterator}\iref{iterator.concept.random.access}. \rSec3[move.iter.cons]{Construction and assignment} @@ -4096,7 +4096,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; @@ -4187,10 +4187,10 @@ 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); -template S> +template S> friend constexpr bool operator==(const move_sentinel& x, const move_iterator& y); \end{itemdecl} @@ -4210,10 +4210,10 @@ 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); -template S> +template S> friend constexpr bool operator!=(const move_sentinel& x, const move_iterator& y); \end{itemdecl} @@ -4300,10 +4300,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} @@ -4343,7 +4343,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))); @@ -4370,9 +4370,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{\libconcept{sentinel_for}, move_iterator{>}} as well. \pnum \begin{example} @@ -4380,9 +4380,9 @@ \tcode{copy_if} using \tcode{move_iterator} and \tcode{move_sentinel}: \begin{codeblock} -template S, WeaklyIncrementable O, - IndirectUnaryPredicate Pred> - requires IndirectlyMovable +template S, weakly_incrementable O, + indirect_unary_predicate Pred> + 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); } @@ -4392,16 +4392,16 @@ \indexlibrary{\idxcode{move_sentinel}}% \begin{codeblock} namespace std { - template + template class move_sentinel { public: 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 + requires assignable_from constexpr move_sentinel& operator=(const move_sentinel& s); constexpr S base() const; @@ -4438,7 +4438,7 @@ \indexlibrary{\idxcode{move_sentinel}!constructor}% \begin{itemdecl} template - requires ConvertibleTo + requires convertible_to constexpr move_sentinel(const move_sentinel& s); \end{itemdecl} @@ -4451,7 +4451,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} @@ -4494,20 +4494,20 @@ \indexlibrary{\idxcode{common_iterator}}% \begin{codeblock} namespace std { - template S> - requires (!Same) + template S> + requires (!same_to) class common_iterator { public: constexpr common_iterator() = default; 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 && - Assignable && Assignable + requires convertible_to && convertible_to && + assignable_from && assignable_from common_iterator& operator=(const common_iterator& x); decltype(auto) operator*(); @@ -4519,28 +4519,28 @@ 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 && EqualityComparableWith + template S2> + requires sentinel_for && equality_comparable_with friend bool operator==( const common_iterator& x, const common_iterator& y); - template S2> - requires Sentinel + template S2> + requires sentinel_for 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); friend iter_rvalue_reference_t iter_move(const common_iterator& i) noexcept(noexcept(ranges::iter_move(declval()))) - requires InputIterator; - template I2, class S2> + 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()))); @@ -4553,7 +4553,7 @@ using difference_type = iter_difference_t; }; - template + template struct iterator_traits> { using iterator_concept = @\seebelow@; using iterator_category = @\seebelow@; @@ -4573,14 +4573,14 @@ \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 \tcode{iterator_category} denotes \tcode{forward_iterator_tag} if \tcode{iterator_traits::iterator_category} -models \tcode{DerivedFrom}; +models \tcode{\libconcept{derived_from}}; otherwise it denotes \tcode{input_iterator_tag}. \item @@ -4617,7 +4617,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} @@ -4635,8 +4635,8 @@ \indexlibrarymember{operator=}{common_iterator}% \begin{itemdecl} template - requires ConvertibleTo && ConvertibleTo && - Assignable && Assignable + requires convertible_to && convertible_to && + assignable_from && assignable_from common_iterator& operator=(const common_iterator& x); \end{itemdecl} @@ -4686,10 +4686,10 @@ \pnum The expression in the requires clause is equivalent to: \begin{codeblock} -Readable && +readable && (requires(const I& i) { i.operator->(); } || is_reference_v> || - Constructible, iter_reference_t>) + constructible_from, iter_reference_t>) \end{codeblock} \pnum @@ -4757,7 +4757,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; @@ -4770,8 +4770,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} @@ -4791,8 +4791,8 @@ \indexlibrarymember{operator==}{common_iterator}% \begin{itemdecl} -template S2> - requires Sentinel && EqualityComparableWith +template S2> + requires sentinel_for && equality_comparable_with friend bool operator==( const common_iterator& x, const common_iterator& y); \end{itemdecl} @@ -4812,8 +4812,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} @@ -4825,8 +4825,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} @@ -4850,7 +4850,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} @@ -4863,7 +4863,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} @@ -4930,7 +4930,7 @@ \indexlibrary{\idxcode{counted_iterator}}% \begin{codeblock} namespace std { - template + template class counted_iterator { public: using iterator_type = I; @@ -4938,11 +4938,11 @@ 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 - requires Assignable + requires assignable_from constexpr counted_iterator& operator=(const counted_iterator& x); constexpr I base() const; @@ -4954,23 +4954,23 @@ constexpr counted_iterator& operator++(); decltype(auto) operator++(int); constexpr counted_iterator operator++(int) - requires ForwardIterator; + 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; + 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; - template I2> + requires random_access_iterator; + template I2> friend constexpr iter_difference_t operator-( const counted_iterator& x, const counted_iterator& y); friend constexpr iter_difference_t operator-( @@ -4978,12 +4978,12 @@ 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> + template I2> friend constexpr bool operator==( const counted_iterator& x, const counted_iterator& y); friend constexpr bool operator==( @@ -4991,7 +4991,7 @@ friend constexpr bool operator==( default_sentinel_t, const counted_iterator& x); - template I2> + template I2> friend constexpr bool operator!=( const counted_iterator& x, const counted_iterator& y); friend constexpr bool operator!=( @@ -4999,23 +4999,23 @@ friend constexpr bool operator!=( default_sentinel_t x, const counted_iterator& y); - template I2> + template I2> friend constexpr bool operator<( const counted_iterator& x, const counted_iterator& y); - template I2> + template I2> friend constexpr bool operator>( const counted_iterator& x, const counted_iterator& y); - template I2> + template I2> friend constexpr bool operator<=( const counted_iterator& x, const counted_iterator& y); - template I2> + template I2> friend constexpr bool operator>=( const counted_iterator& x, const counted_iterator& y); friend constexpr iter_rvalue_reference_t iter_move(const counted_iterator& i) noexcept(noexcept(ranges::iter_move(i.current))) - requires InputIterator; - template I2> + 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))); @@ -5029,7 +5029,7 @@ using difference_type = iter_difference_t; }; - template + template struct iterator_traits> : iterator_traits { using pointer = void; }; @@ -5056,7 +5056,7 @@ \indexlibrary{\idxcode{counted_iterator}!constructor}% \begin{itemdecl} template - requires ConvertibleTo + requires convertible_to constexpr counted_iterator(const counted_iterator& x); \end{itemdecl} @@ -5070,7 +5070,7 @@ \indexlibrarymember{operator=}{counted_iterator}% \begin{itemdecl} template - requires Assignable + requires assignable_from constexpr counted_iterator& operator=(const counted_iterator& x); \end{itemdecl} @@ -5123,7 +5123,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} @@ -5175,7 +5175,7 @@ \indexlibrarymember{operator++}{counted_iterator}% \begin{itemdecl} constexpr counted_iterator operator++(int) - requires ForwardIterator; + requires forward_iterator; \end{itemdecl} \begin{itemdescr} @@ -5191,7 +5191,7 @@ \indexlibrarymember{operator{-}-}{counted_iterator}% \begin{itemdecl} constexpr counted_iterator& operator--(); - requires BidirectionalIterator + requires bidirectional_iterator \end{itemdecl} \begin{itemdescr} @@ -5207,7 +5207,7 @@ \indexlibrarymember{operator{-}-}{counted_iterator}% \begin{itemdecl} constexpr counted_iterator operator--(int) - requires BidirectionalIterator; + requires bidirectional_iterator; \end{itemdecl} \begin{itemdescr} @@ -5223,7 +5223,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} @@ -5235,7 +5235,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} @@ -5246,7 +5246,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} @@ -5265,7 +5265,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} @@ -5275,7 +5275,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} @@ -5316,7 +5316,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} @@ -5336,7 +5336,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} @@ -5366,7 +5366,7 @@ \indexlibrarymember{operator"!=}{counted_iterator}% \begin{itemdecl} -template I2> +template I2> friend constexpr bool operator!=( const counted_iterator& x, const counted_iterator& y); friend constexpr bool operator!=( @@ -5382,7 +5382,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} @@ -5405,7 +5405,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} @@ -5417,7 +5417,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} @@ -5429,7 +5429,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} @@ -5446,7 +5446,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} @@ -5456,7 +5456,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))); @@ -5474,7 +5474,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 @@ -5494,13 +5494,13 @@ \begin{codeblock} namespace std { struct unreachable_sentinel_t { - template + template friend constexpr bool operator==(unreachable_sentinel_t, const I&) noexcept; - template + template friend constexpr bool operator==(const I&, unreachable_sentinel_t) noexcept; - template + template friend constexpr bool operator!=(unreachable_sentinel_t, const I&) noexcept; - template + template friend constexpr bool operator!=(const I&, unreachable_sentinel_t) noexcept; }; } @@ -5511,9 +5511,9 @@ \indexlibrary{\idxcode{operator==}!\idxcode{unreachable_sentinel_t}}% \indexlibrary{\idxcode{unreachable_sentinel_t}!\idxcode{operator==}}% \begin{itemdecl} -template +template friend constexpr bool operator==(unreachable_sentinel_t, const I&) noexcept; -template +template friend constexpr bool operator==(const I&, unreachable_sentinel_t) noexcept; \end{itemdecl} @@ -5525,9 +5525,9 @@ \indexlibrary{\idxcode{operator"!=}!\idxcode{unreachable_sentinel_t}}% \indexlibrary{\idxcode{unreachable_sentinel_t}!\idxcode{operator"!=}}% \begin{itemdecl} -template +template friend constexpr bool operator!=(unreachable_sentinel_t, const I&) noexcept; -template +template friend constexpr bool operator!=(const I&, unreachable_sentinel_t) noexcept; \end{itemdecl} diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 4e0f17489f..1860d4662e 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 @@ -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} @@ -998,7 +998,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 @@ -1006,7 +1006,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 5f1defb9d6..5a49b408b9 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -1554,7 +1554,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 @@ -1947,17 +1947,17 @@ \begin{codeblock} template - concept UniformRandomBitGenerator = - Invocable && UnsignedIntegral> && + concept uniform_random_bit_generator = + invocable && unsigned_integral> && requires { - { G::min() } -> Same>; - { G::max() } -> Same>; + { G::min() } -> same_to>; + { G::max() } -> same_to>; }; \end{codeblock} \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 @@ -1972,7 +1972,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} @@ -8491,12 +8491,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 671c82b245..2c0b31be6e 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -54,14 +54,14 @@ using sentinel_t = decltype(ranges::end(declval())); template - concept Range = @\seebelow@; + concept range = @\seebelow@; // \ref{range.sized}, sized ranges template inline constexpr bool disable_sized_range = false; template - concept SizedRange = @\seebelow@; + concept sized_range = @\seebelow@; // \ref{range.view}, views template @@ -70,52 +70,52 @@ struct view_base { }; template - concept View = @\seebelow@; + concept view = @\seebelow@; // \ref{range.refinements}, other range refinements template - concept OutputRange = @\seebelow@; + concept output_range = @\seebelow@; template - concept InputRange = @\seebelow@; + concept input_range = @\seebelow@; template - concept ForwardRange = @\seebelow@; + concept forward_range = @\seebelow@; template - concept BidirectionalRange = @\seebelow@; + concept bidirectional_range = @\seebelow@; template - concept RandomAccessRange = @\seebelow@; + concept random_access_range = @\seebelow@; template - concept ContiguousRange = @\seebelow@; + concept contiguous_range = @\seebelow@; template - concept CommonRange = @\seebelow@; + concept common_range = @\seebelow@; template - concept ViewableRange = @\seebelow@; + concept viewable_range = @\seebelow@; // \ref{view.interface}, class template \tcode{view_interface} template - requires is_class_v && Same> + requires is_class_v && same_to> class view_interface; // \ref{range.subrange}, sub-ranges enum class subrange_kind : bool { unsized, sized }; - template S = I, subrange_kind K = @\seebelow@> - requires (K == subrange_kind::sized || !SizedSentinel) + template S = I, subrange_kind K = @\seebelow@> + requires (K == subrange_kind::sized || !sized_sentinel_for) class subrange; // \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>; @@ -124,96 +124,96 @@ requires is_object_v class empty_view; - namespace view { + namespace views { template inline constexpr empty_view empty{}; } // \ref{range.single}, single view - template + template 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 + 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 + template using all_view = decltype(view::all(declval())); - template + template requires is_object_v class ref_view; // \ref{range.filter}, filter view - template> Pred> - requires View && is_object_v + template> Pred> + 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 - requires View && is_object_v && - RegularInvocable>> + template + requires view && is_object_v && + regular_invocable>> 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; + template class take_view; - namespace view { inline constexpr @\unspec@ take = @\unspec@; } + namespace views { inline constexpr @\unspec@ take = @\unspec@; } // \ref{range.join}, join view - template - requires View && InputRange>> && + template + requires view && input_range>> && (is_reference_v>> || - View>>) + view>>) class join_view; - namespace view { inline constexpr @\unspec@ join = @\unspec@; } + namespace views { inline constexpr @\unspec@ join = @\unspec@; } // \ref{range.split}, split view template concept @\placeholder{tiny-range}@ = @\seebelow@; // \expos - template - requires View && View && - IndirectlyComparable, iterator_t, ranges::equal_to> && - (ForwardRange || @\placeholder{tiny-range}@) + template + requires view && view && + indirectly_comparable, iterator_t, ranges::equal_to> && + (forward_range || @\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) + template + requires (!common_range) 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 + template + requires bidirectional_range class reverse_view; - namespace view { inline constexpr @\unspec@ reverse = @\unspec@; } + namespace views { inline constexpr @\unspec@ reverse = @\unspec@; } } namespace std { - namespace view = ranges::view; + namespace views = ranges::views; template struct tuple_size> @@ -250,11 +250,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 \libconcept{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 \libconcept{input_or_output_iterator} with overload resolution performed in a context that includes the declarations: \begin{codeblock} template void begin(T&&) = delete; @@ -274,7 +274,7 @@ \pnum \begin{note} Whenever \tcode{ranges::begin(E)} is a valid expression, its type models -\tcode{Iterator}. +\libconcept{input_or_output_iterator}. \end{note} \rSec2[range.access.end]{\tcode{ranges::end}} @@ -293,12 +293,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{\libconcept{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{\libconcept{sentinel_for}} with overload resolution performed in a context that includes the declarations: \begin{codeblock} template void end(T&&) = delete; @@ -320,7 +320,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}} @@ -337,7 +337,7 @@ \pnum \begin{note} Whenever \tcode{ranges::cbegin(E)} is a valid expression, its type models -\tcode{Iterator}. +\libconcept{input_or_output_iterator}. \end{note} \rSec2[range.access.cend]{\tcode{ranges::cend}} @@ -357,7 +357,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}} @@ -370,11 +370,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 \libconcept{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 \libconcept{input_or_output_iterator} with overload resolution performed in a context that includes the declaration: \begin{codeblock} template void rbegin(T&&) = delete; @@ -386,7 +386,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. @@ -399,7 +399,7 @@ \pnum \begin{note} Whenever \tcode{ranges::rbegin(E)} is a valid expression, its type models -\tcode{Iterator}. +\libconcept{input_or_output_iterator}. \end{note} \rSec2[range.access.rend]{\tcode{ranges::rend}} @@ -413,12 +413,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{\libconcept{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{\libconcept{sentinel_for}} with overload resolution performed in a context that includes the declaration: \begin{codeblock} template void rend(T&&) = delete; @@ -430,7 +430,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. @@ -445,7 +445,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}} @@ -463,7 +463,7 @@ \pnum \begin{note} Whenever \tcode{ranges::crbegin(E)} is a valid expression, its -type models \tcode{Iterator}. +type models \libconcept{input_or_output_iterator}. \end{note} \rSec2[range.access.crend]{\tcode{ranges::crend}} @@ -483,7 +483,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}} @@ -506,12 +506,12 @@ \item \tcode{\placeholdernc{decay-copy}(E.size())} if it is a valid expression and its type \tcode{I} - models \libconcept{Integral}. + models \libconcept{integral}. \item Otherwise, \tcode{\placeholdernc{decay-copy}(size(E))} if it is a valid expression and its type \tcode{I} - models \libconcept{Integral} + models \libconcept{integral} with overload resolution performed in a context that includes the declaration: \begin{codeblock} @@ -526,8 +526,8 @@ 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{Forward\-Iterator}}. + \tcode{\libconcept{sized_sentinel_for}}\iref{iterator.concept.sizedsentinel} and + \tcode{\libconcept{forward_iterator}}. However, \tcode{E} is evaluated only once. \item @@ -541,7 +541,7 @@ \pnum \begin{note} Whenever \tcode{ranges::size(E)} is a valid expression, its -type models \libconcept{Integral}. +type models \libconcept{integral}. \end{note} \rSec2[range.prim.empty]{\tcode{ranges::empty}} @@ -563,7 +563,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. @@ -593,7 +593,7 @@ \item Otherwise, if \tcode{ranges::begin(E)} is a valid expression whose type models - \tcode{ContiguousIterator}, + \libconcept{contiguous_iterator}, \begin{codeblock} ranges::begin(E) == ranges::end(E) ? nullptr : addressof(*ranges::begin(E)) \end{codeblock} @@ -640,33 +640,33 @@ 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}}. +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. \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{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 -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} 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. @@ -674,11 +674,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 @@ -688,11 +688,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} @@ -719,18 +719,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 +\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}. 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} @@ -770,15 +770,15 @@ \rSec2[range.sized]{Sized ranges} \pnum -The \libconcept{SizedRange} concept specifies the requirements -of a \libconcept{Range} type that knows its size in constant time with the +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 = - Range && + concept sized_range = + range && !disable_sized_range> && requires(T& t) { ranges::size(t); }; \end{itemdecl} @@ -786,21 +786,21 @@ \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}, 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} \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 -does not model \libconcept{ForwardIterator} +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} \end{itemize} @@ -809,35 +809,35 @@ \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} \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} \rSec2[range.view]{Views} \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. +\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 @@ -846,26 +846,26 @@ \end{example} \indexlibrary{\idxcode{enable_view}}% -\indexlibrary{\idxcode{View}}% +\indexlibrary{\idxcode{view}}% \begin{itemdecl} template inline constexpr bool enable_view = @\seebelow@; template - concept View = - Range && Semiregular && enable_view; + concept view = + range && semiregular && enable_view; \end{itemdecl} \begin{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}. \pnum 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{\libconcept{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}, @@ -873,7 +873,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{iter_reference_t{>}} is not the same type as \tcode{iter_reference_t{>}}, \tcode{false}. @@ -886,44 +886,44 @@ \pnum Pursuant to \ref{namespace.std}, users may specialize \tcode{enable_view} -to \tcode{true} for types which model \libconcept{View}, +to \tcode{true} for types which model \libconcept{view}, and \tcode{false} for types which do not. \end{itemdescr} \rSec2[range.refinements]{Other range refinements} \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}. -\libconcept{InputRange}, \libconcept{ForwardRange}, \libconcept{BidirectionalRange}, -and \libconcept{RandomAccessRange} are defined similarly. +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{forward_range}, \libconcept{bidirectional_range}, +and \libconcept{random_access_range} are defined similarly. -\indexlibrary{\idxcode{OutputRange}}% -\indexlibrary{\idxcode{InputRange}}% -\indexlibrary{\idxcode{ForwardRange}}% -\indexlibrary{\idxcode{BidirectionalRange}}% -\indexlibrary{\idxcode{RandomAccessRange}}% +\indexlibrary{\idxcode{output_range}}% +\indexlibrary{\idxcode{input_range}}% +\indexlibrary{\idxcode{forward_range}}% +\indexlibrary{\idxcode{bidirectional_range}}% +\indexlibrary{\idxcode{random_access_range}}% \begin{itemdecl} template - concept OutputRange = - Range && OutputIterator, T>; + concept output_range = + range && output_iterator, T>; template - concept InputRange = - Range && InputIterator>; + concept input_range = + range && input_iterator>; template - concept ForwardRange = - InputRange && ForwardIterator>; + concept forward_range = + input_range && forward_iterator>; template - concept BidirectionalRange = - ForwardRange && BidirectionalIterator>; + concept bidirectional_range = + forward_range && bidirectional_iterator>; template - concept RandomAccessRange = - BidirectionalRange && RandomAccessIterator>; + concept random_access_range = + bidirectional_range && random_access_iterator>; \end{itemdecl} \pnum @@ -931,40 +931,40 @@ 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 = - RandomAccessRange && ContiguousIterator> && + concept contiguous_range = + random_access_range && contiguous_iterator> && requires(T& t) { - { ranges::data(t) } -> Same>>>; + { ranges::data(t) } -> same_to>>>; }; \end{itemdecl} \pnum -The \libconcept{CommonRange} concept specifies requirements of -a \libconcept{Range} type for which \tcode{ranges::begin} and +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 = - Range && Same, sentinel_t>; + concept common_range = + range && same_to, 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. +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 = - Range && (@\placeholder{forwarding-range}@ || View>); + concept viewable_range = + range && (@\placeholder{forwarding-range}@ || view>); \end{itemdecl} \rSec1[range.utility]{Range utilities} @@ -982,31 +982,31 @@ \begin{codeblock} template concept @\placeholder{simple-view}@ = // \expos - View && Range && - Same, iterator_t> && - Same, sentinel_t>; + view && range && + same_to, iterator_t> && + same_to, sentinel_t>; -template +template concept @\placeholder{has-arrow}@ = // \expos is_pointer_v || requires(I i) { i.operator->(); }; template concept @\placeholder{not-same-as}@ = // \expos - !Same, remove_cvref_t>; + !same_to, remove_cvref_t>; \end{codeblock} \rSec2[view.interface]{View interface} \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}}% \begin{codeblock} namespace std::ranges { template - requires is_class_v && Same> + requires is_class_v && same_to> class view_interface : public view_base { private: constexpr D& derived() noexcept { // \expos @@ -1016,10 +1016,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()); } @@ -1032,35 +1032,35 @@ return !ranges::empty(derived()); } - constexpr auto data() requires ContiguousIterator> { + constexpr auto data() requires contiguous_iterator> { return ranges::empty(derived()) ? nullptr : addressof(*ranges::begin(derived())); } constexpr auto data() const - requires Range && ContiguousIterator> { + requires range && contiguous_iterator> { return ranges::empty(derived()) ? nullptr : addressof(*ranges::begin(derived())); } - constexpr auto size() requires ForwardRange && - SizedSentinel, iterator_t> { + constexpr auto size() requires forward_range && + sized_sentinel_for, iterator_t> { return ranges::end(derived()) - ranges::begin(derived()); } - constexpr auto size() const requires ForwardRange && - SizedSentinel, iterator_t> { + 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 BidirectionalRange && CommonRange; + constexpr decltype(auto) back() requires bidirectional_range && common_range; constexpr decltype(auto) back() const - requires BidirectionalRange && CommonRange; + requires bidirectional_range && common_range; - template + template constexpr decltype(auto) operator[](iter_difference_t> n) { return ranges::begin(derived())[n]; } - template + template constexpr decltype(auto) operator[](iter_difference_t> n) const { return ranges::begin(derived())[n]; } @@ -1073,14 +1073,14 @@ 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} \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} @@ -1093,9 +1093,9 @@ \indexlibrary{\idxcode{view_interface}!\idxcode{back}}% \begin{itemdecl} -constexpr decltype(auto) back() requires BidirectionalRange && CommonRange; +constexpr decltype(auto) back() requires bidirectional_range && common_range; constexpr decltype(auto) back() const - requires BidirectionalRange && CommonRange; + requires bidirectional_range && common_range; \end{itemdecl} \begin{itemdescr} @@ -1111,8 +1111,8 @@ \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{SizedRange} concept when the final template parameter is +\libconcept{view} concept. Additionally, it models the +\libconcept{sized_range} concept when the final template parameter is \tcode{subrange_kind::sized}. \indexlibrary{\idxcode{subrange}}% @@ -1122,7 +1122,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) } -> const tuple_element_t<0, T>&; @@ -1131,28 +1131,28 @@ template concept @\placeholdernc{pair-like-convertible-to}@ = // \expos - !Range && @\placeholder{pair-like}@> && + !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 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 - !Range && @\placeholdernc{pair-like}@ && - Sentinel, tuple_element_t<0, T>>; + !range && @\placeholdernc{pair-like}@ && + 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) + template S = I, subrange_kind K = + 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 iter_difference_t size_ = 0; // \expos; present only @@ -1167,11 +1167,11 @@ template<@\placeholdernc{not-same-as}@ R> requires @\placeholdernc{forwarding-range}@ && - ConvertibleTo, I> && ConvertibleTo, S> - constexpr subrange(R&& r) requires (!StoreSize || SizedRange); + convertible_to, I> && convertible_to, S> + constexpr subrange(R&& r) requires (!StoreSize || sized_range); template<@\placeholdernc{forwarding-range}@ R> - requires ConvertibleTo, I> && ConvertibleTo, S> + requires convertible_to, I> && convertible_to, S> constexpr subrange(R&& r, iter_difference_t n) requires (K == subrange_kind::sized) : subrange{ranges::begin(r), ranges::end(r), n} @@ -1204,14 +1204,14 @@ [[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(); } friend constexpr S end(subrange&& r) { return r.end(); } }; - template S> + template S> subrange(I, S, iter_difference_t) -> subrange; template<@\placeholder{iterator-sentinel-pair}@ P> @@ -1224,7 +1224,7 @@ template<@\placeholder{forwarding-range}@ R> subrange(R&&) -> subrange, sentinel_t, - (SizedRange || SizedSentinel, iterator_t>) + (sized_range || sized_sentinel_for, iterator_t>) ? subrange_kind::sized : subrange_kind::unsized>; template<@\placeholder{forwarding-range}@ R> @@ -1276,9 +1276,9 @@ \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{SizedSentinel}. +\libconcept{sized_sentinel_for}. \end{note} \end{itemdescr} @@ -1286,8 +1286,8 @@ \begin{itemdecl} template<@\placeholdernc{not-same-as}@ R> requires @\placeholdernc{forwarding-range}@ && - ConvertibleTo, I> && ConvertibleTo, S> -constexpr subrange(R&& r) requires (!StoreSize || SizedRange); + convertible_to, I> && convertible_to, S> +constexpr subrange(R&& r) requires (!StoreSize || sized_range); \end{itemdecl} \begin{itemdescr} @@ -1375,7 +1375,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} @@ -1383,7 +1383,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} @@ -1442,10 +1442,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 { @@ -1462,12 +1462,12 @@ \begin{codeblock} vector f(); auto result1 = ranges::find(f(), 42); // \#1 -static_assert(Same); +static_assert(same_to); auto vec = f(); auto result2 = ranges::find(vec, 42); // \#2 -static_assert(Same::iterator>); +static_assert(same_to::iterator>); auto result3 = ranges::find(subrange{vec}, 42); // \#3 -static_assert(Same::iterator>); +static_assert(same_to::iterator>); \end{codeblock} The call to \tcode{ranges::find} at \#1 returns \tcode{ranges::dangling} since \tcode{f()} is an rvalue \tcode{vector}; @@ -1482,17 +1482,17 @@ \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::view}. +Range factories are declared in namespace \tcode{std::ranges::views}. \rSec2[range.empty]{Empty view} \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 @@ -1529,7 +1529,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 @@ -1545,7 +1545,7 @@ \begin{codeblock} namespace std::ranges { - template + template requires is_object_v class single_view : public view_interface> { private: @@ -1555,7 +1555,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; @@ -1680,7 +1680,7 @@ concept @\placeholdernc{Advanceable}@ = // \expos @\seebelow@; - template + template requires @\placeholdernc{weakly-equality-comparable-with}@ class iota_view : public view_interface> { private: @@ -1698,17 +1698,17 @@ constexpr iterator begin() const; constexpr sentinel end() const; - constexpr iterator end() const requires Same; + constexpr iterator end() const requires same_to; constexpr auto size() const - requires (Same && @\placeholdernc{Advanceable}@) || - (Integral && Integral) || - SizedSentinel + requires (same_to && @\placeholdernc{Advanceable}@) || + (integral && integral) || + sized_sentinel_for { return bound_ - value_; } }; template - requires (!Integral || !Integral || is_signed_v == is_signed_v) + requires (!integral || !integral || is_signed_v == is_signed_v) iota_view(W, Bound) -> iota_view; } \end{codeblock} @@ -1718,9 +1718,9 @@ \begin{itemdecl} template concept @\placeholder{Decrementable}@ = - Incrementable && requires(I i) { - { --i } -> Same; - { i-- } -> Same; + incrementable && requires(I i) { + { --i } -> same_to; + { i-- } -> same_to; }; \end{itemdecl} @@ -1751,14 +1751,14 @@ \begin{itemdecl} template concept @\placeholder{Advanceable}@ = - @\placeholdernc{Decrementable}@ && StrictTotallyOrdered && + @\placeholdernc{Decrementable}@ && totally_ordered && requires(I i, const I j, const iter_difference_t n) { - { i += n } -> Same; - { i -= n } -> Same; - { j + n } -> Same; - { n + j } -> Same; - { j - n } -> Same; - { j - j } -> Same>; + { i += n } -> same_to; + { i -= n } -> same_to; + { j + n } -> same_to; + { n + j } -> same_to; + { j - n } -> same_to; + { j - j } -> same_to>; }; \end{itemdecl} @@ -1841,7 +1841,7 @@ \indexlibrary{\idxcode{end}!\idxcode{iota_view}}% \begin{itemdecl} -constexpr iterator end() const requires Same; +constexpr iterator end() const requires same_to; \end{itemdecl} \begin{itemdescr} @@ -1869,7 +1869,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}@; @@ -1882,18 +1882,18 @@ 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 EqualityComparable; + 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 iterator operator+(iterator i, difference_type n) requires @\placeholdernc{Advanceable}@; @@ -1915,7 +1915,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} @@ -1977,7 +1977,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} @@ -2063,7 +2063,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} @@ -2074,7 +2074,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} @@ -2085,7 +2085,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} @@ -2096,7 +2096,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} @@ -2107,7 +2107,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} @@ -2118,7 +2118,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} @@ -2254,12 +2254,12 @@ \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. \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 @@ -2283,10 +2283,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{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 -expressions are equivalent and yield a \libconcept{View}: +\tcode{decltype((R))} models \libconcept{viewable_range}, the following +expressions are equivalent and yield a \libconcept{view}: \begin{codeblock} C(R) @@ -2305,8 +2305,8 @@ \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 -\libconcept{View}. +that accepts a \libconcept{viewable_range} as its first argument and returns a +\libconcept{view}. \pnum If a range adaptor object accepts only one argument, @@ -2336,9 +2336,9 @@ \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{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) @@ -2346,7 +2346,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) @@ -2358,7 +2358,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) @@ -2374,8 +2374,8 @@ \rSec2[range.all]{All view} \pnum -\tcode{view::all} returns a \libconcept{View} that includes all elements of -its \libconcept{Range} argument. +\tcode{view::all} returns a \libconcept{view} that includes all elements of +its \libconcept{range} argument. \pnum The name \tcode{view::all} denotes a @@ -2385,7 +2385,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. @@ -2395,10 +2395,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: @@ -2419,10 +2419,10 @@ 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 + constexpr auto data() const requires contiguous_range { return ranges::data(*r_); } friend constexpr iterator_t begin(ref_view r) @@ -2452,7 +2452,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 @@ -2467,7 +2467,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 @@ -2484,8 +2484,8 @@ \begin{codeblock} namespace std::ranges { - template> Pred> - requires View && is_object_v + template> Pred> + requires view && is_object_v class filter_view : public view_interface> { private: V base_ = V(); // \expos @@ -2499,15 +2499,15 @@ public: filter_view() = default; constexpr filter_view(V base, Pred pred); - template - requires ViewableRange && Constructible> + template + requires viewable_range && constructible_from> constexpr filter_view(R&& r, Pred pred); constexpr V base() const; constexpr iterator begin(); constexpr auto end() { - if constexpr (CommonRange) + if constexpr (common_range) return iterator{*this, ranges::end(base_)}; else return sentinel{*this}; @@ -2532,8 +2532,8 @@ \indexlibrary{\idxcode{filter_view}!\idxcode{filter_view}}% \begin{itemdecl} -template - requires ViewableRange && Constructible> +template + requires viewable_range && constructible_from> constexpr filter_view(R&& r, Pred pred); \end{itemdecl} @@ -2569,7 +2569,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} @@ -2599,21 +2599,21 @@ constexpr iterator& operator++(); constexpr void operator++(int); - constexpr iterator operator++(int) requires ForwardRange; + constexpr iterator operator++(int) requires forward_range; - 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 EqualityComparable>; + requires equality_comparable>; friend constexpr bool operator!=(const iterator& x, const iterator& y) - requires EqualityComparable>; + requires equality_comparable>; friend constexpr iter_rvalue_reference_t> iter_move(const iterator& i) 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} @@ -2626,10 +2626,10 @@ \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 +\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}. @@ -2641,10 +2641,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{\libconcept{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{\libconcept{derived_from}}, then \tcode{iterator_category} denotes \tcode{forward_iterator_tag}. \item Otherwise, \tcode{iterator_category} denotes \tcode{input_iterator_tag}. @@ -2719,7 +2719,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} @@ -2734,7 +2734,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} @@ -2750,7 +2750,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} @@ -2766,7 +2766,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} @@ -2777,7 +2777,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} @@ -2800,7 +2800,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} @@ -2907,7 +2907,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 @@ -2924,9 +2924,9 @@ \begin{codeblock} namespace std::ranges { - template - requires View && is_object_v && - RegularInvocable>> + template + requires view && is_object_v && + regular_invocable>> class transform_view : public view_interface> { private: // \ref{range.transform.iterator}, class template \tcode{transform_view::iterator} @@ -2940,28 +2940,28 @@ public: transform_view() = default; constexpr transform_view(V base, F fun); - template - requires ViewableRange && Constructible> + template + requires viewable_range && constructible_from> constexpr transform_view(R&& r, F fun); constexpr V base() const; constexpr iterator begin(); constexpr iterator begin() const - requires Range && - RegularInvocable>>; + requires range && + regular_invocable>>; constexpr sentinel end(); - constexpr iterator end() requires CommonRange; + constexpr iterator end() requires common_range; constexpr sentinel end() const - requires Range && - RegularInvocable>>; + requires range && + regular_invocable>>; constexpr iterator end() const - requires CommonRange && - RegularInvocable>>; + requires common_range && + 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_); } }; @@ -2983,8 +2983,8 @@ \indexlibrary{\idxcode{transform_view}!\idxcode{transform_view}}% \begin{itemdecl} -template - requires ViewableRange && Constructible> +template + requires viewable_range && constructible_from> constexpr transform_view(R&& r, F fun); \end{itemdecl} @@ -3020,8 +3020,8 @@ \indexlibrary{\idxcode{begin}!\idxcode{transform_view}}% \begin{itemdecl} constexpr iterator begin() const - requires Range && - RegularInvocable>>; + requires range && + regular_invocable>>; \end{itemdecl} \begin{itemdescr} @@ -3047,7 +3047,7 @@ \indexlibrary{\idxcode{end}!\idxcode{transform_view}}% \begin{itemdecl} -constexpr iterator end() requires CommonRange; +constexpr iterator end() requires common_range; \end{itemdecl} \begin{itemdescr} @@ -3061,8 +3061,8 @@ \indexlibrary{\idxcode{end}!\idxcode{transform_view}}% \begin{itemdecl} constexpr sentinel end() const - requires Range && - RegularInvocable>>; + requires range && + regular_invocable>>; \end{itemdecl} \begin{itemdescr} @@ -3076,8 +3076,8 @@ \indexlibrary{\idxcode{end}!\idxcode{transform_view}}% \begin{itemdecl} constexpr iterator end() const - requires CommonRange && - RegularInvocable>>; + requires common_range && + regular_invocable>>; \end{itemdecl} \begin{itemdescr} @@ -3113,7 +3113,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 @@ -3121,42 +3121,42 @@ constexpr iterator& operator++(); constexpr void operator++(int); - constexpr iterator operator++(int) requires ForwardRange; + constexpr iterator operator++(int) requires forward_range; - 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; + 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 EqualityComparable>; + requires equality_comparable>; 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; + 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 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_))) @@ -3169,7 +3169,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} @@ -3177,13 +3177,13 @@ \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{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 +\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}. @@ -3192,7 +3192,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{derived_from}}, then \tcode{iterator_category} denotes \tcode{random_access_iterator_tag}; otherwise, \tcode{iterator_category} denotes \tcode{C}. @@ -3211,7 +3211,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} @@ -3256,7 +3256,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} @@ -3271,7 +3271,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} @@ -3285,7 +3285,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} @@ -3301,7 +3301,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} @@ -3316,7 +3316,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} @@ -3331,7 +3331,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} @@ -3342,7 +3342,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} @@ -3353,7 +3353,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} @@ -3364,7 +3364,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} @@ -3375,7 +3375,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} @@ -3386,7 +3386,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} @@ -3397,9 +3397,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} @@ -3410,7 +3410,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} @@ -3421,7 +3421,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} @@ -3433,7 +3433,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} @@ -3458,7 +3458,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; @@ -3469,10 +3469,10 @@ friend constexpr iter_difference_t> operator-(const iterator& x, const sentinel& y) - requires SizedSentinel, iterator_t>; + requires sized_sentinel_for, iterator_t>; friend constexpr iter_difference_t> operator-(const sentinel& y, const iterator& x) - requires SizedSentinel, iterator_t>; + requires sized_sentinel_for, iterator_t>; }; } \end{codeblock} @@ -3490,7 +3490,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} @@ -3552,7 +3552,7 @@ \begin{itemdecl} friend constexpr iter_difference_t> operator-(const iterator& x, const sentinel& y) - requires SizedSentinel, iterator_t>; + requires sized_sentinel_for, iterator_t>; \end{itemdecl} \begin{itemdescr} @@ -3564,7 +3564,7 @@ \begin{itemdecl} friend constexpr iter_difference_t> operator-(const sentinel& y, const iterator& x) - requires SizedSentinel, iterator_t>; + requires sized_sentinel_for, iterator_t>; \end{itemdecl} \begin{itemdescr} @@ -3587,9 +3587,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} @@ -3605,7 +3605,7 @@ \begin{codeblock} namespace std::ranges { - template + template class take_view : public view_interface> { private: V base_ = V(); // \expos @@ -3615,15 +3615,15 @@ public: take_view() = default; constexpr take_view(V base, iter_difference_t> count); - template - requires Constructible> + template + requires constructible_from> constexpr take_view(R&& r, iter_difference_t> count); constexpr V base() const; constexpr auto begin() requires (!@\placeholder{simple-view}@) { - if constexpr (SizedRange) { - if constexpr (RandomAccessRange) + if constexpr (sized_range) { + if constexpr (random_access_range) return ranges::begin(base_); else return counted_iterator{ranges::begin(base_), size()}; @@ -3631,9 +3631,9 @@ return counted_iterator{ranges::begin(base_), count_}; } - constexpr auto begin() const requires Range { - if constexpr (SizedRange) { - if constexpr (RandomAccessRange) + constexpr auto begin() const requires range { + if constexpr (sized_range) { + if constexpr (random_access_range) return ranges::begin(base_); else return counted_iterator{ranges::begin(base_), size()}; @@ -3642,8 +3642,8 @@ } constexpr auto end() requires (!@\placeholder{simple-view}@) { - if constexpr (SizedRange) { - if constexpr (RandomAccessRange) + if constexpr (sized_range) { + if constexpr (random_access_range) return ranges::begin(base_) + size(); else return default_sentinel; @@ -3651,9 +3651,9 @@ return sentinel{ranges::end(base_)}; } - constexpr auto end() const requires Range { - if constexpr (SizedRange) { - if constexpr (RandomAccessRange) + constexpr auto end() const requires range { + if constexpr (sized_range) { + if constexpr (random_access_range) return ranges::begin(base_) + size(); else return default_sentinel; @@ -3661,18 +3661,18 @@ 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_)); } }; - template + template take_view(R&&, iter_difference_t>) -> take_view>; } @@ -3691,8 +3691,8 @@ \indexlibrary{\idxcode{take_view}!\idxcode{take_view}}% \begin{itemdecl} -template - requires Constructible> +template + requires constructible_from> constexpr take_view(R&& r, iter_difference_t> count); \end{itemdecl} @@ -3727,7 +3727,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; @@ -3752,7 +3752,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} @@ -3808,8 +3808,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} @@ -3825,10 +3825,10 @@ \begin{codeblock} namespace std::ranges { - template - requires View && InputRange>> && + template + requires view && input_range>> && (is_reference_v>> || - View>>) + view>>) class join_view : public view_interface> { private: using InnerRng = // \expos @@ -3847,8 +3847,8 @@ join_view() = default; constexpr explicit join_view(V base); - template - requires ViewableRange && Constructible> + template + requires viewable_range && constructible_from> constexpr explicit join_view(R&& r); constexpr auto begin() { @@ -3856,28 +3856,28 @@ } constexpr auto begin() const - requires InputRange && + requires input_range && is_reference_v>> { return iterator{*this, ranges::begin(base_)}; } constexpr auto end() { - if constexpr (ForwardRange && - is_reference_v && ForwardRange && - CommonRange && CommonRange) + if constexpr (forward_range && + is_reference_v && forward_range && + common_range && common_range) return iterator<@\placeholder{simple-view}@>{*this, ranges::end(base_)}; else return sentinel<@\placeholder{simple-view}@>{*this}; } constexpr auto end() const - requires InputRange && + requires input_range && is_reference_v>> { - if constexpr (ForwardRange && + if constexpr (forward_range && is_reference_v>> && - ForwardRange>> && - CommonRange && - CommonRange>>) + forward_range>> && + common_range && + common_range>>) return iterator{*this, ranges::end(base_)}; else return sentinel{*this}; @@ -3901,8 +3901,8 @@ \indexlibrary{\idxcode{join_view}!\idxcode{join_view}}% \begin{itemdecl} -template - requires ViewableRange && Constructible> +template + requires viewable_range && constructible_from> constexpr explicit join_view(R&& r); \end{itemdecl} @@ -3944,9 +3944,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_; } @@ -3956,24 +3956,24 @@ 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 && 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 && EqualityComparable> && - EqualityComparable>>>; + requires ref_is_glvalue && equality_comparable> && + equality_comparable>>>; 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_))) { @@ -3992,10 +3992,10 @@ \item If \tcode{ref_is_glvalue} is \tcode{true}, \begin{itemize} \item If \tcode{Base} and \tcode{iter_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{iter_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}. @@ -4011,10 +4011,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{\libconcept{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{\libconcept{derived_from}}, \tcode{itera\-tor_category} denotes \tcode{forward_iterator_tag}. \end{itemize} \item Otherwise, \tcode{iterator_category} denotes \tcode{input_iterator_tag}. @@ -4073,9 +4073,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} @@ -4134,8 +4134,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} @@ -4151,8 +4151,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} @@ -4171,8 +4171,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} @@ -4188,8 +4188,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} @@ -4201,8 +4201,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} @@ -4238,7 +4238,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); friend constexpr bool operator==(const sentinel& x, const iterator& y); @@ -4261,7 +4261,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} @@ -4323,9 +4323,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} @@ -4349,14 +4349,14 @@ template concept @\placeholdernc{tiny-range}@ = // \expos - SizedRange && + sized_range && requires { typename @\placeholdernc{require-constant}@::size()>; } && (remove_reference_t::size() <= 1); - template - requires View && View && - IndirectlyComparable, iterator_t, ranges::equal_to> && - (ForwardRange || @\placeholdernc{tiny-range}@) + template + requires view && view && + indirectly_comparable, iterator_t, ranges::equal_to> && + (forward_range || @\placeholdernc{tiny-range}@) class split_view : public view_interface> { private: V base_ = V(); // \expos @@ -4370,18 +4370,18 @@ split_view() = default; constexpr split_view(V base, Pattern pattern); - template - requires Constructible> && - Constructible> + template + requires constructible_from> && + constructible_from> constexpr split_view(R&& r, P&& p); - template - requires Constructible> && - Constructible>>> + template + requires constructible_from> && + constructible_from>>> constexpr split_view(R&& r, iter_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_); @@ -4389,16 +4389,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 && CommonRange { + 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 && CommonRange) + if constexpr (forward_range && forward_range && common_range) return outer_iterator{*this, ranges::end(base_)}; else return default_sentinel; @@ -4408,7 +4408,7 @@ template split_view(R&&, P&&) -> split_view, all_view

>; - template + template split_view(R&&, iter_value_t>) -> split_view, single_view>>>; } @@ -4427,9 +4427,9 @@ \indexlibrary{\idxcode{split_view}!\idxcode{split_view}}% \begin{itemdecl} -template - requires Constructible> && - Constructible> +template + requires constructible_from> && + constructible_from> constexpr split_view(R&& r, P&& p); \end{itemdecl} @@ -4442,9 +4442,9 @@ \indexlibrary{\idxcode{split_view}!\idxcode{split_view}}% \begin{itemdecl} -template - requires Constructible> && - Constructible>>> +template + requires constructible_from> && + constructible_from>>> constexpr split_view(R&& r, iter_value_t> e); \end{itemdecl} @@ -4468,12 +4468,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; @@ -4481,17 +4481,17 @@ 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 && ConvertibleTo, iterator_t>; + requires Const && convertible_to, iterator_t>; constexpr value_type operator*() const; constexpr outer_iterator& operator++(); constexpr decltype(auto) operator++(int) { - if constexpr (ForwardRange) { + if constexpr (forward_range) { auto tmp = *this; ++*this; return tmp; @@ -4500,9 +4500,9 @@ } 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, const outer_iterator& y) - requires ForwardRange; + requires forward_range; friend constexpr bool operator==(const outer_iterator& x, default_sentinel_t); friend constexpr bool operator==(default_sentinel_t, const outer_iterator& x); @@ -4516,12 +4516,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} @@ -4532,7 +4532,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} @@ -4544,7 +4544,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} @@ -4592,7 +4592,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} @@ -4603,7 +4603,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} @@ -4708,7 +4708,7 @@ constexpr inner_iterator& operator++(); constexpr decltype(auto) operator++(int) { - if constexpr (ForwardRange) { + if constexpr (forward_range) { auto tmp = *this; ++*this; return tmp; @@ -4717,9 +4717,9 @@ } 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, const inner_iterator& y) - requires ForwardRange; + requires forward_range; friend constexpr bool operator==(const inner_iterator& x, default_sentinel_t); friend constexpr bool operator==(default_sentinel_t, const inner_iterator& x); @@ -4733,7 +4733,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} @@ -4742,7 +4742,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{\libconcept{derived_from}}, and \tcode{input_iterator_tag} otherwise. \indexlibrary{\idxcode{inner_iterator}!\idxcode{split_view::inner_iterator}}% @@ -4778,7 +4778,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} @@ -4789,7 +4789,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} @@ -4835,7 +4835,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} @@ -4857,7 +4857,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}. @@ -4869,11 +4869,11 @@ Then the expression \tcode{view::counted(E, F)} is expression-equivalent to: \begin{itemize} -\item If \tcode{T} models \libconcept{Iterator} and - \tcode{decltype((F))} models \tcode{\libconcept{ConvertibleTo}>}, +\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)\}} - if \tcode{T} models \libconcept{RandomAccessItera\-tor}. + if \tcode{T} models \libconcept{random_access_it\-erator}. \item Otherwise, \tcode{subrange\{counted_iterator\{E, F\}, default_sentinel\}}. \end{itemize} @@ -4891,8 +4891,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 @@ -4908,7 +4908,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()); @@ -4921,8 +4921,8 @@ \begin{codeblock} namespace std::ranges { - template - requires (!CommonRange) + template + requires (!common_range) class common_view : public view_interface> { private: V base_ = V(); // \expos @@ -4931,42 +4931,42 @@ constexpr explicit common_view(V r); - template - requires (!CommonRange && Constructible>) + template + requires (!common_range && constructible_from>) constexpr explicit common_view(R&& r); 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 (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 && SizedRange) + constexpr auto begin() const requires 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 && SizedRange) + 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 && SizedRange) + constexpr auto end() const requires range { + if constexpr (random_access_range && sized_range) return ranges::begin(base_) + ranges::size(base_); else return common_iterator, sentinel_t>(ranges::end(base_)); @@ -4990,8 +4990,8 @@ \indexlibrary{\idxcode{common_view}!\idxcode{common_view}}% \begin{itemdecl} -template - requires (!CommonRange && Constructible>) +template + requires (!common_range && constructible_from>) constexpr explicit common_view(R&& r); \end{itemdecl} @@ -5020,7 +5020,7 @@ \begin{itemize} \item \tcode{view::all(E)}, - if \tcode{decltype((E))} models \libconcept{CommonRange} + if \tcode{decltype((E))} models \libconcept{common_range} and \tcode{view::all(E)} is a well-formed expression. \item Otherwise, \tcode{common_view\{E\}}. @@ -5032,8 +5032,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} @@ -5050,8 +5050,8 @@ \indexlibrary{\idxcode{weiv_esrever}}% \begin{codeblock} namespace std::ranges { - template - requires BidirectionalRange + template + requires bidirectional_range class reverse_view : public view_interface> { private: V base_ = V(); // \expos @@ -5060,25 +5060,25 @@ constexpr explicit reverse_view(V r); - template - requires BidirectionalRange && Constructible> + template + requires bidirectional_range && constructible_from> constexpr explicit reverse_view(R&& r); 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 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_); } }; @@ -5100,8 +5100,8 @@ \indexlibrary{\idxcode{reverse_view}!\idxcode{reverse_view}}% \begin{itemdecl} -template - requires BidirectionalRange && Constructible> +template + requires bidirectional_range && constructible_from> constexpr explicit reverse_view(R&& r); \end{itemdecl} @@ -5134,15 +5134,15 @@ \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} \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} @@ -5154,7 +5154,7 @@ \begin{itemdecl} constexpr reverse_iterator> end(); constexpr reverse_iterator> end() const - requires CommonRange; + requires common_range; \end{itemdecl} \begin{itemdescr} diff --git a/source/strings.tex b/source/strings.tex index cbba04ae5d..eba4ea7f31 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -4149,7 +4149,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}. diff --git a/source/utilities.tex b/source/utilities.tex index f273fe2c8a..a45d34534e 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -6631,14 +6631,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); } @@ -6655,14 +6655,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); } @@ -6684,20 +6684,20 @@ 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, 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>, iter_reference_t>> + template + requires constructible_from>, iter_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; - template S> - requires Constructible, iter_reference_t> + 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); } @@ -6720,22 +6720,22 @@ 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, 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>, - iter_rvalue_reference_t>> + template + requires constructible_from>, + iter_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; - 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); } @@ -6753,14 +6753,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); } @@ -6778,18 +6778,18 @@ ForwardIterator first, Size n); namespace ranges { - template + template void destroy_at(T* location) noexcept; template<@\placeholdernc{no-throw-input-iterator}@ I, @\placeholdernc{no-throw-sentinel}@ S> - requires Destructible> + requires destructible> I destroy(I first, S last) noexcept; template<@\placeholdernc{no-throw-input-range}@ R> - requires Destructible> + requires destructible> safe_iterator_t destroy(R&& r) noexcept; template<@\placeholdernc{no-throw-input-iterator}@ I> - requires Destructible> + requires destructible> I destroy_n(I first, iter_difference_t n) noexcept; } @@ -8064,9 +8064,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. @@ -8103,9 +8103,9 @@ \begin{itemdecl} template concept @\placeholdernc{no-throw-input-iterator}@ = // exposition only - InputIterator && + input_iterator && is_lvalue_reference_v> && - Same>, iter_value_t>; + same_to>, iter_value_t>; \end{itemdecl} \begin{itemdescr} @@ -8118,14 +8118,14 @@ \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} \begin{itemdecl} template -concept @\placeholdernc{no-throw-sentinel}@ = Sentinel; // exposition only +concept @\placeholdernc{no-throw-sentinel}@ = sentinel_for; // exposition only \end{itemdecl} \begin{itemdescr} @@ -8137,7 +8137,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} @@ -8145,7 +8145,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} @@ -8161,14 +8161,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} @@ -8221,11 +8221,11 @@ \begin{itemdecl} namespace ranges { template<@\placeholdernc{no-throw-forward-iterator}@ I, @\placeholdernc{no-throw-sentinel}@ S> - requires DefaultConstructible> - I uninitialized_default_construct(I first, S last); + requires default_constructible> + I uninitialized_default_construct(I first, S last); template<@\placeholdernc{no-throw-forward-range}@ R> - requires DefaultConstructible>> - safe_iterator_t uninitialized_default_construct(R&& r); + requires default_constructible>> + safe_iterator_t uninitialized_default_construct(R&& r); } \end{itemdecl} @@ -8261,8 +8261,8 @@ \begin{itemdecl} namespace ranges { template<@\placeholdernc{no-throw-forward-iterator}@ I> - requires DefaultConstructible> - I uninitialized_default_construct_n(I first, iter_difference_t n); + requires default_constructible> + I uninitialized_default_construct_n(I first, iter_difference_t n); } \end{itemdecl} @@ -8298,11 +8298,11 @@ \begin{itemdecl} namespace ranges { template<@\placeholdernc{no-throw-forward-iterator}@ I, @\placeholdernc{no-throw-sentinel}@ S> - requires DefaultConstructible> - I uninitialized_value_construct(I first, S last); + requires default_constructible> + I uninitialized_value_construct(I first, S last); template<@\placeholdernc{no-throw-forward-range}@ R> - requires DefaultConstructible>> - safe_iterator_t uninitialized_value_construct(R&& r); + requires default_constructible>> + safe_iterator_t uninitialized_value_construct(R&& r); } \end{itemdecl} @@ -8338,8 +8338,8 @@ \begin{itemdecl} namespace ranges { template<@\placeholdernc{no-throw-forward-iterator}@ I> - requires DefaultConstructible> - I uninitialized_value_construct_n(I first, iter_difference_t n); + requires default_constructible> + I uninitialized_value_construct_n(I first, iter_difference_t n); } \end{itemdecl} @@ -8383,15 +8383,15 @@ \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, iter_reference_t> - uninitialized_copy_result - uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); - template - requires Constructible>, iter_reference_t>> - uninitialized_copy_result, safe_iterator_t> - uninitialized_copy(IR&& input_range, OR&& output_range); + requires constructible_from, iter_reference_t> + uninitialized_copy_result + uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); + template + requires constructible_from>, iter_reference_t>> + uninitialized_copy_result, safe_iterator_t> + uninitialized_copy(IR&& in_range, OR&& out_range); } \end{itemdecl} @@ -8438,10 +8438,10 @@ \indexlibrary{\idxcode{uninitialized_copy_n}}% \begin{itemdecl} namespace ranges { - template S> - requires Constructible, iter_reference_t> - uninitialized_copy_n_result - uninitialized_copy_n(I ifirst, iter_difference_t n, O ofirst, S olast); + 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); } \end{itemdecl} @@ -8488,15 +8488,16 @@ \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, iter_rvalue_reference_t> - uninitialized_move_result - uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); - template - requires Constructible>, iter_rvalue_reference_t>> - uninitialized_move_result, safe_iterator_t> - uninitialized_move(IR&& input_range, OR&& output_range); + requires constructible_from, iter_rvalue_reference_t> + uninitialized_move_result + uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); + template + requires constructible_from>, + iter_rvalue_reference_t>> + uninitialized_move_result, safe_iterator_t> + uninitialized_move(IR&& in_range, OR&& out_range); } \end{itemdecl} @@ -8548,10 +8549,10 @@ \indexlibrary{\idxcode{uninitialized_move_n}}% \begin{itemdecl} namespace ranges { - template S> - requires Constructible, iter_rvalue_reference_t> - uninitialized_move_n_result - uninitialized_move_n(I ifirst, iter_difference_t n, O ofirst, S olast); + 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); } \end{itemdecl} @@ -8600,11 +8601,11 @@ \begin{itemdecl} namespace ranges { template<@\placeholdernc{no-throw-forward-iterator}@ I, @\placeholdernc{no-throw-sentinel}@ S, class T> - requires Constructible, const T&> - I uninitialized_fill(I first, S last, const T& x); + 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&> - safe_iterator_t uninitialized_fill(R&& r, const T& x); + requires constructible_from>, const T&> + safe_iterator_t uninitialized_fill(R&& r, const T& x); } \end{itemdecl} @@ -8640,8 +8641,8 @@ \begin{itemdecl} namespace ranges { template<@\placeholdernc{no-throw-forward-iterator}@ I, class T> - requires Constructible, const T&> - I uninitialized_fill_n(I first, iter_difference_t n, const T& x); + requires constructible_from, const T&> + I uninitialized_fill_n(I first, iter_difference_t n, const T& x); } \end{itemdecl} @@ -8660,7 +8661,7 @@ template void destroy_at(T* location); namespace ranges { - template + template void destroy_at(T* location) noexcept; } \end{itemdecl} @@ -8696,11 +8697,11 @@ \begin{itemdecl} namespace ranges { template<@\placeholdernc{no-throw-input-iterator}@ I, @\placeholdernc{no-throw-sentinel}@ S> - requires Destructible> - I destroy(I first, S last) noexcept; + requires destructible> + I destroy(I first, S last) noexcept; template<@\placeholdernc{no-throw-input-range}@ R> - requires Destructible>> - safe_iterator_t destroy(R&& r) noexcept; + requires destructible>> + safe_iterator_t destroy(R&& r) noexcept; } \end{itemdecl} @@ -8735,8 +8736,8 @@ \begin{itemdecl} namespace ranges { template<@\placeholdernc{no-throw-input-iterator}@ I> - requires Destructible> - I destroy_n(I first, iter_difference_t n) noexcept; + requires destructible> + I destroy_n(I first, iter_difference_t n) noexcept; } \end{itemdecl} @@ -14778,7 +14779,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@; @@ -14813,7 +14814,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@; @@ -14832,7 +14833,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@; @@ -14851,7 +14852,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@; @@ -14892,7 +14893,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@; @@ -14911,7 +14912,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 a02d2b1a03c69226baa67ced73fc2d1786c0144b Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Mon, 29 Jul 2019 15:02:38 -0700 Subject: [PATCH 03/10] [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 a45d34534e..e62cbddd00 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -1764,7 +1764,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} @@ -8102,7 +8102,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_to>, iter_value_t>; @@ -8125,7 +8125,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} @@ -8144,7 +8144,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>; @@ -8159,7 +8159,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}@; @@ -8175,7 +8175,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 932c1c2a1eaea873c8167c6720763c6a7dbff200 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 30 Jul 2019 20:15:55 -0700 Subject: [PATCH 04/10] Fixup: "Same" should have become "same_as" not "same_to". --- source/algorithms.tex | 8 +++--- source/concepts.tex | 30 +++++++++++----------- source/iterators.tex | 58 +++++++++++++++++++++---------------------- source/numerics.tex | 4 +-- source/ranges.tex | 42 +++++++++++++++---------------- source/utilities.tex | 2 +- 6 files changed, 72 insertions(+), 72 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 789bd25b7b..c4cffd23b2 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1656,7 +1656,7 @@ class Proj = identity, indirect_relation> C = ranges::equal_to> requires indirectly_copyable && (forward_iterator || - (input_iterator && same_to, iter_value_t>) || + (input_iterator && same_as, iter_value_t>) || indirectly_copyable_storable) constexpr unique_copy_result unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); @@ -1664,7 +1664,7 @@ indirect_relation, Proj>> C = ranges::equal_to> requires indirectly_copyable, O> && (forward_iterator> || - (input_iterator && same_to>, iter_value_t>) || + (input_iterator && same_as>, iter_value_t>) || indirectly_copyable_storable, O>) constexpr unique_copy_result, O> unique_copy(R&& r, O result, C comp = {}, Proj proj = {}); @@ -5216,7 +5216,7 @@ class Proj = identity, indirect_relation> C = ranges::equal_to> requires indirectly_copyable && (forward_iterator || - (input_iterator && same_to, iter_value_t>) || + (input_iterator && same_as, iter_value_t>) || indirectly_copyable_storable) constexpr ranges::unique_copy_result ranges::unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); @@ -5224,7 +5224,7 @@ indirect_relation, Proj>> C = ranges::equal_to> requires indirectly_copyable, O> && (forward_iterator> || - (input_iterator && same_to>, iter_value_t>) || + (input_iterator && same_as>, iter_value_t>) || indirectly_copyable_storable, 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 6f3e52d1c3..69a89ea783 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_to} + // \ref{concept.same}, concept \libconcept{same_as} template - concept same_to = @\seebelow@; + concept same_as = @\seebelow@; // \ref{concept.derivedfrom}, concept \libconcept{derived_from} template @@ -269,21 +269,21 @@ features. These concepts express relationships between types, type classifications, and fundamental type properties. -\rSec2[concept.same]{Concept \libconcept{same_to}} +\rSec2[concept.same]{Concept \libconcept{same_as}} -\indexlibrary{\idxcode{same_to}}% +\indexlibrary{\idxcode{same_as}}% \begin{itemdecl} template concept @\placeholdernc{same-impl}@ = is_same_v; // \expos template - concept same_to = @\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_to}} subsumes \tcode{\libconcept{same_to}} and +\tcode{\libconcept{same_as}} subsumes \tcode{\libconcept{same_as}} and vice versa. \end{note} \end{itemdescr} @@ -380,7 +380,7 @@ \begin{itemdecl} template concept common_reference_with = - same_to, common_reference_t> && + same_as, common_reference_t> && convertible_to> && convertible_to>; \end{itemdecl} @@ -424,7 +424,7 @@ \begin{itemdecl} template concept common_with = - same_to, common_type_t> && + same_as, common_type_t> && requires { static_cast>(declval()); static_cast>(declval()); @@ -501,7 +501,7 @@ is_lvalue_reference_v && common_reference_with&, const remove_reference_t&> && requires(LHS lhs, RHS&& rhs) { - { lhs = std::forward(rhs) } -> same_to; + { lhs = std::forward(rhs) } -> same_as; }; \end{itemdecl} @@ -823,12 +823,12 @@ const remove_reference_t& b2, const bool a) { { b1 } -> convertible_to; { !b1 } -> convertible_to; - { b1 && a } -> same_to; - { b1 || a } -> same_to; - { b1 && b2 } -> same_to; - { a && b2 } -> same_to; - { b1 || b2 } -> same_to; - { a || b2 } -> same_to; + { b1 && a } -> same_as; + { b1 || a } -> same_as; + { b1 && b2 } -> same_as; + { a && b2 } -> same_as; + { b1 || b2 } -> same_as; + { a || b2 } -> same_as; { b1 == b2 } -> convertible_to; { b1 == a } -> convertible_to; { a == b2 } -> convertible_to; diff --git a/source/iterators.tex b/source/iterators.tex index 5ace8b9b90..12c7f2537f 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -362,7 +362,7 @@ // \ref{iterators.common}, common iterators template S> - requires (!same_to) + requires (!same_as) class common_iterator; template @@ -858,7 +858,7 @@ concept @\placeholder{cpp17-iterator}@ = copyable && requires(I i) { { *i } -> @\placeholder{can-reference}@; - { ++i } -> same_to; + { ++i } -> same_as; { *i++ } -> @\placeholder{can-reference}@; }; @@ -878,30 +878,30 @@ concept @\placeholder{cpp17-forward-iterator}@ = @\placeholder{cpp17-input-iterator}@ && constructible_from && is_lvalue_reference_v> && - same_to>, typename readable_traits::value_type> && + same_as>, typename readable_traits::value_type> && requires(I i) { { i++ } -> const I&; - { *i++ } -> same_to>; + { *i++ } -> same_as>; }; template concept @\placeholder{cpp17-bidirectional-iterator}@ = @\placeholder{cpp17-forward-iterator}@ && requires(I i) { - { --i } -> same_to; + { --i } -> same_as; { i-- } -> const I&; - { *i-- } -> same_to>; + { *i-- } -> same_as>; }; template concept @\placeholder{cpp17-random-access-iterator}@ = @\placeholder{cpp17-bidirectional-iterator}@ && totally_ordered && requires(I i, typename incrementable_traits::difference_type n) { - { i += n } -> same_to; - { i -= n } -> same_to; - { i + n } -> same_to; - { n + i } -> same_to; - { i - n } -> same_to; - { i - i } -> same_to; + { 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] } -> iter_reference_t; }; \end{codeblock} @@ -1244,7 +1244,7 @@ \begin{itemize} \item If \tcode{Out} and \tcode{T} model - \tcode{\libconcept{readable} \&\& \libconcept{same_to}, decay_t{>}}, + \tcode{\libconcept{readable} \&\& \libconcept{same_as}, decay_t{>}}, then \tcode{*o} after any above assignment is equal to the value of \tcode{E} before the assignment. \end{itemize} @@ -1287,7 +1287,7 @@ requires(I i) { typename iter_difference_t; requires signed_integral>; - { ++i } -> same_to; // not required to be equality-preserving + { ++i } -> same_as; // not required to be equality-preserving i++; // not required to be equality-preserving }; \end{codeblock} @@ -1334,7 +1334,7 @@ regular && weakly_incrementable && requires(I i) { - { i++ } -> same_to; + { i++ } -> same_as; }; \end{codeblock} @@ -1434,8 +1434,8 @@ sentinel_for && !disable_sized_sentinel, remove_cv_t> && requires(const I& i, const S& s) { - { s - i } -> same_to>; - { i - s } -> same_to>; + { s - i } -> same_as>; + { i - s } -> same_as>; }; \end{itemdecl} @@ -1592,8 +1592,8 @@ forward_iterator && derived_from<@\placeholdernc{ITER_CONCEPT}@(I), bidirectional_iterator_tag> && requires(I i) { - { --i } -> same_to; - { i-- } -> same_to; + { --i } -> same_as; + { i-- } -> same_as; }; \end{codeblock} @@ -1637,12 +1637,12 @@ totally_ordered && sized_sentinel_for && requires(I i, const I j, const iter_difference_t n) { - { i += n } -> same_to; - { j + n } -> same_to; - { n + j } -> same_to; - { i -= n } -> same_to; - { j - n } -> same_to; - { j[n] } -> same_to>; + { 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} @@ -1687,7 +1687,7 @@ random_access_iterator && derived_from<@\placeholdernc{ITER_CONCEPT}@(I), contiguous_iterator_tag> && is_lvalue_reference_v> && - same_to, remove_cvref_t>>; + same_as, remove_cvref_t>>; \end{codeblock} \pnum @@ -2753,7 +2753,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{bidirectional_iterator}, and -\tcode{I} and \tcode{S} model \tcode{\libconcept{same_to}}. +\tcode{I} and \tcode{S} model \tcode{\libconcept{same_as}}. \pnum \effects @@ -2794,7 +2794,7 @@ \range{first}{last} denotes a range, or \range{last}{first} denotes a range and \tcode{S} and \tcode{I} model -\tcode{\libconcept{same_to} \&\& \libconcept{sized_sentinel_for}}. +\tcode{\libconcept{same_as} \&\& \libconcept{sized_sentinel_for}}. \pnum \effects @@ -4495,7 +4495,7 @@ \begin{codeblock} namespace std { template S> - requires (!same_to) + requires (!same_as) class common_iterator { public: constexpr common_iterator() = default; diff --git a/source/numerics.tex b/source/numerics.tex index 5a49b408b9..3eb5375242 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -1950,8 +1950,8 @@ concept uniform_random_bit_generator = invocable && unsigned_integral> && requires { - { G::min() } -> same_to>; - { G::max() } -> same_to>; + { G::min() } -> same_as>; + { G::max() } -> same_as>; }; \end{codeblock} diff --git a/source/ranges.tex b/source/ranges.tex index 2c0b31be6e..b4b3d6c977 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -99,7 +99,7 @@ // \ref{view.interface}, class template \tcode{view_interface} template - requires is_class_v && same_to> + requires is_class_v && same_as> class view_interface; // \ref{range.subrange}, sub-ranges @@ -937,7 +937,7 @@ concept contiguous_range = random_access_range && contiguous_iterator> && requires(T& t) { - { ranges::data(t) } -> same_to>>>; + { ranges::data(t) } -> same_as>>>; }; \end{itemdecl} @@ -953,7 +953,7 @@ \begin{itemdecl} template concept common_range = - range && same_to, sentinel_t>; + range && same_as, sentinel_t>; \end{itemdecl} \pnum @@ -983,8 +983,8 @@ template concept @\placeholder{simple-view}@ = // \expos view && range && - same_to, iterator_t> && - same_to, sentinel_t>; + same_as, iterator_t> && + same_as, sentinel_t>; template concept @\placeholder{has-arrow}@ = // \expos @@ -992,7 +992,7 @@ template concept @\placeholder{not-same-as}@ = // \expos - !same_to, remove_cvref_t>; + !same_as, remove_cvref_t>; \end{codeblock} \rSec2[view.interface]{View interface} @@ -1006,7 +1006,7 @@ \begin{codeblock} namespace std::ranges { template - requires is_class_v && same_to> + requires is_class_v && same_as> class view_interface : public view_base { private: constexpr D& derived() noexcept { // \expos @@ -1462,12 +1462,12 @@ \begin{codeblock} vector f(); auto result1 = ranges::find(f(), 42); // \#1 -static_assert(same_to); +static_assert(same_as); auto vec = f(); auto result2 = ranges::find(vec, 42); // \#2 -static_assert(same_to::iterator>); +static_assert(same_as::iterator>); auto result3 = ranges::find(subrange{vec}, 42); // \#3 -static_assert(same_to::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}; @@ -1698,10 +1698,10 @@ constexpr iterator begin() const; constexpr sentinel end() const; - constexpr iterator end() const requires same_to; + constexpr iterator end() const requires same_as; constexpr auto size() const - requires (same_to && @\placeholdernc{Advanceable}@) || + requires (same_as && @\placeholdernc{Advanceable}@) || (integral && integral) || sized_sentinel_for { return bound_ - value_; } @@ -1719,8 +1719,8 @@ template concept @\placeholder{Decrementable}@ = incrementable && requires(I i) { - { --i } -> same_to; - { i-- } -> same_to; + { --i } -> same_as; + { i-- } -> same_as; }; \end{itemdecl} @@ -1753,12 +1753,12 @@ concept @\placeholder{Advanceable}@ = @\placeholdernc{Decrementable}@ && totally_ordered && requires(I i, const I j, const iter_difference_t n) { - { i += n } -> same_to; - { i -= n } -> same_to; - { j + n } -> same_to; - { n + j } -> same_to; - { j - n } -> same_to; - { j - j } -> same_to>; + { i += n } -> same_as; + { i -= n } -> same_as; + { j + n } -> same_as; + { n + j } -> same_as; + { j - n } -> same_as; + { j - j } -> same_as>; }; \end{itemdecl} @@ -1841,7 +1841,7 @@ \indexlibrary{\idxcode{end}!\idxcode{iota_view}}% \begin{itemdecl} -constexpr iterator end() const requires same_to; +constexpr iterator end() const requires same_as; \end{itemdecl} \begin{itemdescr} diff --git a/source/utilities.tex b/source/utilities.tex index e62cbddd00..5e35b87fdb 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -8105,7 +8105,7 @@ concept @\placeholdernc{no-throw-input-iterator}@ = // \expos input_iterator && is_lvalue_reference_v> && - same_to>, iter_value_t>; + same_as>, iter_value_t>; \end{itemdecl} \begin{itemdescr} From d7c7cd69bd222a4ffaf3c88bcbf9d69ecd7a188d Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 30 Jul 2019 20:31:24 -0700 Subject: [PATCH 05/10] Fixup: Whitespace fixes as suggested by reviewers. --- source/algorithms.tex | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index c4cffd23b2..cece562bbb 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -811,13 +811,13 @@ template S1, forward_iterator I2, sentinel_for S2, class Proj1 = identity, class Proj2 = identity, indirect_relation, - projected> Pred = ranges::equal_to> + 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> + projected, Proj2>> Pred = ranges::equal_to> constexpr safe_iterator_t find_first_of(R1&& r1, R2&& r2, Pred pred = {}, @@ -1434,9 +1434,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 From 02301b971f0d883c3513cd82b7be9b5e50af44aa Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 30 Jul 2019 20:36:34 -0700 Subject: [PATCH 06/10] [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 cece562bbb..aa00115efd 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -3853,8 +3853,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 be63fb250444d10d702b5296f373e32778c3b01f Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 31 Jul 2019 12:41:47 -0700 Subject: [PATCH 07/10] [concept.same][ranges] Renamed exposition-only concepts to follow new naming scheme. * \placeholdernc{Advanceable} => \placeholdernc{advanceable} * \placeholdernc{same-impl} => \placeholdernc{same-as-impl} * \placeholdernc{Decrementable} => \placeholdernc{decrementable} --- source/concepts.tex | 4 ++-- source/ranges.tex | 48 ++++++++++++++++++++++----------------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 69a89ea783..a576dde9e1 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -274,10 +274,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} diff --git a/source/ranges.tex b/source/ranges.tex index b4b3d6c977..296abd8572 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1674,10 +1674,10 @@ \begin{codeblock} namespace std::ranges { template - concept @\placeholdernc{Decrementable}@ = // \expos + concept @\placeholdernc{decrementable}@ = // \expos @\seebelow@; template - concept @\placeholdernc{Advanceable}@ = // \expos + concept @\placeholdernc{advanceable}@ = // \expos @\seebelow@; template @@ -1701,7 +1701,7 @@ constexpr iterator end() const requires same_as; constexpr auto size() const - requires (same_as && @\placeholdernc{Advanceable}@) || + requires (same_as && @\placeholdernc{advanceable}@) || (integral && integral) || sized_sentinel_for { return bound_ - value_; } @@ -1731,7 +1731,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: @@ -1751,7 +1751,7 @@ \begin{itemdecl} template concept @\placeholder{Advanceable}@ = - @\placeholdernc{Decrementable}@ && totally_ordered && + @\placeholdernc{decrementable}@ && totally_ordered && requires(I i, const I j, const iter_difference_t n) { { i += n } -> same_as; { i -= n } -> same_as; @@ -1767,7 +1767,7 @@ after \tcode{n} applications of \tcode{++a}, for some value \tcode{n} of type \tcode{iter_difference_t}, and let \tcode{D} be \tcode{iter_difference_t}. -\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)}. @@ -1871,15 +1871,15 @@ 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}@; + 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; @@ -1896,14 +1896,14 @@ requires totally_ordered; 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} @@ -1992,7 +1992,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} @@ -2006,7 +2006,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} @@ -2022,7 +2022,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} @@ -2037,7 +2037,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} @@ -2052,7 +2052,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} @@ -2129,7 +2129,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} @@ -2140,7 +2140,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} @@ -2151,7 +2151,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} @@ -2162,7 +2162,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 a6397a3929ebd40e68c27087f93cf1f67b796e56 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 31 Jul 2019 12:52:26 -0700 Subject: [PATCH 08/10] [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 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index a576dde9e1..e8c244fdcd 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@; @@ -221,7 +221,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 @@ -288,7 +288,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} @@ -307,7 +307,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 @@ -947,7 +947,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} From a33b3065938f705d562b27a22cf6560c8917f353 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 31 Jul 2019 13:20:42 -0700 Subject: [PATCH 09/10] Fixup: Missed a reference to "concept.stricttotallyordered" in last commit. --- source/lib-intro.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 1860d4662e..1eff91bd38 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. From ce3ab9f5f47869a3b87a89f35e79b54ba88ec7c3 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 2 Aug 2019 15:42:29 -0700 Subject: [PATCH 10/10] [range.subrange] Use single line for example's comment. --- source/ranges.tex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 296abd8572..7b28b524f8 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1155,8 +1155,7 @@ K == subrange_kind::sized && !sized_sentinel_for; I begin_ = I(); // \expos S end_ = S(); // \expos - iter_difference_t size_ = 0; // \expos; present only - // when \tcode{StoreSize} is \tcode{true} + iter_difference_t size_ = 0; // \expos; present only when \tcode{StoreSize} is \tcode{true} public: subrange() = default;