diff --git a/source/algorithms.tex b/source/algorithms.tex index d723b7e11a..3022b8746d 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -5,7 +5,7 @@ \pnum This Clause describes components that \Cpp{} programs may use to perform -algorithmic operations on containers\iref{containers} and other sequences. +algorithmic operations on \link{containers}{containers} and other sequences. \pnum The following subclauses describe components for @@ -81,14 +81,14 @@ \tcode{InputIterator1}, or \tcode{Input\-Iterator2}, the template argument shall meet the - \oldconcept{InputIterator} requirements\iref{input.iterators}. + \oldconceptref{InputIterator} requirements\iref{input.iterators}. \item If an algorithm's template parameter is named \tcode{OutputIterator}, \tcode{OutputIterator1}, or \tcode{Output\-Iterator2}, the template argument shall meet the - \oldconcept{OutputIterator} requirements\iref{output.iterators}. + \oldconceptref{OutputIterator} requirements\iref{output.iterators}. \item If an algorithm's template parameter is named \tcode{ForwardIterator}, @@ -96,7 +96,7 @@ \tcode{ForwardItera\-tor2}, or \tcode{NoThrowForwardIterator}, the template argument shall meet the - \oldconcept{ForwardIterator} requirements\iref{forward.iterators} + \oldconceptref{ForwardIterator} requirements\iref{forward.iterators} if it is required to be a mutable iterator, or model \libconcept{forward_iterator}\iref{iterator.concept.forward} otherwise. \item @@ -112,7 +112,7 @@ \tcode{Bidirectional\-Iterator1}, or \tcode{BidirectionalIterator2}, the template argument shall meet the - \oldconcept{BidirectionalIterator} requirements\iref{bidirectional.iterators} + \oldconceptref{BidirectionalIterator} requirements\iref{bidirectional.iterators} if it is required to be a mutable iterator, or model \libconcept{bidirectional_iterator}\iref{iterator.concept.bidir} otherwise. \item @@ -121,7 +121,7 @@ \tcode{Random\-AccessIterator1}, or \tcode{RandomAccessIterator2}, the template argument shall meet the - \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} + \oldconceptref{RandomAccessIterator} requirements\iref{random.access.iterators} if it is required to be a mutable iterator, or model \libconcept{random_access_iterator}\iref{iterator.concept.random.access} otherwise. \end{itemize} @@ -3625,10 +3625,10 @@ \pnum \expects \tcode{Function} meets -the \oldconcept{MoveConstructible} requirements (\tref{cpp17.moveconstructible}). +the \oldconceptref{MoveConstructible} requirements (\tref{cpp17.moveconstructible}). \begin{note} \tcode{Function} need not meet the requirements of -\oldconcept{CopyConstructible} (\tref{cpp17.copyconstructible}). +\oldconceptref{CopyConstructible} (\tref{cpp17.copyconstructible}). \end{note} \pnum @@ -3665,7 +3665,7 @@ \begin{itemdescr} \pnum \expects -\tcode{Function} meets the \oldconcept{CopyConstructible} requirements. +\tcode{Function} meets the \oldconceptref{CopyConstructible} requirements. \pnum \effects @@ -3751,10 +3751,10 @@ \pnum \expects \tcode{n >= 0} is \tcode{true}. -\tcode{Function} meets the \oldconcept{MoveConstructible} requirements. +\tcode{Function} meets the \oldconceptref{MoveConstructible} requirements. \begin{note} \tcode{Function} need not meet -the requirements of \oldconcept{CopyConstructible}. +the requirements of \oldconceptref{CopyConstructible}. \end{note} \pnum @@ -3791,7 +3791,7 @@ \pnum \expects \tcode{n >= 0} is \tcode{true}. -\tcode{Function} meets the \oldconcept{CopyConstructible} requirements. +\tcode{Function} meets the \oldconceptref{CopyConstructible} requirements. \pnum \effects @@ -4457,7 +4457,7 @@ \item the types of \tcode{first1}, \tcode{last1}, \tcode{first2}, and \tcode{last2} meet the - \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} + \oldconceptref{RandomAccessIterator} requirements\iref{random.access.iterators} and \tcode{last1 - first1 != last2 - first2} for the overloads in namespace \tcode{std}; \item @@ -4781,7 +4781,7 @@ \pnum \remarks -\tcode{Searcher} need not meet the \oldconcept{CopyConstructible} requirements. +\tcode{Searcher} need not meet the \oldconceptref{CopyConstructible} requirements. \end{itemdescr} \rSec2[alg.starts.with]{Starts with} @@ -5196,7 +5196,7 @@ For the overload with an \tcode{ExecutionPolicy}, there might be a performance cost if \tcode{iterator_traits::value_type} -is not \oldconcept{\-Move\-Constructible} (\tref{cpp17.moveconstructible}). +is not \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}). \end{note} \pnum @@ -5602,7 +5602,7 @@ \tcode{invoke(op, invoke(proj, *(first1 + (i - result))))} for unary transforms defined in namespace \tcode{ranges}; \item - \tcode{invoke(binary_op, invoke(proj1, *(first1 + (i - result))), invoke(proj2,\linebreak *(first2 + (i - result))))} + \tcode{invoke(binary_op, invoke(proj1, *(first1 + (i - result))), invoke(proj2, *(first2 + (i - result))))} for binary transforms defined in namespace \tcode{ranges}. \end{itemize} \end{itemize} @@ -6007,7 +6007,7 @@ \expects For the algorithms in namespace \tcode{std}, the type of \tcode{*first} -meets the \oldconcept{MoveAssignable} requirements (\tref{cpp17.moveassignable}). +meets the \oldconceptref{MoveAssignable} requirements (\tref{cpp17.moveassignable}). \pnum \effects @@ -6117,7 +6117,7 @@ For the overloads with an \tcode{ExecutionPolicy}, there might be a performance cost if \tcode{iterator_traits::value_type} does not meet -the \oldconcept{\-Move\-Constructible} (\tref{cpp17.moveconstructible}) requirements. +the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) requirements. \end{note} \pnum @@ -6190,7 +6190,7 @@ For the overloads in namespace \tcode{std}, \tcode{pred} is an equivalence relation and the type of \tcode{*first} meets -the \oldconcept{MoveAssignable} requirements (\tref{cpp17.moveassignable}). +the \oldconceptref{MoveAssignable} requirements (\tref{cpp17.moveassignable}). \pnum \effects @@ -6293,18 +6293,18 @@ \libconcept{forward_iterator}\iref{iterator.concept.forward}, then there are no additional requirements for \tcode{T}. Otherwise, if \tcode{OutputIterator} meets - the \oldconcept{ForwardIterator} requirements and + the \oldconceptref{ForwardIterator} requirements and its value type is the same as \tcode{T}, then \tcode{T} meets - the \oldconcept{CopyAssignable} (\tref{cpp17.copyassignable}) requirements. + the \oldconceptref{CopyAssignable} (\tref{cpp17.copyassignable}) requirements. Otherwise, \tcode{T} meets both - the \oldconcept{CopyConstructible} (\tref{cpp17.copyconstructible}) and - \oldconcept{CopyAssignable} requirements. + the \oldconceptref{CopyConstructible} (\tref{cpp17.copyconstructible}) and + \oldconceptref{CopyAssignable} requirements. \begin{note} For the overloads with an \tcode{ExecutionPolicy}, there might be a performance cost if the value type of \tcode{ForwardIterator1} does not meet both the - \oldconcept{CopyConstructible} and \oldconcept{CopyAssignable} requirements. + \oldconceptref{CopyConstructible} and \oldconceptref{CopyAssignable} requirements. \end{note} \end{itemize} \end{itemize} @@ -6352,7 +6352,7 @@ \expects For the overloads in namespace \tcode{std}, \tcode{BidirectionalIterator} meets -the \oldconcept{Value\-Swappable} requirements\iref{swappable.requirements}. +the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements}. \pnum \effects @@ -6444,10 +6444,10 @@ \range{first}{middle} and \range{middle}{last} are valid ranges. For the overloads in namespace \tcode{std}, \tcode{ForwardIterator} meets -the \oldconcept{ValueSwappable} requirements\iref{swappable.requirements}, and +the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements}, and the type of \tcode{*first} meets -the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) and -\oldconcept{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. +the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) and +\oldconceptref{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. \pnum \effects @@ -6588,13 +6588,13 @@ \begin{itemize} \item \tcode{PopulationIterator} meets - the \oldconcept{InputIterator} requirements\iref{input.iterators}. + the \oldconceptref{InputIterator} requirements\iref{input.iterators}. \item \tcode{SampleIterator} meets - the \oldconcept{OutputIterator} requirements\iref{output.iterators}. + the \oldconceptref{OutputIterator} requirements\iref{output.iterators}. \item \tcode{SampleIterator} meets - the \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} + the \oldconceptref{RandomAccessIterator} requirements\iref{random.access.iterators} unless \tcode{Pop\-ulat\-ion\-Iter\-ator} models \libconcept{forward_iterator}\iref{iterator.concept.forward}. \item @@ -6662,7 +6662,7 @@ \begin{itemize} \item \tcode{RandomAccessIterator} meets - the \oldconcept{ValueSwappable} requirements\iref{swappable.requirements}. + the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements}. \item The type \tcode{remove_reference_t} meets the uniform random bit generator\iref{rand.req.urng} requirements. @@ -6714,7 +6714,7 @@ \expects \tcode{n >= 0} is \tcode{true}. For the overloads in namespace \tcode{std}, -the type of \tcode{*first} meets the \oldconcept{MoveAssignable} requirements. +the type of \tcode{*first} meets the \oldconceptref{MoveAssignable} requirements. \pnum \effects @@ -6768,10 +6768,10 @@ \expects \tcode{n >= 0} is \tcode{true}. For the overloads in namespace \tcode{std}, -the type of \tcode{*first} meets the \oldconcept{MoveAssignable} requirements, +the type of \tcode{*first} meets the \oldconceptref{MoveAssignable} requirements, and \tcode{ForwardIterator} meets -the \oldconcept{BidirectionalIterator} requirements\iref{bidirectional.iterators} or -the \oldconcept{ValueSwap\-pable} requirements. +the \oldconceptref{BidirectionalIterator} requirements\iref{bidirectional.iterators} or +the \oldconceptref{ValueSwappable} requirements. \pnum \effects @@ -6785,7 +6785,7 @@ \item for the overload in namespace \tcode{std} without an \tcode{ExecutionPolicy} template parameter, -\tcode{Forward\-Iterator} meets the \oldconcept{BidirectionalIterator} requirements, +\tcode{Forward\-Iterator} meets the \oldconceptref{BidirectionalIterator} requirements, \item for the overloads in namespace \tcode{ranges}, \tcode{I} models \libconcept{bidirectional_iterator}. @@ -6847,7 +6847,6 @@ If we define \tcode{equiv(a, b)} as \tcode{!comp(a, b) \&\& !comp(b, a)}, then the requirements are that \tcode{comp} and \tcode{equiv} both be transitive relations: - \begin{itemize} \item \tcode{comp(a, b) \&\& comp(b, c)} implies \tcode{comp(a, c)} \item \tcode{equiv(a, b) \&\& equiv(b, c)} implies \tcode{equiv(a, c)} @@ -6942,10 +6941,10 @@ \expects For the overloads in namespace \tcode{std}, \tcode{RandomAccessIterator} meets -the \oldconcept{Value\-Swappable} requirements\iref{swappable.requirements} and +the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements} and the type of \tcode{*first} meets -the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) and -\oldconcept{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. +the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) and +\oldconceptref{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. \pnum \effects @@ -7000,10 +6999,10 @@ \expects For the overloads in namespace \tcode{std}, \tcode{RandomAccessIterator} meets -the \oldconcept{Value\-Swappable} requirements\iref{swappable.requirements} and +the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements} and the type of \tcode{*first} meets -the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) and -\oldconcept{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. +the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) and +\oldconceptref{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. \pnum \effects @@ -7070,10 +7069,10 @@ \range{first}{middle} and \range{middle}{last} are valid ranges. For the overloads in namespace \tcode{std}, \tcode{RandomAccessIterator} meets -the \oldconcept{ValueSwappable} requirements\iref{swappable.requirements} and +the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements} and the type of \tcode{*first} meets -the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) and -\oldconcept{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. +the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) and +\oldconceptref{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. \pnum \effects @@ -7178,10 +7177,10 @@ \expects For the overloads in namespace \tcode{std}, \tcode{RandomAccessIterator} meets -the \oldconcept{Value\-Swappable} requirements\iref{swappable.requirements}, +the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements}, the type of \tcode{*result_first} meets -the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) and -\oldconcept{\-Move\-Assignable} (\tref{cpp17.moveassignable}) requirements. +the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) and +\oldconceptref{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. \pnum For iterators \tcode{a1} and \tcode{b1} in \range{first}{last}, and @@ -7383,10 +7382,10 @@ \range{first}{nth} and \range{nth}{last} are valid ranges. For the overloads in namespace \tcode{std}, \tcode{RandomAccessIterator} meets -the \oldconcept{ValueSwappable} requirements\iref{swappable.requirements}, and +the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements}, and the type of \tcode{*first} meets -the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) and -\oldconcept{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. +the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) and +\oldconceptref{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. \pnum \effects @@ -7584,7 +7583,7 @@ are partitioned with respect to the expressions \tcode{bool(invoke(comp, invoke(proj, e), value))} and \tcode{!bool(invoke(comp, value, invoke(proj, e)))}. -Also, for all elements \tcode{e} of \tcode{[first, last)}, +Also, for all elements \tcode{e} of \range{first}{last}, \tcode{bool(comp(e, value))} implies \tcode{!bool(comp(\brk{}value, e))} for the overloads in namespace \tcode{std}. @@ -7651,7 +7650,7 @@ are partitioned with respect to the expressions \tcode{bool(invoke(comp, invoke(proj, e), value))} and \tcode{!bool(invoke(comp, value, invoke(proj, e)))}. -Also, for all elements \tcode{e} of \tcode{[first, last)}, +Also, for all elements \tcode{e} of \range{first}{last}, \tcode{bool(comp(e, value))} implies \tcode{!bool(comp(\brk{}value, e))} for the overloads in namespace \tcode{std}. @@ -7734,7 +7733,7 @@ \expects For the overloads in namespace \tcode{std}, \tcode{ForwardIterator} meets -the \oldconcept{ValueSwappable} requirements\iref{swappable.requirements}. +the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements}. \pnum \effects @@ -7761,7 +7760,7 @@ For the overload with no \tcode{ExecutionPolicy}, exactly $N$ applications of the predicate and projection. At most $N / 2$ swaps if the type of \tcode{first} meets - the \oldconcept{BidirectionalIterator} requirements + the \oldconceptref{BidirectionalIterator} requirements for the overloads in namespace \tcode{std} or models \libconcept{bidirectional_iterator} for the overloads in namespace \tcode{ranges}, @@ -7770,7 +7769,6 @@ For the overload with an \tcode{ExecutionPolicy}, \bigoh{N \log N} swaps and \bigoh{N} applications of the predicate. \end{itemize} - \end{itemdescr} \indexlibraryglobal{stable_partition}% @@ -7804,10 +7802,10 @@ \expects For the overloads in namespace \tcode{std}, \tcode{BidirectionalIterator} meets -the \oldconcept{Value\-Swappable} requirements\iref{swappable.requirements} and +the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements} and the type of \tcode{*first} meets -the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) and -\oldconcept{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. +the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) and +\oldconceptref{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. \pnum \effects @@ -7890,7 +7888,7 @@ \begin{note} For the overload with an \tcode{ExecutionPolicy}, there might be a performance cost if \tcode{first}'s value type -does not meet the \oldconcept{CopyConstructible} requirements. +does not meet the \oldconceptref{CopyConstructible} requirements. \end{note} \pnum @@ -8095,10 +8093,10 @@ sorted with respect to \tcode{comp} and \tcode{proj}. For the overloads in namespace \tcode{std}, \tcode{BidirectionalIterator} meets -the \oldconcept{Value\-Swappable} requirements\iref{swappable.requirements} and +the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements} and the type of \tcode{*first} meets -the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) and -\oldconcept{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. +the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) and +\oldconceptref{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. \pnum \effects @@ -8125,7 +8123,7 @@ \pnum \remarks -Stable\iref{algorithm.stable}. +\link{Stable}{algorithm.stable}. \end{itemdescr} \begin{itemdecl} @@ -8612,7 +8610,6 @@ {heap with respect to comp and proj@heap with respect to \tcode{comp} and \tcode{proj}} for a comparator and projection \tcode{comp} and \tcode{proj} if its elements are organized such that: - \begin{itemize} \item With \tcode{$N$ = b - a}, for all $i$, $0 < i < N$, @@ -8665,10 +8662,10 @@ is a valid heap with respect to \tcode{comp} and \tcode{proj}. For the overloads in namespace \tcode{std}, \tcode{RandomAccessIterator} meets -the \oldconcept{ValueSwappable} requirements\iref{swappable.requirements} and +the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements} and the type of \tcode{*first} meets -the \oldconcept{MoveConstructible} requirements (\tref{cpp17.moveconstructible}) and -the \oldconcept{MoveAssignable} requirements (\tref{cpp17.moveassignable}). +the \oldconceptref{MoveConstructible} requirements (\tref{cpp17.moveconstructible}) and +the \oldconceptref{MoveAssignable} requirements (\tref{cpp17.moveassignable}). \pnum \effects @@ -8718,10 +8715,10 @@ is a valid non-empty heap with respect to \tcode{comp} and \tcode{proj}. For the overloads in namespace \tcode{std}, \tcode{RandomAccessIterator} meets -the \oldconcept{ValueSwappable} requirements\iref{swappable.requirements} and +the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements} and the type of \tcode{*first} meets -the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) and -\oldconcept{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. +the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) and +\oldconceptref{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. \pnum \effects @@ -8774,10 +8771,10 @@ \expects For the overloads in namespace \tcode{std}, \tcode{RandomAccessIterator} meets -the \oldconcept{ValueSwap\-pable} requirements\iref{swappable.requirements} and +the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements} and the type of \tcode{*first} meets -the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) and -\oldconcept{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. +the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) and +\oldconceptref{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. \pnum \effects @@ -8827,10 +8824,10 @@ a valid heap with respect to \tcode{comp} and \tcode{proj}. For the overloads in namespace \tcode{std}, \tcode{RandomAccessIterator} meets -the \oldconcept{ValueSwappable} requirements\iref{swappable.requirements} and +the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements} and the type of \tcode{*first} meets -the \oldconcept{MoveConst\-ruct\-ible} (\tref{cpp17.moveconstructible}) and -\oldconcept{Move\-Assign\-able} (\tref{cpp17.moveassignable}) requirements. +the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) and +\oldconceptref{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. \pnum \effects @@ -8989,7 +8986,7 @@ \pnum \expects For the first form, \tcode{T} meets the -\oldconcept{LessThanComparable} requirements (\tref{cpp17.lessthancomparable}). +\oldconceptref{LessThanComparable} requirements (\tref{cpp17.lessthancomparable}). \pnum \returns @@ -9029,8 +9026,8 @@ \expects \tcode{ranges::distance(r) > 0}. For the overloads in namespace \tcode{std}, -\tcode{T} meets the \oldconcept{\-Copy\-Constructible} requirements. -For the first form, \tcode{T} meets the \oldconcept{LessThanComparable} +\tcode{T} meets the \oldconceptref{CopyConstructible} requirements. +For the first form, \tcode{T} meets the \oldconceptref{LessThanComparable} requirements (\tref{cpp17.lessthancomparable}). \pnum @@ -9067,7 +9064,7 @@ \pnum \expects For the first form, \tcode{T} meets the -\oldconcept{LessThanComparable} requirements (\tref{cpp17.lessthancomparable}). +\oldconceptref{LessThanComparable} requirements (\tref{cpp17.lessthancomparable}). \pnum \returns @@ -9107,8 +9104,8 @@ \expects \tcode{ranges::distance(r) > 0}. For the overloads in namespace \tcode{std}, -\tcode{T} meets the \oldconcept{\-Copy\-Constructible} requirements. -For the first form, \tcode{T} meets the \oldconcept{LessThanComparable} +\tcode{T} meets the \oldconceptref{CopyConstructible} requirements. +For the first form, \tcode{T} meets the \oldconceptref{LessThanComparable} requirements (\tref{cpp17.lessthancomparable}). \pnum @@ -9147,7 +9144,7 @@ \pnum \expects For the first form, \tcode{T} meets the -\oldconcept{LessThanComparable} requirements (\tref{cpp17.lessthancomparable}). +\oldconceptref{LessThanComparable} requirements (\tref{cpp17.lessthancomparable}). \pnum \returns @@ -9188,8 +9185,8 @@ \expects \tcode{ranges::distance(r) > 0}. For the overloads in namespace \tcode{std}, -\tcode{T} meets the \oldconcept{\-Copy\-Constructible} requirements. -For the first form, type \tcode{T} meets the \oldconcept{LessThanComparable} +\tcode{T} meets the \oldconceptref{CopyConstructible} requirements. +For the first form, type \tcode{T} meets the \oldconceptref{LessThanComparable} requirements (\tref{cpp17.lessthancomparable}). \pnum @@ -9381,7 +9378,7 @@ \expects \tcode{bool(invoke(comp, invoke(proj, hi), invoke(proj, lo)))} is \tcode{false}. For the first form, type \tcode{T} -meets the \oldconcept{LessThan\-Comparable} +meets the \oldconceptref{LessThanComparable} requirements (\tref{cpp17.lessthancomparable}). \pnum @@ -9570,7 +9567,7 @@ \expects For the overloads in namespace \tcode{std}, \tcode{BidirectionalIterator} meets -the \oldconcept{Value\-Swappable} requirements\iref{swappable.requirements}. +the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements}. \pnum \effects @@ -9629,7 +9626,7 @@ \expects For the overloads in namespace \tcode{std}, \tcode{BidirectionalIterator} meets -the \oldconcept{Value\-Swappable} requirements\iref{swappable.requirements}. +the \oldconceptref{ValueSwappable} requirements\iref{swappable.requirements}. \pnum \effects @@ -9947,8 +9944,8 @@ \pnum \expects \tcode{T} meets -the \oldconcept{CopyConstructible} (\tref{cpp17.copyconstructible}) -and \oldconcept{CopyAssignable} (\tref{cpp17.copyassignable}) requirements. +the \oldconceptref{CopyConstructible} (\tref{cpp17.copyconstructible}) +and \oldconceptref{CopyAssignable} (\tref{cpp17.copyassignable}) requirements. In the range \crange{first}{last}, \tcode{binary_op} neither modifies elements nor invalidates iterators or subranges. @@ -10070,7 +10067,7 @@ \expects \begin{itemize} \item - \tcode{T} meets the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) requirements. + \tcode{T} meets the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) requirements. \item \tcode{binary_op} neither invalidates iterators or subranges, nor modifies elements in the range \crange{first}{last}. @@ -10114,8 +10111,8 @@ \pnum \expects \tcode{T} meets -the \oldconcept{CopyConstructible} (\tref{cpp17.copyconstructible}) -and \oldconcept{CopyAssignable} (\tref{cpp17.copyassignable}) requirements. +the \oldconceptref{CopyConstructible} (\tref{cpp17.copyconstructible}) +and \oldconceptref{CopyAssignable} (\tref{cpp17.copyassignable}) requirements. In the ranges \crange{first1}{last1} and \crange{first2}{first2 + (last1 - first1)} \tcode{binary_op1} and \tcode{binary_op2} @@ -10210,7 +10207,7 @@ \expects \begin{itemize} \item - \tcode{T} meets the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) requirements. + \tcode{T} meets the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) requirements. \item Neither \tcode{binary_op1} nor \tcode{binary_op2} invalidates subranges, nor modifies elements in the ranges @@ -10260,7 +10257,7 @@ \expects \begin{itemize} \item - \tcode{T} meets the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) requirements. + \tcode{T} meets the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) requirements. \item Neither \tcode{unary_op} nor \tcode{binary_op} invalidates subranges, nor modifies elements in the range \crange{first}{last}. @@ -10409,7 +10406,7 @@ \expects \begin{itemize} \item - \tcode{T} meets the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) requirements. + \tcode{T} meets the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) requirements. \item \tcode{binary_op} neither invalidates iterators or subranges, nor modifies elements in @@ -10530,9 +10527,9 @@ \begin{itemize} \item If \tcode{init} is provided, - \tcode{T} meets the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) requirements; + \tcode{T} meets the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) requirements; otherwise, \tcode{U} - meets the \oldconcept{MoveConstructible} requirements. + meets the \oldconceptref{MoveConstructible} requirements. \item \tcode{binary_op} neither invalidates iterators or subranges, nor modifies elements in @@ -10609,7 +10606,7 @@ \expects \begin{itemize} \item - \tcode{T} meets the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) requirements. + \tcode{T} meets the \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) requirements. \item Neither \tcode{unary_op} nor \tcode{binary_op} invalidates iterators or subranges, nor modifies elements in @@ -10708,9 +10705,9 @@ \begin{itemize} \item If \tcode{init} is provided, \tcode{T} meets the - \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) requirements; + \oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) requirements; otherwise, \tcode{U} meets the - \oldconcept{MoveConstructible} requirements. + \oldconceptref{MoveConstructible} requirements. \item Neither \tcode{unary_op} nor \tcode{binary_op} invalidates iterators or subranges, nor modifies elements in @@ -10809,7 +10806,7 @@ \begin{itemize} \item For the overloads with no \tcode{ExecutionPolicy}, - \tcode{T} meets the \oldconcept{MoveAssignable} (\tref{cpp17.moveassignable}) + \tcode{T} meets the \oldconceptref{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. \item For all overloads, in the ranges \crange{first}{last} @@ -10837,7 +10834,7 @@ \pnum For the overloads with an \tcode{ExecutionPolicy} and a non-empty range, performs \tcode{*result = *first}. -Then, for every \tcode{d} in \tcode{[1, last - first - 1]}, +Then, for every \tcode{d} in \crange{1}{last - first - 1}, performs \tcode{*(result + d) = binary_op(*(first + d), *(first + (d - 1)))}. \pnum @@ -11181,7 +11178,6 @@ \pnum Some algorithms in this subclause are constrained with the following exposition-only concepts: - \begin{itemdecl} template concept @\defexposconcept{nothrow-input-iterator}@ = // \expos @@ -11742,7 +11738,7 @@ \pnum \constraints The expression \tcode{::new (declval()) T(declval()...)} -is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}. +is well-formed when treated as an \deflink{unevaluated operand}{expr.context}. \pnum \effects @@ -11894,7 +11890,7 @@ \pnum \remarks The effects of \tcode{generate_random(r, g)} shall be equivalent to -\tcode{ranges::generate(std::for\-ward(r), ref(g))}. +\tcode{ranges::generate(std::forward(r), ref(g))}. \begin{note} This implies that \tcode{g.generate_random(a)} fills \tcode{a} with the same values as produced by invocation of \tcode{g()}. diff --git a/source/assets/figdag.dot b/source/assets/figdag.dot index b29593a910..797d8f2beb 100644 --- a/source/assets/figdag.dot +++ b/source/assets/figdag.dot @@ -1,10 +1,10 @@ digraph dag { graph [nodesep=1.5, rankdir=BT]; - Base [shape=plaintext, height=.1, fontsize=24]; - Derived1 [shape=plaintext, height=.1, fontsize=24]; - Derived2 [shape=plaintext, height=.1, fontsize=24]; + Base [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + Derived1 [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + Derived2 [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; Derived2 -> Derived1; Derived1 -> Base; -} \ No newline at end of file +} diff --git a/source/assets/figname.dot b/source/assets/figname.dot index 8cb94e93b9..9878984d6c 100644 --- a/source/assets/figname.dot +++ b/source/assets/figname.dot @@ -1,12 +1,12 @@ digraph virt { graph [nodesep=1.5, rankdir=BT]; - W1 [label = "W", shape=plaintext, height=.1, fontsize=24]; - V [shape=plaintext, height=.1, fontsize=24]; - W2 [label = "W", shape=plaintext, height=.1, fontsize=24]; - B [shape=plaintext, height=.1, fontsize=24]; - C [shape=plaintext, height=.1, fontsize=24]; - D [shape=plaintext, height=.1, fontsize=24]; + W1 [label = "W", shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + V [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + W2 [label = "W", shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + B [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + C [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + D [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; D -> B; D -> C; @@ -14,4 +14,4 @@ digraph virt { C -> V; B -> W1; C -> W2; -} \ No newline at end of file +} diff --git a/source/assets/fignonvirt.dot b/source/assets/fignonvirt.dot index fac23dcf43..ee3a3d9b64 100644 --- a/source/assets/fignonvirt.dot +++ b/source/assets/fignonvirt.dot @@ -1,14 +1,14 @@ digraph nonvirt { graph [nodesep=1.5, rankdir=BT]; - L1 [label = "L", shape=plaintext, height=.1, fontsize=24]; - L2 [label = "L", shape=plaintext, height=.1, fontsize=24]; - A [shape=plaintext, height=.1, fontsize=24]; - B [shape=plaintext, height=.1, fontsize=24]; - C [shape=plaintext, height=.1, fontsize=24]; + L1 [label = "L", shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + L2 [label = "L", shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + A [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + B [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + C [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; C -> B; C -> A; B -> L2; A -> L1; -} \ No newline at end of file +} diff --git a/source/assets/figvirt.dot b/source/assets/figvirt.dot index 4c9fa77568..e1caa157ff 100644 --- a/source/assets/figvirt.dot +++ b/source/assets/figvirt.dot @@ -1,13 +1,13 @@ digraph virt { graph [nodesep=1.5, rankdir=BT]; - V [shape=plaintext, height=.1, fontsize=24]; - A [shape=plaintext, height=.1, fontsize=24]; - B [shape=plaintext, height=.1, fontsize=24]; - C [shape=plaintext, height=.1, fontsize=24]; + V [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + A [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + B [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + C [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; C -> B; C -> A; B -> V; A -> V; -} \ No newline at end of file +} diff --git a/source/assets/figvirtnonvirt.dot b/source/assets/figvirtnonvirt.dot index b3c04d48e8..1ab8e364c0 100644 --- a/source/assets/figvirtnonvirt.dot +++ b/source/assets/figvirtnonvirt.dot @@ -1,12 +1,12 @@ digraph virtnonvirt { graph [nodesep=1.5, rankdir=BT]; - B1 [label = "B", shape=plaintext, height=.1, fontsize=24]; - B2 [label = "B", shape=plaintext, height=.1, fontsize=24]; - AA [shape=plaintext, height=.1, fontsize=24]; - X [shape=plaintext, height=.1, fontsize=24]; - Y [shape=plaintext, height=.1, fontsize=24]; - Z [shape=plaintext, height=.1, fontsize=24]; + B1 [label = "B", shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + B2 [label = "B", shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + AA [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + X [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + Y [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; + Z [shape=plaintext, height=.1, fontsize=11, fontname="Courier New"]; subgraph { AA -> X; @@ -17,4 +17,4 @@ digraph virtnonvirt { AA -> Z [weight=0]; Z -> B2; -} \ No newline at end of file +} diff --git a/source/basic.tex b/source/basic.tex index a3020c43c3..2b27f2f7e8 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -97,8 +97,8 @@ \pnum A \defnadj{local}{entity} is a variable with -automatic storage duration\iref{basic.stc.auto}, -a structured binding\iref{dcl.struct.bind} +\link{automatic storage duration}{basic.stc.auto}, +a \link{structured binding}{dcl.struct.bind} whose corresponding variable is such an entity, or the \tcode{*\keyword{this}} object\iref{expr.prim.this}. @@ -126,7 +126,7 @@ \indextext{linkage}% A name used in more than one translation unit can potentially refer to the same entity in these translation units depending on the -linkage\iref{basic.link} of the name specified in each +\link{linkage}{basic.link} of the name specified in each translation unit. \rSec1[basic.def]{Declarations and definitions} @@ -135,7 +135,7 @@ \indextext{declaration!definition versus}% \indextext{declaration}% \indextext{declaration!name}% -A declaration\iref{dcl.dcl} may (re)introduce +A \link{declaration}{dcl.dcl} may (re)introduce one or more names and/or entities into a translation unit. If so, the @@ -148,7 +148,7 @@ \item a static assertion\iref{dcl.pre}, \item controlling template instantiation\iref{temp.explicit}, \item guiding template argument deduction for constructors\iref{temp.deduct.guide}, -\item use of attributes\iref{dcl.attr}, and +\item use of \link{attributes}{dcl.attr}, and \item nothing (in the case of an \grammarterm{empty-declaration}). \end{itemize} @@ -232,7 +232,7 @@ \item it is an explicit instantiation declaration\iref{temp.explicit}, or \item it is -an explicit specialization\iref{temp.expl.spec} whose +an \link{explicit specialization}{temp.expl.spec} whose \grammarterm{declaration} is not a definition. \end{itemize} A declaration is said to be a \defn{definition} of each entity that it defines. @@ -253,7 +253,6 @@ namespace N { int d; } // defines \tcode{N} and \tcode{N::d} namespace N1 = N; // defines \tcode{N1} X anX; // defines \tcode{anX} - \end{codeblock} whereas these are just declarations: \begin{codeblock} @@ -274,7 +273,7 @@ default constructor\iref{class.default.ctor}, copy constructor, move constructor\iref{class.copy.ctor}, copy assignment operator, move assignment operator\iref{class.copy.assign}, -or destructor\iref{class.dtor} member functions. +or \link{destructor}{class.dtor} member functions. \end{note} \begin{example} Given @@ -282,7 +281,7 @@ #include struct C { - std::string s; // \tcode{std::string} is the standard library class\iref{string.classes} + std::string s; // \tcode{std::string} is the standard library class\iref{string.classes} }; int main() { @@ -358,7 +357,7 @@ \item If $E$ is an \grammarterm{id-expression}\iref{expr.prim.id}, the set contains only $E$. -\item If $E$ is a subscripting operation\iref{expr.sub} with +\item If $E$ is a \link{subscripting}{expr.sub} operation with an array operand, the set contains the potential results of that operand. \item If $E$ is a class member access expression\iref{expr.ref} of the form @@ -368,16 +367,15 @@ \item If $E$ is a class member access expression naming a static data member, the set contains the \grammarterm{id-expression} designating the data member. -\item If $E$ is a pointer-to-member -expression\iref{expr.mptr.oper} of the form +\item If $E$ is a \link{pointer-to-member expression}{expr.mptr.oper} of the form $E_1$ \tcode{.*} $E_2$, the set contains the potential results of $E_1$. \item If $E$ has the form \tcode{($E_1$)}, the set contains the potential results of $E_1$. -\item If $E$ is a glvalue conditional -expression\iref{expr.cond}, the set is the union of the sets of +\item If $E$ is a glvalue \link{conditional expression}{expr.cond}, +the set is the union of the sets of potential results of the second and third operands. -\item If $E$ is a comma expression\iref{expr.comma}, the set +\item If $E$ is a \link{comma expression}{expr.comma}, the set contains the potential results of the right operand. \item Otherwise, the set is empty. \end{itemize} @@ -492,8 +490,8 @@ copy assignment or move assignment function for another class as specified in~\ref{class.copy.assign}. A constructor for a class is odr-used as specified -in~\ref{dcl.init}. A destructor for a class is odr-used if it is potentially -invoked\iref{class.dtor}. +in~\ref{dcl.init}. A destructor for a class is odr-used if it is +\deflink{potentially invoked}{class.dtor}. \pnum A local entity\iref{basic.pre} @@ -563,7 +561,7 @@ \pnum Every program shall contain at least one definition of every function or variable that is odr-used in that program -outside of a discarded statement\iref{stmt.if}; no diagnostic required. +outside of a \deflink{discarded statement}{stmt.if}; no diagnostic required. The definition can appear explicitly in the program, it can be found in the standard or a user-defined library, or (when appropriate) it is implicitly defined (see~\ref{class.default.ctor}, \ref{class.copy.ctor}, @@ -611,9 +609,9 @@ describe in which contexts complete class types are required. A class type \tcode{T} must be complete if \begin{itemize} -\item an object of type \tcode{T} is defined\iref{basic.def}, or -\item a non-static class data member of type \tcode{T} is -declared\iref{class.mem}, or +\item an object of type \tcode{T} is \link{defined}{basic.def}, or +\item a non-static class \deflink{data member}{class.mem} of +type \tcode{T} is declared, or \item \tcode{T} is used as the allocated type or array element type in a \grammarterm{new-expression}\iref{expr.new}, or \item an lvalue-to-rvalue conversion is applied to @@ -633,10 +631,10 @@ \keyword{sizeof} operator\iref{expr.sizeof} is applied to an operand of type \tcode{T}, or \item a function with a return type or argument type of type \tcode{T} -is defined\iref{basic.def} or called\iref{expr.call}, or +is defined\iref{basic.def} or \link{called}{expr.call}, or \item a class with a base class of type \tcode{T} is defined\iref{class.derived}, or -\item an lvalue of type \tcode{T} is assigned to\iref{expr.ass}, or +\item an lvalue of type \tcode{T} is \link{assigned to}{expr.ass}, or \item the type \tcode{T} is the subject of an \keyword{alignof} expression\iref{expr.alignof}, or \item an \grammarterm{exception-declaration} has type \tcode{T}, reference to @@ -679,7 +677,7 @@ a non-volatile const object with internal or no linkage if the object \begin{itemize} \item has the same literal type in all definitions of \tcode{D}, -\item is initialized with a constant expression\iref{expr.const}, +\item is initialized with a \link{constant expression}{expr.const}, \item is not odr-used in any definition of \tcode{D}, and \item has the same value in all definitions of \tcode{D}, \end{itemize} @@ -725,7 +723,6 @@ \pnum For the purposes of the preceding requirements: - \begin{itemize} \item If \tcode{D} is a class with an implicitly-declared constructor\iref{class.default.ctor,class.copy.ctor}, @@ -2458,23 +2455,23 @@ void h() { - AB::g(); // \tcode{g} is declared directly in \tcode{AB}, therefore \tcode{S} is $\{ \tcode{AB::g()} \}$ and \tcode{AB::g()} is chosen + AB::g(); // \tcode{g} is declared directly in \tcode{AB}, therefore \tcode{S} is $\{ \tcode{AB::g()} \}$ and \tcode{AB::g()} is chosen - AB::f(1); // \tcode{f} is not declared directly in \tcode{AB} so the rules are applied recursively to \tcode{A} and \tcode{B}; - // namespace \tcode{Y} is not searched and \tcode{Y::f(float)} is not considered; - // \tcode{S} is $\{ \tcode{A::f(int)}, \tcode{B::f(char)} \}$ and overload resolution chooses \tcode{A::f(int)} + AB::f(1); // \tcode{f} is not declared directly in \tcode{AB} so the rules are applied recursively to \tcode{A} and \tcode{B}; + // namespace \tcode{Y} is not searched and \tcode{Y::f(float)} is not considered; + // \tcode{S} is $\{ \tcode{A::f(int)}, \tcode{B::f(char)} \}$ and overload resolution chooses \tcode{A::f(int)} - AB::f('c'); // as above but resolution chooses \tcode{B::f(char)} + AB::f('c'); // as above but resolution chooses \tcode{B::f(char)} - AB::x++; // \tcode{x} is not declared directly in \tcode{AB}, and is not declared in \tcode{A} or \tcode{B}, so the rules - // are applied recursively to \tcode{Y} and \tcode{Z}, \tcode{S} is $\{ \}$ so the program is ill-formed + AB::x++; // \tcode{x} is not declared directly in \tcode{AB}, and is not declared in \tcode{A} or \tcode{B}, so the rules + // are applied recursively to \tcode{Y} and \tcode{Z}, \tcode{S} is $\{ \}$ so the program is ill-formed - AB::i++; // \tcode{i} is not declared directly in \tcode{AB} so the rules are applied recursively to \tcode{A} and \tcode{B}, - // \tcode{S} is $\{ \tcode{A::i}, \tcode{B::i} \}$ so the use is ambiguous and the program is ill-formed + AB::i++; // \tcode{i} is not declared directly in \tcode{AB} so the rules are applied recursively to \tcode{A} and \tcode{B}, + // \tcode{S} is $\{ \tcode{A::i}, \tcode{B::i} \}$ so the use is ambiguous and the program is ill-formed - AB::h(16.8); // \tcode{h} is not declared directly in \tcode{AB} and not declared directly in \tcode{A} or \tcode{B} so the rules - // are applied recursively to \tcode{Y} and \tcode{Z}, \tcode{S} is $\{ \tcode{Y::h(int)}, \tcode{Z::h(double)} \}$ and - // overload resolution chooses \tcode{Z::h(double)} + AB::h(16.8); // \tcode{h} is not declared directly in \tcode{AB} and not declared directly in \tcode{A} or \tcode{B} so the rules + // are applied recursively to \tcode{Y} and \tcode{Z}, \tcode{S} is $\{ \tcode{Y::h(int)}, \tcode{Z::h(double)} \}$ and + // overload resolution chooses \tcode{Z::h(double)} } \end{codeblock} \end{example} @@ -2653,7 +2650,7 @@ \pnum \indextext{program}% -A \defn{program} consists of one or more translation units\iref{lex.separate} +A \defn{program} consists of one or more \deflinkx{translation units}{translation unit}{lex.separate} linked together. A translation unit consists of a sequence of declarations. @@ -2686,7 +2683,7 @@ \indextext{linkage!\idxcode{inline} and}% \indextext{\idxcode{inline}!linkage of}% The name of an entity -that belongs to a namespace scope\iref{basic.scope.namespace} +that belongs to a \link{namespace scope}{basic.scope.namespace} has internal linkage if it is the name of \begin{itemize} \item @@ -2727,7 +2724,7 @@ purposes\iref{dcl.typedef}; or \item \indextext{enumeration!linkage of}% -a named enumeration\iref{dcl.enum}, or an unnamed enumeration defined +a named \link{enumeration}{dcl.enum}, or an unnamed enumeration defined in a typedef declaration in which the enumeration has the typedef name for linkage purposes\iref{dcl.typedef}; or \item an unnamed enumeration @@ -2803,7 +2800,7 @@ \pnum \indextext{linkage!no}% Names not covered by these rules have no linkage. Moreover, except as -noted, a name declared at block scope\iref{basic.scope.block} has no +noted, a name declared at \deflinkx{block scope}{scope!block}{basic.scope.block} has no linkage. \pnum @@ -3123,8 +3120,8 @@ involve additional memory locations that are not accessible to programs but are managed by the implementation. \end{note} -Two or more threads of -execution\iref{intro.multithread} can access separate memory +Two or more \deflinkx{threads of +execution}{thread of execution}{intro.multithread} can access separate memory locations without interfering with each other. \pnum @@ -3168,15 +3165,15 @@ The constructs in a \Cpp{} program create, destroy, refer to, access, and manipulate objects. An \defn{object} is created -by a definition\iref{basic.def}, +by a \link{definition}{basic.def}, by a \grammarterm{new-expression}\iref{expr.new}, by an operation that implicitly creates objects (see below), -when implicitly changing the active member of a union\iref{class.union}, +when implicitly changing the active member of a \link{union}{class.union}, or when a temporary object is created\iref{conv.rval,class.temporary}. An object occupies a region of storage in its period of construction\iref{class.cdtor}, -throughout its lifetime\iref{basic.life}, +throughout its \link{lifetime}{basic.life}, and in its period of destruction\iref{class.cdtor}. \begin{note} @@ -3306,7 +3303,7 @@ \begin{itemize} \item a base class subobject, or \item a non-static data member -declared with the \tcode{no_unique_address} attribute\iref{dcl.attr.nouniqueaddr}. +declared with the \link{\tcode{no_unique_address}}{dcl.attr.nouniqueaddr} attribute. \end{itemize} \pnum @@ -3327,7 +3324,7 @@ are \impldef{which non-standard-layout objects containing no data are considered empty}. \indextext{most derived object!bit-field}% -Unless it is a bit-field\iref{class.bit}, +Unless it is a \link{bit-field}{class.bit}, an object with nonzero size shall occupy one or more bytes of storage, including every byte that is occupied in full or in part @@ -3797,16 +3794,16 @@ is produced by the evaluation of: \begin{itemize} \item - the second or third operand of a conditional expression\iref{expr.cond}, + the second or third operand of a \link{conditional expression}{expr.cond}, \item - the right operand of a comma expression\iref{expr.comma}, + the right operand of a \link{comma expression}{expr.comma}, \item the operand of a cast or conversion\iref{conv.integral, expr.type.conv,expr.static.cast,expr.cast} to an unsigned ordinary character type or \tcode{std::byte} type\iref{cstddef.syn}, or \item - a discarded-value expression\iref{expr.context}, + a \deflink{discarded-value expression}{expr.context}, \end{itemize} then the result of the operation is an indeterminate value or that erroneous value, respectively. @@ -3997,8 +3994,8 @@ \indextext{storage duration!dynamic|(} \pnum -Objects can be created dynamically during program -execution\iref{intro.execution}, using +Objects can be created dynamically during \link{program +execution}{intro.execution}, using \indextext{\idxcode{new}}% \grammarterm{new-expression}{s}\iref{expr.new}, and destroyed using \indextext{\idxcode{delete}}% @@ -4167,19 +4164,19 @@ \tcode{std::bad_alloc}\iref{bad.alloc}. \pnum -A global allocation function is only called as the result of a new -expression\iref{expr.new}, or called directly using the function call -syntax\iref{expr.call}, or called indirectly to allocate storage for +A global allocation function is only called as the result of a \link{new +expression}{expr.new}, or called directly using the \link{function call}{expr.call} +syntax, or called indirectly to allocate storage for a coroutine state\iref{dcl.fct.def.coroutine}, or called indirectly through calls to the functions in the \Cpp{} standard library. \begin{note} In particular, a global allocation function is not called to allocate storage for objects -with static storage duration\iref{basic.stc.static}, for objects or references -with thread storage duration\iref{basic.stc.thread}, for objects of -type \tcode{std::type_info}\iref{expr.typeid}, or for an -exception object\iref{except.throw}. +with \link{static storage duration}{basic.stc.static}, for objects or references +with \link{thread storage duration}{basic.stc.thread}, for objects of +type \link{\tcode{std::type_info}}{expr.typeid}, or for an +\link{exception object}{except.throw}. \end{note} \rSec4[basic.stc.dynamic.deallocation]{Deallocation functions} @@ -4258,7 +4255,7 @@ integer value representing the number of bytes between successive addresses at which a given object can be allocated. An object type imposes an alignment requirement on every object of that type; stricter alignment can be requested -using the alignment specifier\iref{dcl.align}. +using the \link{alignment specifier}{dcl.align}. Attempting to create an object\iref{intro.object} in storage that does not meet the alignment requirements of the object's type is undefined behavior. @@ -4324,7 +4321,6 @@ \pnum Comparing alignments is meaningful and provides the obvious results: - \begin{itemize} \item Two alignments are equal when their numeric values are equal. \item Two alignments are different when their numeric values are not equal. @@ -4737,9 +4733,9 @@ impose requirements on implementations regarding the representation of types. There are two kinds of types: fundamental types and compound types. -Types describe objects\iref{intro.object}, -references\iref{dcl.ref}, -or functions\iref{dcl.fct}. +Types describe \link{objects}{intro.object}, +\link{references}{dcl.ref}, +or \link{functions}{dcl.fct}. \end{note} \pnum @@ -4913,7 +4909,7 @@ pointer types, pointer-to-member types\iref{basic.compound}, \tcode{std::nullptr_t}, and -cv-qualified\iref{basic.type.qualifier} versions of these +\link{cv-qualified}{basic.type.qualifier} versions of these types are collectively called \defnadjx{scalar}{types}{type}. \label{term.trivially.copyable.type}% @@ -4943,7 +4939,7 @@ \item a scalar type; or \item a reference type; or \item an array of literal type; or -\item a possibly cv-qualified class type\iref{class} that +\item a possibly cv-qualified \link{class type}{class} that has all of the following properties: \begin{itemize} \item it has a constexpr destructor\iref{dcl.constexpr}, @@ -4977,8 +4973,8 @@ Two types \cvqual{cv1} \tcode{T1} and \cvqual{cv2} \tcode{T2} are \defnadjx{layout-compatible}{types}{type} if \tcode{T1} and \tcode{T2} are the same type, -layout-compatible enumerations\iref{dcl.enum}, or -layout-compatible standard-layout class types\iref{class.mem}. +\deflinkx{layout-compatible enumerations}{layout-compatible!enumeration}{dcl.enum}, or +\deflinkx{layout-compatible standard-layout class types}{layout-compatible!class}{class.mem}. \rSec2[basic.fundamental]{Fundamental types} @@ -5427,7 +5423,7 @@ which identify members of a given type within objects of a given class, \ref{dcl.mptr}. Pointers to data members and pointers to member functions are collectively -called \term{pointer-to-member} types. +called \defn{pointer-to-member} types. \end{itemize} \pnum @@ -5505,7 +5501,7 @@ have the same value representation and alignment requirements\iref{basic.align}. \begin{note} -Pointers to over-aligned types\iref{basic.align} have no special +Pointers to \deflinkx{over-aligned types}{type!over-aligned}{basic.align} have no special representation, but their range of valid values is restricted by the extended alignment requirement. \end{note} @@ -5702,7 +5698,6 @@ \pnum Every integer type has an \term{integer conversion rank} defined as follows: - \begin{itemize} \item No two signed integer types other than \keyword{char} and \tcode{\keyword{signed} \keyword{char}} (if \keyword{char} is signed) have the same rank, even if they have @@ -5820,8 +5815,8 @@ \indextext{program execution|(} \pnum -An instance of each object with automatic storage -duration\iref{basic.stc.auto} is associated with each entry into its +An instance of each object with \link{automatic storage +duration}{basic.stc.auto} is associated with each entry into its block. Such an object exists and retains its last-stored value during the execution of the block and while the block is suspended (by a call of a function, suspension of a coroutine\iref{expr.await}, or receipt of a signal). @@ -5866,7 +5861,7 @@ the initialization of the entities captured by copy and the constituent expressions of the \grammarterm{initializer} of the \grammarterm{init-capture}{s}, \item -if $E$ is a function call\iref{expr.call} or implicitly invokes a function, +if $E$ is a \link{function call}{expr.call} or implicitly invokes a function, the constituent expressions of each default argument\iref{dcl.fct.default} used in the call, or \item @@ -5897,7 +5892,7 @@ A \defn{full-expression} is \begin{itemize} \item -an unevaluated operand\iref{expr.context}, +an \deflink{unevaluated operand}{expr.context}, \item a \grammarterm{constant-expression}\iref{expr.const}, \item @@ -6278,7 +6273,6 @@ \item for some evaluation $X$, $A$ is dependency-ordered before $X$ and $X$ carries a dependency to $B$. - \end{itemize} \begin{note} The relation ``is dependency-ordered before'' is analogous to diff --git a/source/classes.tex b/source/classes.tex index d5d733168e..137c699dfe 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -187,10 +187,10 @@ \item has no non-static data members of type non-standard-layout class (or array of such types) or reference, -\item has no virtual functions\iref{class.virtual} and no -virtual base classes\iref{class.mi}, +\item has no \link{virtual functions}{class.virtual} and no +\link{virtual base classes}{class.mi}, -\item has the same access control\iref{class.access} +\item has the same \link{access control}{class.access} for all non-static data members, \item has no non-standard-layout base classes, @@ -566,7 +566,7 @@ \end{itemize} For any other \grammarterm{member-declaration}, each declared entity -that is not an unnamed bit-field\iref{class.bit} +that is not an \deflinkx{unnamed bit-field}{bit-field!unnamed}{class.bit} is a member of the class, and each such \grammarterm{member-declaration} shall either @@ -581,7 +581,7 @@ enumerations\iref{dcl.enum} declared in the class and arbitrary types declared as members by use of a typedef declaration\iref{dcl.typedef} or \grammarterm{alias-declaration}. -The enumerators of an unscoped enumeration\iref{dcl.enum} defined in the class +The enumerators of an \link{unscoped enumeration}{dcl.enum} defined in the class are members of the class. \pnum @@ -596,7 +596,7 @@ \defnadj{non-static}{member function}\iref{class.mfct.non.static}, respectively). \begin{note} A non-static data member of non-reference -type is a member subobject of a class object\iref{intro.object}. +type is a \deflink{member subobject}{intro.object} of a class object. \end{note} \pnum @@ -715,9 +715,9 @@ The \grammarterm{member-declarator-list} can be omitted only after a \grammarterm{class-specifier} or an \grammarterm{enum-specifier} or in a -friend declaration\iref{class.friend}. A +\link{friend declaration}{class.friend}. A \grammarterm{pure-specifier} shall be used only in the declaration of a -virtual function\iref{class.virtual} +\link{virtual function}{class.virtual} that is not a friend declaration. \pnum @@ -820,7 +820,7 @@ \pnum In addition, if class \tcode{T} has a user-declared -constructor\iref{class.ctor}, every non-static data member of class +\link{constructor}{class.ctor}, every non-static data member of class \tcode{T} shall have a name different from \tcode{T}. \pnum @@ -870,7 +870,7 @@ types\iref{term.layout.compatible.type}. \pnum -In a standard-layout union with an active member\iref{class.union} +In a standard-layout union with an \deflinkx{active member}{active!union member}{class.union} of struct type \tcode{T1}, it is permitted to read a non-static data member \tcode{m} of another union member of struct type \tcode{T2} provided \tcode{m} is part of the common initial sequence of \tcode{T1} and \tcode{T2}; @@ -1565,7 +1565,6 @@ that is of class type (or array thereof), the constructor selected to copy/move that member is trivial; \end{itemize} - \indextext{constructor!move!non-trivial}% otherwise the copy/move constructor is \defnx{non-trivial}{constructor!copy!nontrivial}. @@ -2144,7 +2143,7 @@ An array of class type contains several subobjects for each of which the destructor is invoked. \end{note} -A destructor can also be invoked explicitly. A destructor is \term{potentially invoked} +A destructor can also be invoked explicitly. A destructor is \defn{potentially invoked} if it is invoked or as specified in~\ref{expr.new}, \ref{stmt.return}, \ref{dcl.init.aggr}, \ref{class.base.init}, and~\ref{except.throw}. @@ -3182,7 +3181,6 @@ destructor and \tcode{N} has a non-trivial constructor (for instance, if they declare or inherit virtual functions), the active member of \tcode{u} can be safely switched from \tcode{m} to \tcode{n} using the destructor and placement \grammarterm{new-expression} as follows: - \begin{codeblock} u.m.~M(); new (&u.n) N; @@ -3360,7 +3358,6 @@ \indextext{multiple inheritance}% A list of base classes can be specified in a class definition using the notation: - \begin{bnf} \nontermdef{base-clause}\br \terminal{:} base-specifier-list @@ -5319,7 +5316,6 @@ non-static data members can be specified by a \grammarterm{ctor-initializer}, which has the form - \begin{bnf} \nontermdef{ctor-initializer}\br \terminal{:} mem-initializer-list @@ -5781,7 +5777,6 @@ X(const Mixins&... mixins) : Mixins(mixins)... { } }; \end{codeblock} - \end{example} \rSec2[class.inhctor.init]{Initialization by inherited constructor}% @@ -6223,7 +6218,7 @@ the copy/move operation can be omitted by constructing the object directly into the exception object -\item in a coroutine\iref{dcl.fct.def.coroutine}, a copy of a coroutine parameter +\item in a \link{coroutine}{dcl.fct.def.coroutine}, a copy of a coroutine parameter can be omitted and references to that copy replaced with references to the corresponding parameter if the meaning of the program will be unchanged except for the execution of a constructor and destructor for the parameter copy object @@ -6431,7 +6426,6 @@ A binary operator expression \tcode{a @ b} is \defnx{usable}{usable!binary operator expression} if either - \begin{itemize} \item \tcode{a} or \tcode{b} is of class or enumeration type and @@ -6552,7 +6546,6 @@ of type \tcode{R}\iref{cmp.categories} of glvalues \tcode{a} and \tcode{b} of the same type is defined as follows: - \begin{itemize} \item If \tcode{a <=> b} is usable\iref{class.compare.default} and @@ -6651,7 +6644,6 @@ of a possibly-empty list of $n$ comparison category types $\tcode{T}_0$, $\tcode{T}_1$, $\dotsc$, $\tcode{T}_{n-1}$ is defined as follows: - \begin{itemize} \item If at least one $\tcode{T}_i$ is \tcode{std::partial_ordering}, diff --git a/source/compatibility.tex b/source/compatibility.tex index 93baac8554..386a7fcb80 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -1847,8 +1847,8 @@ A conditional expression with a throw expression as its second or third operand keeps the type and value category of the other operand. \rationale -Formerly mandated conversions (lvalue-to-rvalue\iref{conv.lval}, -array-to-pointer\iref{conv.array}, and function-to-pointer\iref{conv.func} +Formerly mandated conversions (\link{lvalue-to-rvalue}{conv.lval}, +\link{array-to-pointer}{conv.array}, and \link{function-to-pointer}{conv.func} standard conversions), especially the creation of the temporary due to lvalue-to-rvalue conversion, were considered gratuitous and surprising. \effect @@ -2449,7 +2449,6 @@ \effect The signatures of the following member functions changed from taking an \tcode{iterator} to taking a \tcode{const_iterator}: - \begin{itemize} \item \tcode{insert(iter, val)} for \tcode{vector}, \tcode{deque}, \tcode{list}, \tcode{set}, \tcode{multiset}, \tcode{map}, \tcode{multimap} @@ -2521,7 +2520,6 @@ Valid \CppIII{} code that relies on implicit boolean conversions will fail to compile with this revision of \Cpp{}. Such conversions occur in the following conditions: - \begin{itemize} \item passing a value to a function that takes an argument of type \tcode{bool}; \item using \tcode{operator==} to compare to \tcode{false} or \tcode{true}; @@ -3602,7 +3600,6 @@ \pnum Header \libheaderref{cstring}: The following functions have different declarations: - \begin{itemize} \item \tcode{strchr} \item \tcode{strpbrk} @@ -3616,7 +3613,6 @@ \pnum Header \libheaderref{cwchar}: The following functions have different declarations: - \begin{itemize} \item \tcode{wcschr} \item \tcode{wcspbrk} @@ -3641,7 +3637,6 @@ \pnum Header \libheaderref{cstdlib}: The following functions have different behavior: - \begin{itemize} \item \tcode{atexit} \item \tcode{exit} diff --git a/source/concepts.tex b/source/concepts.tex index 4d848e8fd6..b166e3a9bf 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -150,7 +150,6 @@ The following type \tcode{T} meets the explicitly stated syntactic requirements of concept \tcode{C} above but does not meet the additional implicit requirements: - \begin{codeblock} struct T { bool operator==(const T&) const { return true; } @@ -300,7 +299,7 @@ \begin{itemdecl} template - concept @\defexposconcept{same-as-impl}@ = is_same_v; // \expos + concept @\defexposconcept{same-as-impl}@ = @\libglobalref{is_same_v}@; // \expos template concept @\deflibconcept{same_as}@ = @\exposconcept{same-as-impl}@ && @\exposconcept{same-as-impl}@; @@ -365,7 +364,6 @@ such that \tcode{f()} is equality-preserving. Types \tcode{From} and \tcode{To} model \tcode{\libconcept{convertible_to}} only if: - \begin{itemize} \item \tcode{To} is not an object or reference-to-object type, or @@ -373,7 +371,6 @@ \item \tcode{FromR} is not a reference-to-object type, or - \begin{itemize} \item If \tcode{FromR} is an rvalue reference to a non const-qualified type, the @@ -486,16 +483,15 @@ Users can customize the behavior of \libconcept{common_with} by specializing the \tcode{common_type} class template\iref{meta.trans.other}. \end{note} - \end{itemdescr} \rSec2[concepts.arithmetic]{Arithmetic concepts} \begin{itemdecl} template - concept @\deflibconcept{integral}@ = is_integral_v; + concept @\deflibconcept{integral}@ = @\libglobalref{is_integral_v}@; template - concept @\deflibconcept{signed_integral}@ = @\libconcept{integral}@ && is_signed_v; + concept @\deflibconcept{signed_integral}@ = @\libconcept{integral}@ && @\libglobalref{is_signed_v}@; template concept @\deflibconcept{unsigned_integral}@ = @\libconcept{integral}@ && !@\libconcept{signed_integral}@; template @@ -540,12 +536,10 @@ \end{itemize} \tcode{LHS} and \tcode{RHS} model \tcode{\libconcept{assignable_from}} only if - \begin{itemize} \item \tcode{addressof(lhs = rhs) == addressof(lcopy)}. \item After evaluating \tcode{lhs = rhs}: - \begin{itemize} \item \tcode{lhs} is equal to \tcode{rcopy}, unless \tcode{rhs} is a non-const xvalue that refers to \tcode{lcopy}. @@ -600,7 +594,6 @@ \tcode{ranges::swap(E1, E2)} for subexpressions \tcode{E1} and \tcode{E2} is expression-equivalent to an expression \tcode{S} determined as follows: - \begin{itemize} \item \tcode{S} is \tcode{(void)swap(E1, E2)} @@ -748,13 +741,13 @@ \begin{itemdecl} template - concept @\deflibconcept{destructible}@ = is_nothrow_destructible_v; + concept @\deflibconcept{destructible}@ = @\libglobalref{is_nothrow_destructible_v}@; \end{itemdecl} \begin{itemdescr} \pnum \begin{note} -Unlike the \oldconcept{Destructible} requirements~(\tref{cpp17.destructible}), this +Unlike the \oldconceptref{Destructible} requirements~(\tref{cpp17.destructible}), this concept forbids destructors that are potentially throwing, even if a particular invocation of the destructor does not actually throw. \end{note} @@ -768,7 +761,7 @@ \begin{itemdecl} template - concept @\deflibconcept{constructible_from}@ = @\libconcept{destructible}@ && is_constructible_v; + concept @\deflibconcept{constructible_from}@ = @\libconcept{destructible}@ && @\libglobalref{is_constructible_v}@; \end{itemdecl} \rSec2[concept.default.init]{Concept \cname{default_initializable}} @@ -808,7 +801,6 @@ 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{move_constructible} only if - \begin{itemize} \item After the definition \tcode{T u = rv;}, \tcode{u} is equal to \tcode{u2}. @@ -835,7 +827,6 @@ If \tcode{T} is an object type, then let \tcode{v} be an lvalue of type \tcode{T} or \tcode{\keyword{const} T} or an rvalue of type \tcode{\keyword{const} T}. \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}\iref{concepts.equality} and @@ -843,7 +834,6 @@ \item \tcode{T(v)} is equal to \tcode{v} and does not modify \tcode{v}. \end{itemize} - \end{itemdescr} \rSec1[concepts.compare]{Comparison concepts} @@ -882,7 +872,6 @@ Let \tcode{e} be an expression such that \tcode{decltype((e))} is \tcode{T}. \tcode{T} models \exposconcept{boolean-testable-impl} only if - \begin{itemize} \item either \tcode{remove_cvref_t} is not a class type, or @@ -900,7 +889,6 @@ \pnum A \defnadj{disqualifying}{parameter} is a function parameter whose declared type \tcode{P} - \begin{itemize} \item is not dependent on a template parameter, and @@ -948,7 +936,6 @@ \pnum A \defnadj{disqualifying}{declaration} is - \begin{itemize} \item a (non-template) function declaration that @@ -1131,7 +1118,6 @@ Given a type \tcode{T}, let \tcode{a}, \tcode{b}, and \tcode{c} be lvalues of type \tcode{const remove_reference_t}. \tcode{T} models \libconcept{totally_ordered} only if - \begin{itemize} \item Exactly one of \tcode{bool(a < b)}, \tcode{bool(a > b)}, or \tcode{bool(a == b)} is \tcode{true}. @@ -1140,7 +1126,6 @@ \item \tcode{bool(a <= b) == !bool(b < a)}. \item \tcode{bool(a >= b) == !bool(a < b)}. \end{itemize} - \end{itemdescr} \begin{itemdecl} @@ -1339,7 +1324,6 @@ and \tcode{equiv} both be transitive relations: - \begin{itemize} \item \tcode{comp(a, b) \&\& comp(b, c)} diff --git a/source/containers.tex b/source/containers.tex index 09d642b600..8136d9bdef 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -648,7 +648,6 @@ \ref{vector.modifiers}) all container types defined in this Clause meet the following additional requirements: - \begin{itemize} \item If an exception is thrown by an @@ -711,7 +710,6 @@ Likewise, the extent to which an implementation determines that a type cannot be an allocator is unspecified, except that as a minimum a type \tcode{A} shall not qualify as an allocator unless it meets both of the following conditions: - \begin{itemize} \item The \grammarterm{qualified-id} \tcode{A::value_type} is valid and denotes a type\iref{temp.deduct}. @@ -940,7 +938,6 @@ the terms below are defined as if \tcode{A} were \tcode{allocator} --- no allocator object needs to be created and user specializations of \tcode{allocator} are not instantiated: - \begin{itemize} \item \tcode{T} is \defnx{\oldconcept{DefaultInsertable} into \tcode{X}} @@ -2376,8 +2373,7 @@ Assigns \tcode{nh.ptr_} to \tcode{ptr_}. \item If \tcode{!alloc\textunderscore} or \tcode{ator_traits::propagate_on_container_move_assignment::value} -is \tcode{true}, \linebreak -move assigns \tcode{nh.alloc_} to \tcode{alloc_}. +is \tcode{true}, move assigns \tcode{nh.alloc_} to \tcode{alloc_}. \item Assigns \keyword{nullptr} to \tcode{nh.ptr_} and assigns \tcode{nullopt} to @@ -3966,14 +3962,12 @@ to \tcode{j} is positive, the following condition holds: - \begin{codeblock} value_comp(*j, *i) == false \end{codeblock} \pnum For associative containers with unique keys the stronger condition holds: - \begin{codeblock} value_comp(*i, *j) != false \end{codeblock} @@ -5994,7 +5988,6 @@ \pnum The following exposition-only alias template may appear in deduction guides for sequence containers: - \begin{codeblock} template using @\placeholdernc{iter-value-type}@ = typename iterator_traits::value_type; // \expos @@ -6055,14 +6048,14 @@ \indextext{\idxcode{array}!contiguous storage}% The header \libheader{array} defines a class template for storing fixed-size sequences of objects. -An \tcode{array} is a contiguous container\iref{container.reqmts}. +An \tcode{array} is a \deflinkx{contiguous container}{container!contiguous}{container.reqmts}. An instance of \tcode{array} stores \tcode{N} elements of type \tcode{T}, so that \tcode{size() == N} is an invariant. \pnum \indextext{\idxcode{array}!initialization}% \indextext{\idxcode{array}!as aggregate}% -An \tcode{array} is an aggregate\iref{dcl.init.aggr} that can be +An \tcode{array} is an \deflink{aggregate}{dcl.init.aggr} that can be list-initialized with up to \tcode{N} elements whose types are convertible to \tcode{T}. @@ -6073,8 +6066,8 @@ of a reversible container\iref{container.rev.reqmts}, except that a default constructed \tcode{array} object is not empty if $\tcode{N} > 0$. -An \tcode{array} meets some of the requirements of a sequence -container\iref{sequence.reqmts}. +An \tcode{array} meets some of the requirements of a +\link{sequence container}{sequence.reqmts}. Descriptions are provided here only for operations on \tcode{array} that are not described in one of these tables and @@ -6084,13 +6077,13 @@ \tcode{array} is a structural type\iref{term.structural.type} if \tcode{T} is a structural type. Two values \tcode{a1} and \tcode{a2} of type \tcode{array} -are template-argument-equivalent\iref{temp.type} if and only if +are \deflink{template-argument-equivalent}{temp.type} if and only if each pair of corresponding elements in \tcode{a1} and \tcode{a2} are template-argument-equivalent. \pnum The types \tcode{iterator} and \tcode{const_iterator} meet -the constexpr iterator requirements\iref{iterator.requirements.general}. +the \deflinkx{constexpr iterator}{iterator!constexpr}{iterator.requirements.general} requirements. \indexlibraryglobal{array}% \indexlibrarymember{array}{begin}% @@ -6413,7 +6406,7 @@ A \indexlibraryglobal{deque}% \tcode{deque} -is a sequence container that supports random access iterators\iref{random.access.iterators}. +is a sequence container that supports \link{random access iterators}{random.access.iterators}. In addition, it supports constant time insert and erase operations at the beginning or the end; insert and erase in the middle take linear time. That is, a deque is especially optimized for pushing and popping elements at the beginning and end. @@ -7064,7 +7057,7 @@ \pnum An incomplete type \tcode{T} may be used when instantiating \tcode{forward_list} if the allocator meets the -allocator completeness requirements\iref{allocator.requirements.completeness}. +\link{allocator completeness requirements}{allocator.requirements.completeness}. \tcode{T} shall be complete before any member of the resulting specialization of \tcode{forward_list} is referenced. @@ -7395,14 +7388,14 @@ \pnum \expects \tcode{T} is \oldconcept{EmplaceConstructible} into \tcode{forward_list} -from \tcode{std::forward(\linebreak args)...}. +from \tcode{std::forward(args)...}. \tcode{position} is \tcode{before_begin()} or is a dereferenceable iterator in the range \range{begin()}{end()}. \pnum \effects Inserts an object of type \tcode{value_type} direct-non-list-initialized with -\tcode{std::forward(\linebreak args)...} after \tcode{position}. +\tcode{std::forward(args)...} after \tcode{position}. \pnum \returns @@ -7644,7 +7637,7 @@ \pnum \remarks -Stable\iref{algorithm.stable}. +\link{Stable}{algorithm.stable}. \end{itemdescr} \indexlibrarymember{unique}{forward_list}% @@ -7749,7 +7742,7 @@ \pnum \remarks -Stable\iref{algorithm.stable}. +\link{Stable}{algorithm.stable}. \end{itemdescr} \indexlibrarymember{reverse}{forward_list}% @@ -7843,7 +7836,7 @@ is a sequence container that supports bidirectional iterators and allows constant time insert and erase operations anywhere within the sequence, with storage management handled -automatically. Unlike vectors\iref{vector} and deques\iref{deque}, +automatically. Unlike \link{vectors}{vector} and \link{deques}{deque}, fast random access to list elements is not supported, but many algorithms only need sequential access anyway. @@ -8012,7 +8005,7 @@ \pnum An incomplete type \tcode{T} may be used when instantiating \tcode{list} if the allocator meets the -allocator completeness requirements\iref{allocator.requirements.completeness}. +\link{allocator completeness requirements}{allocator.requirements.completeness}. \tcode{T} shall be complete before any member of the resulting specialization of \tcode{list} is referenced. @@ -8134,7 +8127,6 @@ appends \tcode{sz - size()} default-inserted elements to the sequence. If \tcode{sz <= size()}, equivalent to: - \begin{codeblock} list::iterator it = begin(); advance(it, sz); @@ -8426,7 +8418,7 @@ \pnum \remarks -Stable\iref{algorithm.stable}. +\link{Stable}{algorithm.stable}. \end{itemdescr} \indexlibrarymember{unique}{list}% @@ -8550,7 +8542,7 @@ \pnum \remarks -Stable\iref{algorithm.stable}. +\link{Stable}{algorithm.stable}. \end{itemdescr} \rSec3[list.erasure]{Erasure} @@ -8655,7 +8647,7 @@ of a sequence container, including most of the optional sequence container requirements\iref{sequence.reqmts}, and, for an element type other than \tcode{bool}, -of a contiguous container\iref{container.reqmts}. +of a \deflinkx{contiguous container}{container!contiguous}{container.reqmts}. The exceptions are the \tcode{push_front}, \tcode{prepend_range}, \tcode{pop_front}, and \tcode{emplace_front} member functions, which are not provided. Descriptions are provided here only for operations on \tcode{vector} @@ -8793,7 +8785,7 @@ \pnum An incomplete type \tcode{T} may be used when instantiating \tcode{vector} if the allocator meets the -allocator completeness requirements\iref{allocator.requirements.completeness}. +\link{allocator completeness requirements}{allocator.requirements.completeness}. \tcode{T} shall be complete before any member of the resulting specialization of \tcode{vector} is referenced. @@ -9363,7 +9355,7 @@ semantics as the primary \tcode{vector} template, except that operations dealing with the \tcode{bool} value type map to bit values in the container storage and -\tcode{allocator_traits::construct}\iref{allocator.traits.members} +\libmemberrefx{allocator_traits::construct}{allocator_traits}{construct} is not used to construct these values. \pnum @@ -9399,13 +9391,11 @@ \pnum \effects Exchanges the contents of \tcode{x} and \tcode{y} as if by: - \begin{codeblock} bool b = x; x = y; y = b; \end{codeblock} - \end{itemdescr} \begin{itemdecl} @@ -9427,7 +9417,7 @@ \pnum The expression \tcode{\exposid{is-vector-bool-reference}} is \tcode{true} -if \tcode{T} denotes the type \tcode{vector::\linebreak{}reference} +if \tcode{T} denotes the type \tcode{vector::reference} for some type \tcode{Alloc} and \tcode{vector} is not a program-defined specialization. \end{itemdescr} @@ -10723,7 +10713,7 @@ \pnum \expects \tcode{value_type} is \oldconcept{EmplaceConstructible} into \tcode{map} -from \tcode{piecewise_construct}, \tcode{for\-ward_as_tuple(k)}, +from \tcode{piecewise_construct}, \tcode{forward_as_tuple(k)}, \tcode{forward_as_tuple(std::forward(args)...)}. \pnum @@ -10761,7 +10751,7 @@ \pnum \expects \tcode{value_type} is \oldconcept{EmplaceConstructible} into \tcode{map} -from \tcode{piecewise_construct}, \tcode{for\-ward_as_tuple(std::move(k))}, +from \tcode{piecewise_construct}, \tcode{forward_as_tuple(std::move(k))}, \tcode{forward_as_tuple(std::forward(args)...)}. \pnum @@ -10818,7 +10808,7 @@ Otherwise, let \tcode{r} be \tcode{equal_range(k)}. Constructs an object \tcode{u} of type \tcode{value_type} with \tcode{piecewise_construct, forward_as_tuple(std::forward(k)), -forward_as_tuple(std::forward(args)...)}.\linebreak +forward_as_tuple(std::forward(args)...)}. If \tcode{equal_range(u.first) == r} is \tcode{false}, the behavior is undefined. Inserts \tcode{u} into \tcode{*this}. @@ -10858,7 +10848,7 @@ \effects If the map already contains an element \tcode{e} whose key is equivalent to \tcode{k}, -assigns \tcode{std::for\-ward(obj)} to \tcode{e.second}. +assigns \tcode{std::forward(obj)} to \tcode{e.second}. Otherwise inserts an object of type \tcode{value_type} constructed with \tcode{k}, \tcode{std::forward(obj)}. @@ -10892,13 +10882,13 @@ \pnum \expects \tcode{value_type} is \oldconcept{EmplaceConstructible} into \tcode{map} -from \tcode{std::move(k)}, \tcode{std::for\-ward(obj)}. +from \tcode{std::move(k)}, \tcode{std::forward(obj)}. \pnum \effects If the map already contains an element \tcode{e} whose key is equivalent to \tcode{k}, -assigns \tcode{std::for\-ward(obj)} to \tcode{e.second}. +assigns \tcode{std::forward(obj)} to \tcode{e.second}. Otherwise inserts an object of type \tcode{value_type} constructed with \tcode{std::\brk{}move(k)}, \tcode{std::forward(obj)}. @@ -12832,13 +12822,13 @@ \pnum \expects \tcode{value_type} is \oldconcept{EmplaceConstructible} into \tcode{unordered_map} -from \tcode{k}, \tcode{std::for\-ward(obj)}. +from \tcode{k}, \tcode{std::forward(obj)}. \pnum \effects If the map already contains an element \tcode{e} whose key is equivalent to \tcode{k}, -assigns \tcode{std::for\-ward(obj)} to \tcode{e.second}. +assigns \tcode{std::forward(obj)} to \tcode{e.second}. Otherwise inserts an object of type \tcode{value_type} constructed with \tcode{k}, \tcode{std::forward(obj)}. @@ -12878,7 +12868,7 @@ \effects If the map already contains an element \tcode{e} whose key is equivalent to \tcode{k}, -assigns \tcode{std::for\-ward(obj)} to \tcode{e.second}. +assigns \tcode{std::forward(obj)} to \tcode{e.second}. Otherwise inserts an object of type \tcode{value_type} constructed with \tcode{std::\brk{}move(k)}, \tcode{std::forward(obj)}. @@ -14427,9 +14417,9 @@ can be used to instantiate \tcode{queue}. In particular, -\tcode{list}\iref{list} +\link{\tcode{list}}{list} and -\tcode{deque}\iref{deque} +\link{\tcode{deque}}{deque} can be used. \begin{codeblock} @@ -14784,15 +14774,15 @@ can be used to instantiate \tcode{priority_queue}. In particular, -\tcode{vector}\iref{vector} +\link{\tcode{vector}}{vector} and -\tcode{deque}\iref{deque} +\link{\tcode{deque}}{deque} can be used. Instantiating \tcode{priority_queue} also involves supplying a function or function object for making priority comparisons; the library assumes that the function or function -object defines a strict weak ordering\iref{alg.sorting}. +object defines a \link{strict weak ordering}{alg.sorting}. \begin{codeblock} namespace std { @@ -15331,10 +15321,10 @@ can be used to instantiate \tcode{stack}. In particular, -\tcode{vector}\iref{vector}, -\tcode{list}\iref{list} +\link{\tcode{vector}}{vector}, +\link{\tcode{list}}{list} and -\tcode{deque}\iref{deque} +\link{\tcode{deque}}{deque} can be used. \rSec3[stack.defn]{Definition} @@ -16275,7 +16265,7 @@ \pnum \effects Equivalent to \tcode{flat_map(s, key_cont, mapped_cont)} and -\tcode{flat_map(s, key_cont, \linebreak{}mapped_cont, comp)}, respectively, +\tcode{flat_map(s, key_cont, mapped_cont, comp)}, respectively, except that \tcode{c.keys} and \tcode{c.values} are constructed with uses-allocator construction\iref{allocator.uses.construction}. @@ -16458,7 +16448,7 @@ \pnum \effects Initializes an object \tcode{t} of type \tcode{pair} -with \tcode{std::forward(\linebreak args)...}; +with \tcode{std::forward(args)...}; if the map already contains an element whose key is equivalent to \tcode{t.first}, \tcode{*this} is unchanged. @@ -16735,7 +16725,7 @@ \effects If the map already contains an element \tcode{e} whose key is equivalent to \tcode{k}, -assigns \tcode{std::forward<\linebreak M>(obj)} to \tcode{e.second}. +assigns \tcode{std::forward(obj)} to \tcode{e.second}. Otherwise, equivalent to \begin{codeblock} try_emplace(std::forward(k), std::forward(obj)) @@ -16790,7 +16780,7 @@ \effects If the map already contains an element \tcode{e} whose key is equivalent to \tcode{k}, -assigns \tcode{std::forward<\linebreak M>(obj)} to \tcode{e.second}. +assigns \tcode{std::forward(obj)} to \tcode{e.second}. Otherwise, equivalent to \begin{codeblock} try_emplace(std::forward(k), std::forward(obj)) @@ -17395,14 +17385,14 @@ \pnum \effects Equivalent to \tcode{flat_multimap(key_cont, mapped_cont)} and -\tcode{flat_multimap(key_cont, \linebreak{}mapped_cont, comp)}, respectively, +\tcode{flat_multimap(key_cont, mapped_cont, comp)}, respectively, except that \tcode{c.keys} and \tcode{c.values} are constructed with uses-allocator construction\iref{allocator.uses.construction}. \pnum \complexity Same as \tcode{flat_multimap(key_cont, mapped_cont)} and -\tcode{flat_multimap(key_cont, \linebreak{}mapped_cont, comp)}, respectively. +\tcode{flat_multimap(key_cont, mapped_cont, comp)}, respectively. \end{itemdescr} \indexlibraryctor{flat_multimap}% @@ -18838,7 +18828,6 @@ \tcode{stack}, the library provides the following formatter specialization where \tcode{\placeholder{adaptor-type}} is the name of the template: - \indexlibraryglobal{formatter}% \begin{codeblock} namespace std { @@ -21925,7 +21914,7 @@ \item If \exposid{rank_} is greater than one, then the product of -\tcode{\exposid{LEAST-MULTIPLE-AT-LEAST}(pad, ext.extent(\linebreak 0))} and +\tcode{\exposid{LEAST-MULTIPLE-AT-LEAST}(pad, ext.extent(0))} and all values \tcode{ext.extent($k$)} with $k$ in the range of \range{1}{\exposid{rank_}} is representable as a value of type \tcode{index_type}. @@ -22004,7 +21993,7 @@ \item If \exposid{rank_} is greater than \tcode{1} and \tcode{padding_value} does not equal \tcode{dynamic_extent}, -then \tcode{other.\linebreak stride(1)} equals +then \tcode{other.stride(1)} equals \begin{codeblock} @\exposid{LEAST-MULTIPLE-AT-LEAST}@(padding_value, extents_type::@\exposid{index-cast}@(other.extents().extent(0))) @@ -22071,7 +22060,7 @@ \item If \exposid{rank_} is greater than 1 and \tcode{padding_value} does not equal \tcode{dynamic_extent}, -then \tcode{other.\linebreak stride(1)} equals +then \tcode{other.stride(1)} equals \begin{codeblock} @\exposid{LEAST-MULTIPLE-AT-LEAST}@(padding_value, extents_type::@\exposid{index-cast}@(other.extent(0))) @@ -22469,7 +22458,7 @@ if \exposid{static-padding-stride} is not \tcode{dynamic_extent}. \begin{note} Using \tcode{extents} -instead of \tcode{index_type} as the type of \exposid{stride-\linebreak rm2} +instead of \tcode{index_type} as the type of \exposid{stride-rm2} would achieve this. \end{note} \end{itemdescr} @@ -22552,13 +22541,13 @@ \item If \exposid{rank_} is greater than one, then the product of -\tcode{\exposid{LEAST-MULTIPLE-AT-LEAST}(pad, ext.extent(\exposid{\linebreak rank_} - 1))} and +\tcode{\exposid{LEAST-MULTIPLE-AT-LEAST}(pad, ext.extent(\exposid{rank_} - 1))} and all values \tcode{ext.extent($k$)} with $k$ in the range of \range{0}{\exposid{rank_} - 1} is representable as a value of type \tcode{index_type}. \item If \tcode{padding_value} is not equal to \tcode{dynamic_extent}, -\tcode{padding_value} equals \tcode{extents_type::\linebreak \exposid{index-cast}(pad)}. +\tcode{padding_value} equals \tcode{extents_type::\exposid{index-cast}(pad)}. \end{itemize} \pnum @@ -22631,7 +22620,7 @@ \item If \exposid{rank_} is greater than 1 and \tcode{padding_value} does not equal \tcode{dynamic_extent}, -then \tcode{other.\linebreak stride(\exposid{rank_} - 2)} equals +then \tcode{other.stride(\exposid{rank_} - 2)} equals \begin{codeblock} @\exposid{LEAST-MULTIPLE-AT-LEAST}@(padding_value, extents_type::@\exposid{index-cast}@(other.extents().extent(@\exposid{rank_}@ - 1))) @@ -22699,7 +22688,7 @@ \item If \exposid{rank_} is greater than 1 and \tcode{padding_value} does not equal \tcode{dynamic_extent}, -then \tcode{other.\linebreak stride(\exposid{rank_} - 2)} equals +then \tcode{other.stride(\exposid{rank_} - 2)} equals \begin{codeblock} @\exposid{LEAST-MULTIPLE-AT-LEAST}@(padding_value, extents_type::@\exposid{index-cast}@(other.extent(@\exposid{rank_}@ - 1))) @@ -23011,7 +23000,6 @@ \pnum \result A type \tcode{OP} such that: - \begin{itemize} \item \tcode{OP} meets the accessor policy requirements, @@ -23722,7 +23710,6 @@ \pnum For each function defined in \ref{mdspan.sub} that takes a parameter pack named \tcode{slices} as an argument: - \begin{itemize} \item let \tcode{index_type} be \begin{itemize} @@ -23986,7 +23973,6 @@ \pnum Let \tcode{SubExtents} be a specialization of \tcode{extents} such that: - \begin{itemize} \item %FIXME: I think we want the count here, "number" is ambiguous. @@ -23997,7 +23983,6 @@ for each rank index $k$ of \tcode{Extents} such that \tcode{\placeholder{map-rank}[$k$] != dynamic_extent} is \tcode{true}, \tcode{SubExt\-ents::static_extent(\placeholder{map-rank}[$k$])} equals: - \begin{itemize} \item \tcode{Extents::static_extent($k$)} @@ -24037,7 +24022,6 @@ for each $k$ for which \tcode{\placeholder{map-rank}[$k$] != dynamic_extent} is \tcode{true}, \tcode{ext.extent(\placeholder{map-rank}[$k$])} equals: - \begin{itemize} \item \tcode{$s_k$.extent == 0 ? 0 : 1 + (\exposid{de-ice}($s_k$.extent) - 1) / \exposid{de-ice}($s_k$.stride)} @@ -24105,7 +24089,7 @@ \item \tcode{stride(k) * \exposid{de-ice}($s_k$.stride)} if $S_k$ is a specialization of \tcode{strided_slice} and -\tcode{$s_k$.stride < $s_k$.\linebreak extent} is \tcode{true}; +\tcode{$s_k$.stride < $s_k$.extent} is \tcode{true}; \item otherwise, \tcode{stride($k$)}. \end{itemize} @@ -24510,11 +24494,11 @@ \begin{itemize} \item \tcode{decltype(submdspan_mapping(src.mapping(), slices...))} -is a specialization of \tcode{submd-\linebreak{}span_mapping_result}. +is a specialization of \tcode{submdspan_mapping_result}. \item \tcode{is_same_v,} -\tcode{decltype(\linebreak{}submdspan_extents(src.mapping(), slices...))>} +\tcode{decltype(submdspan_extents(src.mapping(), slices...))>} is \tcode{true}. \item @@ -24544,11 +24528,11 @@ \item $0 \le \tcode{\exposid{first_}(slices...)}$ $\le \tcode{\exposid{last_}<$k$>(src.extents(), slices...)}$ - $\le \tcode{\linebreak{}src.extent($k$)}$ + $\le \tcode{src.extent($k$)}$ \end{itemize} \item -\tcode{sub_map_offset.mapping.extents() == submdspan_extents(src.mapping(), slices...)}\linebreak +\tcode{sub_map_offset.mapping.extents() == submdspan_extents(src.mapping(), slices...)} is \tcode{true}; and \item diff --git a/source/declarations.tex b/source/declarations.tex index 446aebd3aa..c7060268f1 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -508,7 +508,7 @@ \begin{note} A variable declared without a \grammarterm{storage-class-specifier} at block scope or declared as a function parameter -has automatic storage duration by default\iref{basic.stc.auto}. +has \deflinkx{automatic storage duration}{storage duration!automatic}{basic.stc.auto} by default. \end{note} \pnum @@ -778,10 +778,10 @@ A \grammarterm{simple-template-id} that names a class template specialization is a \grammarterm{class-name}\iref{class.name}. If a \grammarterm{typedef-name} is used to identify the subject of an -\grammarterm{elaborated-type-specifier}\iref{dcl.type.elab}, a class -definition\iref{class}, a constructor -declaration\iref{class.ctor}, or a destructor -declaration\iref{class.dtor}, the program is ill-formed. +\grammarterm{elaborated-type-specifier}\iref{dcl.type.elab}, a \link{class +definition}{class}, a \link{constructor +declaration}{class.ctor}, or a \link{destructor +declaration}{class.dtor}, the program is ill-formed. \end{note} \begin{example} \begin{codeblock} @@ -1108,7 +1108,7 @@ is declared in a definition domain, it shall be defined in that domain. \begin{note} -A constexpr function\iref{dcl.constexpr} is implicitly inline. +A \deflinkx{constexpr function}{specifier!\idxcode{constexpr}!function}{dcl.constexpr} is implicitly inline. In the global module, a function defined within a class definition is implicitly inline\iref{class.mfct,class.friend}. \end{note} @@ -1253,7 +1253,7 @@ some other access path. \begin{note} Cv-qualifiers are supported by the type system so that they cannot be -subverted without casting\iref{expr.const.cast}. +subverted without \link{casting}{expr.const.cast}. \end{note} \pnum @@ -1538,7 +1538,6 @@ an explicit instantiation\iref{temp.explicit}, or it has one of the following forms: - \begin{ncsimplebnf} class-key \opt{attribute-specifier-seq} identifier \terminal{;}\br class-key \opt{attribute-specifier-seq} simple-template-id \terminal{;} @@ -1674,8 +1673,7 @@ \item otherwise, \tcode{decltype($E$)} is the type of $E$. \end{itemize} -The operand of the \keyword{decltype} specifier is an unevaluated -operand\iref{term.unevaluated.operand}. +The operand of the \keyword{decltype} specifier is an \deflink{unevaluated operand}{expr.context}. \begin{example} \begin{codeblock} @@ -1869,7 +1867,7 @@ If the \grammarterm{init-declarator-list} contains more than one \grammarterm{init-declarator}, they shall all form declarations of variables. The type of each declared variable is determined -by placeholder type deduction\iref{dcl.type.auto.deduct}, +by \deflink{placeholder type deduction}{dcl.type.auto.deduct}, and if the type that replaces the placeholder type is not the same in each deduction, the program is ill-formed. @@ -1997,7 +1995,7 @@ be a coroutine\iref{dcl.fct.def.coroutine}. \pnum -An explicit instantiation declaration\iref{temp.explicit} does not cause the +An \link{explicit instantiation declaration}{temp.explicit} does not cause the instantiation of an entity declared using a placeholder type, but it also does not prevent that entity from being instantiated as needed to determine its type. @@ -2109,7 +2107,7 @@ a new invented type template parameter \tcode{U} or, if the initialization is copy-list-initialization, with \tcode{std::initializer_list}. Deduce a value for \tcode{U} using the rules -of template argument deduction from a function call\iref{temp.deduct.call}, +of \link{template argument deduction from a function call}{temp.deduct.call}, where \tcode{P} is a function template parameter type and the corresponding argument is $E$. @@ -2208,7 +2206,7 @@ in the \grammarterm{new-type-id} or \grammarterm{type-id} of a \grammarterm{new-expression}\iref{expr.new}, as the \grammarterm{simple-type-specifier} -in an explicit type conversion (functional notation)\iref{expr.type.conv}, +in an \link{explicit type conversion (functional notation)}{expr.type.conv}, or as the \grammarterm{type-specifier} in the \grammarterm{parameter-declaration} of a \grammarterm{template-parameter}\iref{temp.param}. @@ -2356,7 +2354,6 @@ \pnum Declarators have the syntax - \begin{bnf} \nontermdef{declarator}\br ptr-declarator\br @@ -4248,7 +4245,6 @@ \tcode{g} will be called with the value \tcode{f(2)}: - \begin{codeblock} int a = 1; int f(int); @@ -4343,7 +4339,7 @@ int f(int a, int b = a); // error: parameter \tcode{a} used as default argument typedef int I; int g(float I, int b = I(2)); // error: parameter \tcode{I} found -int h(int a, int b = sizeof(a)); // OK, unevaluated operand\iref{term.unevaluated.operand} +int h(int a, int b = sizeof(a)); // OK, \deflink{unevaluated operand}{expr.context} \end{codeblock} \end{example} A non-static member shall not appear in a default argument unless it appears as @@ -4587,7 +4583,6 @@ an object of type \tcode{T} means: - \begin{itemize} \item If @@ -4786,7 +4781,6 @@ the initialization of the $j^\text{th}$ element. \item Otherwise, if the destination type is a class type: - \begin{itemize} \item If the initializer expression is a prvalue @@ -5698,7 +5692,6 @@ A reference to type ``\cvqual{cv1} \tcode{T1}'' is initialized by an expression of type ``\cvqual{cv2} \tcode{T2}'' as follows:% \indextext{binding!reference} - \begin{itemize} \item If the reference is an lvalue reference and the initializer expression @@ -5720,15 +5713,15 @@ function\iref{class.conv.fct} returning a reference type. \end{footnote} (this conversion is selected by enumerating the applicable conversion -functions\iref{over.match.ref} and choosing the best one through overload -resolution\iref{over.match}), +functions\iref{over.match.ref} and choosing the best one through \link{overload +resolution}{over.match}), \end{itemize} then the reference binds to the initializer expression lvalue in the first case and to the lvalue result of the conversion in the second case (or, in either case, to the appropriate base class subobject of the object). \begin{note} -The usual lvalue-to-rvalue\iref{conv.lval}, array-to-pointer\iref{conv.array}, -and function-to-pointer\iref{conv.func} standard +The usual \link{lvalue-to-rvalue}{conv.lval}, \link{array-to-pointer}{conv.array}, +and \link{function-to-pointer}{conv.func} standard conversions are not needed, and therefore are suppressed, when such direct bindings to lvalues are done. \end{note} @@ -6161,7 +6154,6 @@ int k { }; // initialize to 0 \end{codeblock} \end{example} - \end{itemize} \pnum @@ -7105,7 +7097,7 @@ where \tcode{get} undergoes argument-dependent lookup\iref{basic.lookup.argdep}. In either case, \tcode{get} is interpreted as a \grammarterm{template-id}. \begin{note} -Ordinary unqualified lookup\iref{basic.lookup.unqual} is not performed. +Ordinary \link{unqualified lookup}{basic.lookup.unqual} is not performed. \end{note} In either case, \exposid{e} is an lvalue if the type of the entity \exposid{e} is an lvalue reference and an xvalue otherwise. @@ -7116,7 +7108,6 @@ where $\tcode{U}_i$ is an lvalue reference if the initializer is an lvalue and an rvalue reference otherwise, variables are introduced with unique names $\tcode{r}_i$ as follows: - \begin{ncbnf} \placeholder{S} \terminal{U$_i$ r$_i$ =} initializer \terminal{;} \end{ncbnf} @@ -7248,7 +7239,6 @@ enum E : int {}; // error: redeclaration of enumeration }; \end{codeblock} - \end{example} \end{note} The \grammarterm{identifier} in an \grammarterm{enum-head-name} @@ -7256,7 +7246,7 @@ the \grammarterm{enum-specifier} or \grammarterm{opaque-enum-declaration}. If the \grammarterm{enum-head-name} of an \grammarterm{opaque-enum-declaration} contains a \grammarterm{nested-name-specifier}, -the declaration shall be an explicit specialization\iref{temp.expl.spec}. +the declaration shall be an \link{explicit specialization}{temp.expl.spec}. \pnum \indextext{constant!enumeration}% @@ -7338,18 +7328,19 @@ prior to the closing brace is the underlying type and the \grammarterm{constant-expression} in the \grammarterm{enumerator-definition} -shall be a converted constant expression of the underlying -type\iref{expr.const}. +shall be a +\deflinkx{converted constant expression}{expression!converted constant}{expr.const} +of the underlying type. If the underlying type is not fixed, the type of each enumerator prior to the closing brace is determined as follows: - \begin{itemize} \item If an initializer is specified for an enumerator, the -\grammarterm{constant-expression} shall be an integral constant -expression\iref{expr.const}. If the expression has +\grammarterm{constant-expression} shall be an +\deflinkx{integral constant expression}{expression!integral constant}{expr.const}. +If the expression has unscoped enumeration type, the enumerator has the underlying type of that enumeration type, otherwise it has the same type as the expression. @@ -7421,7 +7412,7 @@ \pnum The value of an enumerator or an object of an unscoped enumeration type is -converted to an integer by integral promotion\iref{conv.prom}. +converted to an integer by \deflinkx{integral promotion}{integral promotion}{conv.prom}. \begin{example} \begin{codeblock} enum color { red, yellow, green=20, blue }; @@ -7700,7 +7691,7 @@ Members of an inline namespace can be used in most respects as though they were members of the innermost enclosing namespace. Specifically, the inline namespace and its enclosing namespace are both added to the set of associated namespaces used in -argument-dependent lookup\iref{basic.lookup.argdep} whenever one of them is, +\link{argument-dependent lookup}{basic.lookup.argdep} whenever one of them is, and a \grammarterm{using-directive}\iref{namespace.udir} that names the inline namespace is implicitly inserted into the enclosing namespace as for an unnamed namespace\iref{namespace.unnamed}. Furthermore, each @@ -7798,7 +7789,6 @@ \pnum A \grammarterm{namespace-alias-definition} declares an alternate name for a namespace according to the following grammar: - \begin{bnf} \nontermdef{namespace-alias}\br identifier @@ -7953,7 +7943,6 @@ In particular, the name of a variable, function or enumerator does not hide the name of a class or enumeration declared in a different namespace. For example, - \begin{codeblock} namespace A { class X { }; @@ -8504,9 +8493,8 @@ otherwise identical. \pnum -Linkage\iref{basic.link} between \Cpp{} and non-\Cpp{} code fragments can +\link{Linkage}{basic.link} between \Cpp{} and non-\Cpp{} code fragments can be achieved using a \grammarterm{linkage-specification}: - \indextext{\idxgram{linkage-specification}}% \indextext{specification!linkage!\idxcode{extern}}% % @@ -8822,16 +8810,16 @@ \pnum In an \grammarterm{attribute-list}, an ellipsis may appear only if that \grammarterm{attribute}'s specification permits it. An \grammarterm{attribute} followed -by an ellipsis is a pack expansion\iref{temp.variadic}. +by an ellipsis is a \deflink{pack expansion}{temp.variadic}. An \grammarterm{attribute-specifier} that contains no \grammarterm{attribute}{s} has no effect. The order in which the \grammarterm{attribute-token}{s} appear in an \grammarterm{attribute-list} is not significant. If a -keyword\iref{lex.key} -or an alternative token\iref{lex.digraph} that satisfies the syntactic requirements +\link{keyword}{lex.key} +or an \link{alternative token}{lex.digraph} that satisfies the syntactic requirements of an \grammarterm{identifier}\iref{lex.name} is contained in -an \grammarterm{attribute-token}, it is considered an identifier. No name -lookup\iref{basic.lookup} is performed on any of the identifiers contained in an +an \grammarterm{attribute-token}, it is considered an identifier. No +\link{name lookup}{basic.lookup} is performed on any of the identifiers contained in an \grammarterm{attribute-token}. The \grammarterm{attribute-token} determines additional requirements on the \grammarterm{attribute-argument-clause} (if any). @@ -8938,7 +8926,7 @@ \pnum An \grammarterm{alignment-specifier} of the form \tcode{alignas(} \grammarterm{type-id} \tcode{)} has the same -effect as \tcode{alignas(\brk{}alignof(} \grammarterm{type-id}~\tcode{))}\iref{expr.alignof}. +effect as \tcode{alignas(\brk{}\link{alignof}{expr.alignof}(} \grammarterm{type-id}~\tcode{))}. \pnum The alignment requirement of an entity is the strictest nonzero alignment @@ -9192,7 +9180,7 @@ \pnum The \grammarterm{attribute-token} \tcode{fallthrough} -may be applied to a null statement\iref{stmt.expr}; +may be applied to a \deflinkx{null statement}{statement!null}{stmt.expr}; \indextext{statement!fallthrough} such a statement is a fallthrough statement. No \grammarterm{attribute-argument-clause} shall be present. @@ -9429,7 +9417,6 @@ to the declaration of a class or enumeration. An \grammarterm{attribute-argument-clause} may be present and, if present, shall have the form: - \begin{ncbnf} \terminal{(} unevaluated-string \terminal{)} \end{ncbnf} diff --git a/source/diagnostics.tex b/source/diagnostics.tex index e421b207f4..be9f913a24 100644 --- a/source/diagnostics.tex +++ b/source/diagnostics.tex @@ -506,13 +506,13 @@ \pnum An expression \tcode{assert(E)} -is a constant subexpression\iref{defns.const.subexpr}, if +is a \link{constant subexpression}{defns.const.subexpr}, if \begin{itemize} \item \tcode{NDEBUG} is defined at the point where \tcode{assert} is last defined or redefined, or \item -\tcode{E} contextually converted to \tcode{bool}\iref{conv} +\tcode{E} \deflinkx{contextually converted to \tcode{bool}}{conversion!contextual to \tcode{bool}}{conv} is a constant subexpression that evaluates to the value \tcode{true}. \end{itemize} @@ -834,9 +834,9 @@ // \ref{syserr}, system error support template - constexpr bool @\libglobal{is_error_code_enum_v}@ = is_error_code_enum::value; + constexpr bool @\libglobal{is_error_code_enum_v}@ = @\libglobalref{is_error_code_enum}@::value; template - constexpr bool is_error_condition_enum_v = is_error_condition_enum::value; + constexpr bool @\libglobal{is_error_condition_enum_v}@ = @\libglobalref{is_error_condition_enum}@::value; } \end{codeblock} @@ -847,9 +847,9 @@ exposes the \libheader{cerrno} macros is unspecified. \pnum -The \tcode{is_error_code_enum} and \tcode{is_error_condition_enum} templates may be +The \libglobalref{is_error_code_enum} and \libglobalref{is_error_condition_enum} templates may be specialized for program-defined types to indicate that such types are eligible -for \tcode{class error_code} and \tcode{class error_condition} implicit +for \tcode{class \libglobalref{error_code}} and \tcode{class \libglobalref{error_condition}} implicit conversions, respectively. \rSec2[syserr.errcat]{Class \tcode{error_category}} @@ -874,8 +874,6 @@ \indexlibraryglobal{error_category}% \indexlibraryctor{error_category}% \indexlibrarydtor{error_category}% -\indexlibraryglobal{generic_category}% -\indexlibraryglobal{system_category}% \begin{codeblock} namespace std { class error_category { @@ -894,8 +892,8 @@ strong_ordering operator<=>(const error_category& rhs) const noexcept; }; - const error_category& generic_category() noexcept; - const error_category& system_category() noexcept; + const error_category& @\libglobal{generic_category}@() noexcept; + const error_category& @\libglobal{system_category}@() noexcept; } \end{codeblock} @@ -1166,7 +1164,7 @@ \begin{itemdescr} \pnum \constraints -\tcode{is_error_code_enum_v} is \tcode{true}. +\tcode{\libglobalref{is_error_code_enum_v}} is \tcode{true}. \pnum \effects @@ -1199,7 +1197,7 @@ \begin{itemdescr} \pnum \constraints -\tcode{is_error_code_enum_v} is \tcode{true}. +\tcode{\libglobalref{is_error_code_enum_v}} is \tcode{true}. \pnum \effects @@ -1602,7 +1600,7 @@ \pnum \begin{note} If an error represents an out-of-memory condition, implementations are -encouraged to throw an exception object of type \tcode{bad_alloc}\iref{bad.alloc} rather +encouraged to throw an exception object of type \link{\tcode{bad_alloc}}{bad.alloc} rather than \tcode{system_error}. \end{note} \indexlibraryglobal{system_error}% diff --git a/source/exceptions.tex b/source/exceptions.tex index a462fe0bff..1ce04e3c6a 100644 --- a/source/exceptions.tex +++ b/source/exceptions.tex @@ -89,7 +89,6 @@ goto l2; // OK } } - \end{codeblock} \end{example} \indextext{\idxcode{goto}!and try block}% @@ -135,11 +134,11 @@ Any exception thrown while destroying \tcode{t2} will result in executing -\tcode{handler 2}; +\noncxxtcode{handler 2}; any exception thrown while destroying \tcode{t1} will result in executing -\tcode{handler 1}. +\noncxxtcode{handler 1}. \end{example} \pnum @@ -184,7 +183,7 @@ \pnum In this Clause, ``before'' and ``after'' refer to the -``sequenced before'' relation\iref{intro.execution}. +\deflinkx{``sequenced before''}{sequenced before}{intro.execution} relation. \rSec1[except.throw]{Throwing an exception}% \indextext{exception handling!throwing}% @@ -285,7 +284,7 @@ declared in the \grammarterm{exception-declaration} in the handler; \item -when an object of type \tcode{std::exception_ptr}\iref{propagation} +when an object of type \libglobalrefx{std::exception_ptr}{exception_ptr} that refers to the exception object is destroyed, before the destructor of \tcode{std::exception_ptr} returns. \end{itemize} @@ -293,7 +292,7 @@ Among all points of potential destruction for the exception object, there is an unspecified last one where the exception object is destroyed. -All other points happen before that last one\iref{intro.races}. +All other points \deflinkx{happen before}{happens before}{intro.races} that last one. \begin{note} No other thread synchronization is implied in exception handling. \end{note} @@ -321,7 +320,7 @@ \indextext{exception handling!rethrow}% \indextext{rethrow|see{exception handling, rethrow}}% An exception is considered caught when a handler for that exception -becomes active\iref{except.handle}. +becomes \deflinkx{active}{exception handling!handler!active}{except.handle}. \begin{note} An exception can have active handlers and still be considered uncaught if it is rethrown. @@ -331,9 +330,9 @@ \indextext{exception handling!terminate called@\tcode{terminate} called}% \indextext{\idxcode{terminate}!called}% If the exception handling mechanism -handling an uncaught exception\iref{except.uncaught} +handling an \link{uncaught exception}{except.uncaught} directly invokes a function that exits via an -exception, the function \tcode{std::terminate} is invoked\iref{except.terminate}. +exception, the function \link{\tcode{std::terminate}}{except.terminate} is invoked. \begin{example} \begin{codeblock} struct C { @@ -470,7 +469,7 @@ \pnum \begin{note} If the object was allocated by a \grammarterm{new-expression}\iref{expr.new}, -the matching deallocation function\iref{basic.stc.dynamic.deallocation}, +the matching \link{deallocation function}{basic.stc.dynamic.deallocation}, if any, is called to free the storage occupied by the object. \end{note} @@ -535,18 +534,16 @@ \begin{itemize} \item% -a standard pointer conversion\iref{conv.ptr} not involving conversions +a standard \link{pointer conversion}{conv.ptr} not involving conversions to pointers to private or protected or ambiguous classes \item% -a function pointer conversion\iref{conv.fctptr} +a \link{function pointer conversion}{conv.fctptr} \item% -a qualification conversion\iref{conv.qual}, or - +a \link{qualification conversion}{conv.qual}, or \end{itemize} \item the \grammarterm{handler} is of type \cv{}~\tcode{T} or \tcode{const T\&} where \tcode{T} is a pointer or pointer-to-member type and \tcode{E} is \tcode{std::nullptr_t}. - \end{itemize} \begin{note} @@ -677,7 +674,7 @@ constructors of objects associated with non-block variables with static storage duration are not caught by a \grammarterm{function-try-block} on -the \tcode{main} function\iref{basic.start.main}. +the \link{\tcode{main} function}{basic.start.main}. Exceptions thrown in destructors of objects with thread storage duration or in constructors of objects associated with non-block variables with thread storage duration are not caught by a \grammarterm{function-try-block} on the initial function of the thread. @@ -746,7 +743,7 @@ The exception specification is either defined implicitly, or defined explicitly by using a \grammarterm{noexcept-specifier} -as a suffix of a function declarator\iref{dcl.fct}. +as a suffix of a \link{function declarator}{dcl.fct}. \begin{bnf} \nontermdef{noexcept-specifier}\br @@ -786,7 +783,7 @@ is as specified below and no other declaration for that function shall have a \grammarterm{noexcept-specifier}. -In an explicit instantiation\iref{temp.explicit} +In an \link{explicit instantiation}{temp.explicit} a \grammarterm{noexcept-specifier} may be specified, but is not required. If a \grammarterm{noexcept-specifier} is specified @@ -835,7 +832,7 @@ \defnx{potentially-throwing}{potentially-throwing!expression} if \begin{itemize} \item -$E$ is a function call\iref{expr.call} +$E$ is a \link{function call}{expr.call} whose \grammarterm{postfix-expression} has a function type, or a pointer-to-function type, @@ -846,7 +843,7 @@ (such as an overloaded operator, an allocation function in a \grammarterm{new-expression}, a constructor for a function argument, -or a destructor if $E$ is a full-expression\iref{intro.execution}) +or a destructor if $E$ is a \deflink{full-expression}{intro.execution}) that has a potentially-throwing exception specification, or \item @@ -863,7 +860,7 @@ polymorphic class type\iref{expr.typeid}, or \item -any of the immediate subexpressions\iref{intro.execution} +any of the \deflinkx{immediate subexpressions}{immediate subexpression}{intro.execution} of $E$ is potentially-throwing. \end{itemize} @@ -916,7 +913,7 @@ in the implicit definition is potentially-throwing. \pnum -A deallocation function\iref{basic.stc.dynamic.deallocation} +A \link{deallocation function}{basic.stc.dynamic.deallocation} with no explicit \grammarterm{noexcept-specifier} has a non-throwing exception specification. @@ -1004,8 +1001,8 @@ is used by the exception handling mechanism for coping with errors related to the exception handling mechanism itself. The function -\tcode{std::current_exception()}\iref{propagation} and the class -\tcode{std::nested_exception}\iref{except.nested} can be used by a program to +\link{\tcode{std::current_exception()}}{propagation} and the class +\link{\tcode{std::nested_exception}}{except.nested} can be used by a program to capture the currently handled exception. \rSec2[except.terminate]{The \tcode{std::terminate} function} @@ -1030,12 +1027,12 @@ \item% when the exception handling mechanism cannot find a handler for a thrown exception\iref{except.handle}, or -\item when the search for a handler\iref{except.handle} encounters the +\item when the search for a \link{handler}{except.handle} encounters the outermost block of a function -with a non-throwing exception specification\iref{except.spec}, or +with a non-throwing \link{exception specification}{except.spec}, or \item% -when the destruction of an object during stack unwinding\iref{except.ctor} +when the destruction of an object during \deflink{stack unwinding}{except.ctor} terminates by throwing an exception, or \item% @@ -1101,9 +1098,7 @@ a \tcode{with_awaitable_senders} object\iref{exec.with.awaitable.senders} whose continuation is not a handle to a coroutine whose promise type has an \tcode{unhandled_stopped} member function. - \end{itemize} - \end{note} \pnum @@ -1134,7 +1129,7 @@ \pnum An exception is considered uncaught -after completing the initialization of the exception object\iref{except.throw} +after completing the initialization of the \deflinkx{exception object}{exception handling!exception object}{except.throw} until completing the activation of a handler for the exception\iref{except.handle}. \begin{note} As a consequence, an exception is considered uncaught diff --git a/source/exec.tex b/source/exec.tex index b84dcbfa36..702ffdd09a 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -31,25 +31,25 @@ \capsep core & provide core execution functionality, and connection between core components & - e.g., \tcode{connect}, \tcode{start} \\ + e.g., \libglobalref{connect}, \libglobalref{start} \\ completion functions & called by senders to announce the completion of the work (success, error, or cancellation) & - \tcode{set_value}, \tcode{set_error}, \tcode{set_stopped} \\ + \libglobalref{set_value}, \libglobalref{set_error}, \libglobalref{set_stopped} \\ senders & allow the specialization of the provided sender algorithms & \begin{itemize} - \item sender factories (e.g., \tcode{schedule}, \tcode{just}, \tcode{read_env}) - \item sender adaptors (e.g., \tcode{continues_on}, \tcode{then}, \tcode{let_value}) - \item sender consumers (e.g., \tcode{sync_wait}) + \item sender factories (e.g., \libglobalref{schedule}, \libglobalref{just}, \libglobalref{read_env}) + \item sender adaptors (e.g., \libglobalref{continues_on}, \libglobalref{then}, \libglobalref{let_value}) + \item sender consumers (e.g., \libglobalref{sync_wait}) \end{itemize} \\ queries & allow querying different properties of objects & \begin{itemize} - \item general queries (e.g., \tcode{get_allocator}, \tcode{get_stop_token}) - \item environment queries (e.g., \tcode{get_scheduler}, \tcode{get_delegation_scheduler}) - \item scheduler queries (e.g., \tcode{get_forward_progress_guarantee}) - \item sender attribute queries (e.g., \tcode{get_completion_scheduler}) + \item general queries (e.g., \libglobalref{get_allocator}, \libglobalref{get_stop_token}) + \item environment queries (e.g., \tcode{get_scheduler}, \libglobalref{get_delegation_scheduler}) + \item scheduler queries (e.g., \libglobalref{get_forward_progress_guarantee}) + \item sender attribute queries (e.g., \libglobalref{get_completion_scheduler}) \end{itemize} \\ \end{floattable} @@ -2801,7 +2801,7 @@ Let \tcode{out_sndr} and \tcode{env} be subexpressions such that \tcode{OutSndr} is \tcode{decltype((out_sndr))}. If \tcode{\exposconcept{sender-for}} is \tcode{false}, -then the expressions \tcode{starts_on.transform_env(out_sndr, env)} and\linebreak +then the expressions \tcode{starts_on.transform_env(out_sndr, env)} and \tcode{starts_on.transform_sender(out_sndr, env)} are ill-formed; otherwise \begin{itemize} \item @@ -3154,7 +3154,7 @@ \pnum Let \tcode{out_sndr} and \tcode{env} be subexpressions, let \tcode{OutSndr} be \tcode{decltype((out_sndr))}, and -let \tcode{Env} be \tcode{decltype((\linebreak env))}. +let \tcode{Env} be \tcode{decltype((env))}. If \tcode{\exposconcept{sender-for}} is \tcode{false}, then the expressions \tcode{on.transform_env(out_sndr, env)} and \tcode{on.transform_sender(out_sndr, env)} are ill-formed. @@ -3316,7 +3316,7 @@ For subexpressions \tcode{sndr} and \tcode{f}, if \tcode{decltype((sndr))} does not satisfy \libconcept{sender}, or \tcode{decltype((f))} does not satisfy \exposconcept{movable-value}, -\tcode{\exposid{then-cpo}(\linebreak sndr, f) }is ill-formed. +\tcode{\exposid{then-cpo}(sndr, f) }is ill-formed. \pnum Otherwise, @@ -3485,7 +3485,7 @@ Let \tcode{LetSigs} be a pack of those types in \tcode{Sigs} with a return type of \tcode{\exposid{decayed-typeof}<\exposid{set-cpo}>}. Let \exposid{as-tuple} be an alias template -such that \tcode{\exposid{as-tuple}<\linebreak Tag(Args...)>} denotes +such that \tcode{\exposid{as-tuple}} denotes the type \tcode{\exposid{decayed-tuple}}. Then \tcode{args_variant_t} denotes the type \tcode{variant...>} @@ -3540,7 +3540,7 @@ Let \tcode{sndr} and \tcode{env} be subexpressions, and let \tcode{Sndr} be \tcode{decltype((sndr))}. If -\tcode{\exposconcept{sender-for}>} +\tcode{\exposconcept{sender-for}>} is \tcode{false}, then the expression \tcode{\exposid{let-cpo}.transform_env(sndr, env)} is ill-formed. @@ -4287,7 +4287,7 @@ \end{codeblock} if the expression \tcode{\exposid{decayed-tuple}\{as...\}} is potentially throwing; -otherwise, \tcode{o.emplace(\linebreak as...)}. +otherwise, \tcode{o.emplace(as...)}. \pnum The expression \tcode{when_all_with_variant(sndrs...)} @@ -4600,7 +4600,7 @@ \pnum For a subexpression \tcode{sndr}, let \tcode{Sndr} be \tcode{decltype((sndr))}. -If \tcode{\libconcept{sender_to}>} +If \tcode{\libconcept{sender_to}>} is \tcode{false}, the expression \tcode{sync_wait.apply_sender(sndr)} is ill-formed; otherwise, it is equivalent to: @@ -4671,7 +4671,7 @@ \pnum If \tcode{\exposconcept{callable}} is \tcode{false}, -the expression \tcode{sync_wait_with_variant.apply_sender(\linebreak sndr)} is ill-formed. +the expression \tcode{sync_wait_with_variant.apply_sender(sndr)} is ill-formed. Otherwise, it is equivalent to: \begin{codeblock} using result_type = @\exposid{sync-wait-with-variant-result-type}@; @@ -4914,7 +4914,7 @@ Let \tcode{Es} be a pack of the types in the \exposid{type-list} named by \tcode{\exposid{gather-signatures}}, where \exposid{error-list} is an alias template -such that \tcode{\exposid{error-list}<\linebreak Ts...>} is +such that \tcode{\exposid{error-list}} is \tcode{\exposid{type-list}...>}. \pnum diff --git a/source/expressions.tex b/source/expressions.tex index 3ee94afec2..093e4c4234 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -33,14 +33,14 @@ \indextext{operator!overloaded}% \begin{note} Operators can be overloaded, that is, given meaning when applied to -expressions of class type\iref{class} or enumeration -type\iref{dcl.enum}. Uses of overloaded operators are transformed into +expressions of \link{class}{class} type or +\link{enumeration}{dcl.enum} type. Uses of overloaded operators are transformed into function calls as described in~\ref{over.oper}. Overloaded operators obey the rules for syntax and evaluation order specified in \ref{expr.compound}, but the requirements of operand type and value category are replaced by the rules for function call. Relations between operators, such as -\tcode{++a} meaning \tcode{a+=1}, are not guaranteed for overloaded -operators\iref{over.oper}. +\tcode{++a} meaning \tcode{a+=1}, are not guaranteed for \link{overloaded +operators}{over.oper}. \end{note} \pnum @@ -212,7 +212,7 @@ \begin{example} \begin{codeblock} struct A { - int m; +int m; }; A&& operator+(A, A); A&& f(); @@ -268,7 +268,7 @@ \pnum Whenever a prvalue appears as an operand of an operator that expects a glvalue for that operand, the -temporary materialization conversion\iref{conv.rval} is +\link{temporary materialization conversion}{conv.rval} is applied to convert the expression to an xvalue. \pnum @@ -445,31 +445,30 @@ In an unevaluated operand, a non-static class member can be named\iref{expr.prim.id} and naming of objects or functions does not, by itself, require that a definition be provided\iref{basic.def.odr}. -An unevaluated operand is considered a full-expression\iref{intro.execution}. +An unevaluated operand is considered a \deflink{full-expression}{intro.execution}. \end{note} \pnum In some contexts, an expression only appears for its side effects. Such an expression is called a \defn{discarded-value expression}. -The array-to-pointer\iref{conv.array} -and function-to-pointer\iref{conv.func} standard conversions are not -applied. The lvalue-to-rvalue conversion\iref{conv.lval} is applied +The \link{array-to-pointer}{conv.array} +and \link{function-to-pointer}{conv.func} standard conversions are not +applied. The \link{lvalue-to-rvalue}{conv.lval} conversion is applied if and only if the expression is a glvalue of volatile-qualified type and it is one of the following: - \begin{itemize} \item \tcode{(} \grammarterm{expression} \tcode{)}, where - \grammarterm{expression} is one of these expressions, +\grammarterm{expression} is one of these expressions, \item \grammarterm{id-expression}\iref{expr.prim.id}, -\item subscripting\iref{expr.sub}, -\item class member access\iref{expr.ref}, -\item indirection\iref{expr.unary.op}, -\item pointer-to-member operation\iref{expr.mptr.oper}, -\item conditional expression\iref{expr.cond} where both the second and the - third operands are one of these expressions, or -\item comma expression\iref{expr.comma} where the right operand is one of - these expressions. +\item \link{subscripting}{expr.sub}, +\item \link{class member access}{expr.ref}, +\item \deflink{indirection}{expr.unary.op}, +\item \link{pointer-to-member operation}{expr.mptr.oper}, +\item \link{conditional expression}{expr.cond} where both the second and the + third operands are one of these expressions, or +\item \link{comma expression}{expr.comma} where the right operand is one of + these expressions. \end{itemize} \begin{note} @@ -500,7 +499,6 @@ \ref{conv} enumerates the full set of such conversions. A \defnx{standard conversion sequence}{conversion sequence!standard} is a sequence of standard conversions in the following order: - \begin{itemize} \item Zero or one conversion from the following set: lvalue-to-rvalue conversion, array-to-pointer conversion, and function-to-pointer @@ -528,7 +526,6 @@ \begin{note} Expressions with a given type will be implicitly converted to other types in several contexts: - \begin{itemize} \item When used as operands of operators. The operator's requirements for its operands dictate the destination type\iref{expr.compound}. @@ -607,7 +604,7 @@ \pnum \indextext{conversion!lvalue-to-rvalue}% \indextext{type!incomplete}% -A glvalue\iref{basic.lval} of a non-function, non-array type \tcode{T} +A \deflink{glvalue}{basic.lval} of a non-function, non-array type \tcode{T} can be converted to a prvalue. \begin{footnote} @@ -632,18 +629,18 @@ \begin{itemize} \item $E$ is not potentially evaluated, or \item the evaluation of $E$ results in the evaluation of a member - $E_\tcode{x}$ of the set of potential results of $E$, and $E_\tcode{x}$ - names a variable \tcode{x} that is not odr-used by - $E_\tcode{x}$\iref{basic.def.odr}, + $E_\tcode{x}$ of the set of potential results of $E$, and $E_\tcode{x}$ + names a variable \tcode{x} that is not odr-used by + $E_\tcode{x}$\iref{basic.def.odr}, \end{itemize} the value contained in the referenced object is not accessed. \begin{example} \begin{codeblock} struct S { int n; }; auto f() { - S x { 1 }; - constexpr S y { 2 }; - return [&](bool b) { return (b ? y : x).n; }; +S x { 1 }; +constexpr S y { 2 }; +return [&](bool b) { return (b ? y : x).n; }; } auto g = f(); int m = g(false); // undefined behavior: access of \tcode{x.n} outside its lifetime @@ -654,7 +651,6 @@ \pnum The result of the conversion is determined according to the following rules: - \begin{itemize} \item If \tcode{T} is \cv{}~\tcode{std::nullptr_t}, the result is a @@ -800,11 +796,11 @@ (as it is done on line \#2). For example, \begin{codeblock} int main() { - const char c = 'c'; - char* pc; - const char** pcc = &pc; // \#1: not allowed - *pcc = &c; - *pc = 'C'; // \#2: modifies a const object +const char c = 'c'; +char* pc; +const char** pcc = &pc; // \#1: not allowed +*pcc = &c; +*pc = 'C'; // \#2: modifies a const object } \end{codeblock} \end{note} @@ -1061,7 +1057,7 @@ \indextext{conversion!pointer-to-member}% \indextext{null member pointer conversion|see{conversion, null member pointer}}% \indextext{constant!null pointer}% -A null pointer constant\iref{conv.ptr} can be converted to a +A \deflinkx{null pointer constant}{constant!null pointer}{conv.ptr} can be converted to a pointer-to-member type; the result is the \defnx{null member pointer value}{value!null member pointer} of that type and is distinguishable from any pointer to member not @@ -1149,7 +1145,6 @@ purpose is to yield a common type, which is also the type of the result. This pattern is called the \defnx{usual arithmetic conversions}{conversion!usual arithmetic}, which are defined as follows: - \begin{itemize} \item The lvalue-to-rvalue conversion\iref{conv.lval} is applied to each operand and @@ -1192,7 +1187,6 @@ to some integral type. \end{footnote} Then the following rules are applied to determine \tcode{C}: - \begin{itemize} \item If \tcode{T1} and \tcode{T2} are the same type, \tcode{C} is that type. @@ -1279,7 +1273,7 @@ \begin{note} In a \grammarterm{trailing-return-type}, the class being defined is not required to be complete -for purposes of class member access\iref{expr.ref}. +for purposes of \link{class member access}{expr.ref}. Class members declared later are not visible. \begin{example} \begin{codeblock} @@ -1347,8 +1341,8 @@ An \grammarterm{id-expression} is a restricted form of a \grammarterm{primary-expression}. \begin{note} -An \grammarterm{id-expression} can appear after \tcode{.} and \tcode{->} -operators\iref{expr.ref}. +An \grammarterm{id-expression} can appear after +\link{\tcode{.} and \tcode{->} operators}{expr.ref}. \end{note} \pnum @@ -1457,7 +1451,7 @@ In the declaration of \tcode{p2}, those constraints need to be satisfied even though -\tcode{f} is an unevaluated operand\iref{term.unevaluated.operand}. +\tcode{f} is an \deflink{unevaluated operand}{expr.context}. \end{example} \end{note} @@ -1552,7 +1546,7 @@ \end{note} The expression is an xvalue if it is move-eligible (see below); an lvalue -if the entity is a function, variable, structured binding\iref{dcl.struct.bind}, data member, or +if the entity is a function, variable, \link{structured binding}{dcl.struct.bind}, data member, or template parameter object; and a prvalue otherwise\iref{basic.lval}; it is a bit-field if the identifier designates a bit-field. @@ -1846,8 +1840,8 @@ A \grammarterm{lambda-expression} is a prvalue whose result object is called the \defn{closure object}. \begin{note} -A closure object behaves like a function -object\iref{function.objects}. +A closure object behaves like a \link{function +object}{function.objects}. \end{note} \pnum @@ -2130,7 +2124,7 @@ and no explicit object parameter\iref{dcl.fct} whose constraints (if any) are satisfied has a conversion function to pointer to -function with \Cpp{} language linkage\iref{dcl.link} having +function with \Cpp{} language \link{linkage}{dcl.link} having the same parameter and return types as the closure type's function call operator. The conversion is to ``pointer to \keyword{noexcept} function'' if the function call operator @@ -2239,8 +2233,8 @@ \pnum The conversion function or conversion function template is public, -constexpr, non-virtual, non-explicit, const, and has a non-throwing exception -specification\iref{except.spec}. +constexpr, non-virtual, non-explicit, const, and has a non-throwing \link{exception +specification}{except.spec}. \begin{example} \begin{codeblock} auto Fwd = [](int (*fp)(int), auto a) { return fp(a); }; @@ -2296,9 +2290,9 @@ \pnum A member of a closure type shall not be -explicitly instantiated\iref{temp.explicit}, -explicitly specialized\iref{temp.expl.spec}, or -named in a friend declaration\iref{class.friend}. +\link{explicitly instantiated}{temp.explicit}, +\link{explicitly specialized}{temp.expl.spec}, or +named in a \link{friend declaration}{class.friend}. \rSec3[expr.prim.lambda.capture]{Captures}% @@ -2454,7 +2448,6 @@ \pnum For the purposes of lambda capture, an expression potentially references local entities as follows: - \begin{itemize} \item An \grammarterm{id-expression} that names a local entity @@ -2581,7 +2574,7 @@ } auto g() { return [] { - return [*this] { }; // error: \tcode{*this} not captured by outer \grammarterm{lambda-expression} + return [*this] { }; // error: \tcode{*this} not captured by outer \grammarterm{lambda-expression} }(); } }; @@ -2854,7 +2847,7 @@ \pnum A \grammarterm{requires-expression} provides a concise way to express requirements on template arguments -that can be checked by name lookup\iref{basic.lookup} +that can be checked by \link{name lookup}{basic.lookup} or by checking properties of types and expressions. \begin{bnf} @@ -2891,7 +2884,7 @@ A \grammarterm{requires-expression} is a prvalue of type \tcode{bool} whose value is described below. Expressions appearing within a \grammarterm{requirement-body} -are unevaluated operands\iref{term.unevaluated.operand}. +are \deflinkx{unevaluated operands}{unevaluated operand}{expr.context}. \pnum \begin{example} @@ -2986,7 +2979,7 @@ \begin{note} The enclosing \grammarterm{requires-expression} will evaluate to \keyword{false} if substitution of template arguments into the \grammarterm{expression} fails. -The \grammarterm{expression} is an unevaluated operand\iref{term.unevaluated.operand}. +The \grammarterm{expression} is an \deflink{unevaluated operand}{expr.context}. \end{note} \begin{example} \begin{codeblock} @@ -3057,7 +3050,6 @@ of the \grammarterm{expression} $E$. Substitution of template arguments (if any) and verification of semantic properties proceed in the following order: - \begin{itemize} \item Substitution of template arguments (if any) @@ -3069,7 +3061,6 @@ \item If the \grammarterm{return-type-requirement} is present, then: - \begin{itemize} \item Substitution of template arguments (if any) @@ -3284,7 +3275,7 @@ If the selected function is non-virtual, or if the \grammarterm{id-expression} in the class member access expression is a \grammarterm{qualified-id}, that function is -called. Otherwise, its final overrider\iref{class.virtual} in the dynamic type +called. Otherwise, its \deflink{final overrider}{class.virtual} in the dynamic type of the object expression is called; such a call is referred to as a \defnx{virtual function call}{function!virtual function call}. \begin{note} @@ -3297,8 +3288,8 @@ \pnum \begin{note} -If a function or member function name is used, and name -lookup\iref{basic.lookup} does not find a declaration of that name, +If a function or member function name is used, and \link{name +lookup}{basic.lookup} does not find a declaration of that name, the program is ill-formed. No function is implicitly declared by such a call. \end{note} @@ -3363,7 +3354,7 @@ the object expression of the class member access shall be a glvalue and the implicit object parameter of the function\iref{over.match.funcs} is initialized with that glvalue, -converted as if by an explicit type conversion\iref{expr.cast}. +converted as if by an \link{explicit type conversion}{expr.cast}. \begin{note} There is no access or ambiguity checking on this conversion; the access checking and disambiguation are done as part of the (possibly implicit) @@ -3476,10 +3467,10 @@ \pnum \indextext{declaration!ellipsis in function}% \indextext{parameter list!variable}% -A function can be declared to accept fewer arguments (by declaring default -arguments\iref{dcl.fct.default}) or more arguments (by using the ellipsis, +A function can be declared to accept fewer arguments (by declaring \link{default +arguments}{dcl.fct.default}) or more arguments (by using the ellipsis, \tcode{...}, or a function parameter pack\iref{dcl.fct}) than the number of -parameters in the function definition\iref{dcl.fct.def}. +parameters in the \link{function definition}{dcl.fct.def}. \begin{note} This implies that, except where the ellipsis (\tcode{...}) or a function parameter pack is used, a parameter is available for each argument. @@ -3489,7 +3480,7 @@ \indextext{ellipsis!conversion sequence}% When there is no parameter for a given argument, the argument is passed in such a way that the receiving function can obtain the value of the -argument by invoking \tcode{va_arg}\iref{support.runtime}. +argument by invoking \libglobalref{va_arg}. \begin{note} This paragraph does not apply to arguments passed to a function parameter pack. Function parameter packs are expanded during template instantiation\iref{temp.variadic}, @@ -3497,8 +3488,8 @@ specialization is actually called. \end{note} The -lvalue-to-rvalue\iref{conv.lval}, array-to-pointer\iref{conv.array}, -and function-to-pointer\iref{conv.func} standard conversions are +\link{lvalue-to-rvalue}{conv.lval}, \link{array-to-pointer}{conv.array}, +and \link{function-to-pointer}{conv.func} standard conversions are performed on the argument expression. An argument that has type \cv{}~\tcode{std::nullptr_t} is converted to type \tcode{\keyword{void}*}\iref{conv.ptr}. @@ -3513,16 +3504,16 @@ a non-trivial destructor\iref{class.dtor}, with no corresponding parameter, is conditionally-supported with \impldef{passing argument of class type through ellipsis} semantics. If the argument has -integral or enumeration type that is subject to the integral -promotions\iref{conv.prom}, or a floating-point type that is subject to the -floating-point promotion\iref{conv.fpprom}, the value of the argument is converted to the +integral or enumeration type that is subject to the \link{integral +promotions}{conv.prom}, or a floating-point type that is subject to the +\link{floating-point promotion}{conv.fpprom}, the value of the argument is converted to the promoted type before the call. These promotions are referred to as the \defnx{default argument promotions}{promotion!default argument promotion}. \pnum \indextext{function call!recursive}% -Recursive calls are permitted, except to the \tcode{main} -function\iref{basic.start.main}. +Recursive calls are permitted, except to the \link{\tcode{main} +function}{basic.start.main}. \pnum A function call is an lvalue @@ -3538,8 +3529,8 @@ \indextext{type conversion, explicit|see{casting}}% \indextext{conversion explicit type|see{casting}}% \indextext{casting}% -A \grammarterm{simple-type-specifier}\iref{dcl.type.simple} or -\grammarterm{typename-specifier}\iref{temp.res} followed +A \link{\grammarterm{simple-type-specifier}}{dcl.type.simple} or +\link{\grammarterm{typename-specifier}}{temp.res} followed by a parenthesized optional \grammarterm{expression-list} or by a \grammarterm{braced-init-list} (the initializer) @@ -3550,7 +3541,7 @@ for a deduced class type, it is replaced by the return type of the function selected by overload resolution -for class template deduction\iref{over.match.class.deduct} +for \link{class template deduction}{over.match.class.deduct} for the remainder of this subclause. Otherwise, if the type contains a placeholder type, it is replaced by the type @@ -3572,8 +3563,7 @@ \pnum If the initializer is a parenthesized single expression, the type conversion expression is equivalent -to the corresponding cast -expression\iref{expr.cast}. +to the corresponding \link{cast expression}{expr.cast}. \indextext{type!incomplete}% Otherwise, if the type is \cv{}~\keyword{void} and the initializer is \tcode{()} or \tcode{\{\}} @@ -3582,7 +3572,7 @@ that performs no initialization. Otherwise, the expression is a prvalue of the specified type -whose result object is direct-initialized\iref{dcl.init} +whose result object is \deflinkx{direct-initialized}{direct-initialization}{dcl.init} with the initializer. If the initializer is a parenthesized optional \grammarterm{expression-list}, the specified type shall not be an array type. @@ -3686,7 +3676,6 @@ otherwise \tcode{E1.E2} designates the object or function to which the corresponding reference member of \tcode{E1} is bound. Otherwise, one of the following rules applies. - \begin{itemize} \item If \tcode{E2} is a static data member and the type of \tcode{E2} is \tcode{T}, then \tcode{E1.E2} is an lvalue; the expression designates @@ -3867,8 +3856,8 @@ \end{example} \pnum -Otherwise, \tcode{v} shall be a pointer to or a glvalue of a polymorphic -type\iref{class.virtual}. +Otherwise, \tcode{v} shall be a pointer to or a glvalue of a +\deflinkx{polymorphic type}{class!polymorphic}{class.virtual}. \pnum If \tcode{v} is a null pointer value, the result is a null pointer value. @@ -3899,7 +3888,6 @@ \pnum Let \tcode{C} be the class type to which \tcode{T} points or refers. The runtime check logically executes as follows: - \begin{itemize} \item If, in the most derived object pointed (referred) to by \tcode{v}, \tcode{v} points (refers) to a public base class subobject of a @@ -3919,9 +3907,9 @@ \pnum The value of a failed cast to pointer type is the null pointer value of -the required result type. A failed cast to reference type throws -an exception\iref{except.throw} of a type that would match a -handler\iref{except.handle} of type \tcode{std::bad_cast}\iref{bad.cast}. +the required result type. A failed cast to reference type \link{throws +an exception}{except.throw} of a type that would match a +\link{handler}{except.handle} of type \link{\tcode{std::bad_cast}}{bad.cast}. \indextext{\idxcode{bad_cast}}% \indexlibraryglobal{bad_cast}% @@ -4010,13 +3998,13 @@ When \keyword{typeid} is applied to an expression other than a glvalue of a polymorphic class type, the result refers to a \tcode{std::type_info} object representing the static type of the expression. -Lvalue-to-rvalue\iref{conv.lval}, array-to-pointer\iref{conv.array}, -and function-to-pointer\iref{conv.func} conversions are not applied to +\link{Lvalue-to-rvalue}{conv.lval}, \link{array-to-pointer}{conv.array}, +and \link{function-to-pointer}{conv.func} conversions are not applied to the expression. If the expression is a prvalue, -the temporary materialization conversion\iref{conv.rval} +the \link{temporary materialization conversion}{conv.rval} is applied. -The expression is an unevaluated operand\iref{term.unevaluated.operand}. +The expression is an \deflink{unevaluated operand}{expr.context}. \pnum When \keyword{typeid} is applied to a \grammarterm{type-id}, the result @@ -4111,7 +4099,7 @@ reference to \tcode{T2}'' if \tcode{T2} is reference-compatible with \tcode{T1}\iref{dcl.init.ref}. If the value is not a bit-field, the result refers to the object or the specified base class subobject -thereof; otherwise, the lvalue-to-rvalue conversion\iref{conv.lval} +thereof; otherwise, the \link{lvalue-to-rvalue conversion}{conv.lval} is applied to the bit-field and the resulting prvalue is used as the operand of the \keyword{static_cast} for the remainder of this subclause. If \tcode{T2} is an inaccessible\iref{class.access} or @@ -4241,7 +4229,8 @@ A prvalue of type ``pointer to \cvqual{cv1} \tcode{B}'', where \tcode{B} is a class type, can be converted to a prvalue of type ``pointer to \cvqual{cv2} \tcode{D}'', -where \tcode{D} is a complete class derived\iref{class.derived} +where \tcode{D} is a complete class +\link{derived}{class.derived} from \tcode{B}, if \cvqual{cv2} is the same cv-qualification as, or greater cv-qualification than, \cvqual{cv1}. @@ -4262,7 +4251,7 @@ \tcode{T}'' can be converted to a prvalue of type ``pointer to member of \tcode{B} of type \cvqual{cv2} \tcode{T}'', where \tcode{D} is a complete class type and -\tcode{B} is a base class\iref{class.derived} of \tcode{D}, +\tcode{B} is a \link{base class}{class.derived} of \tcode{D}, if \cvqual{cv2} is the same cv-qualification as, or greater cv-qualification than, \cvqual{cv1}. \begin{note} @@ -4273,7 +4262,7 @@ from ``pointer to member of \tcode{B} of type \tcode{T}'' to ``pointer to member of \tcode{D} of type \tcode{T}'' exists\iref{conv.mem}, the program is ill-formed. -The null member pointer value\iref{conv.mem} is converted to the null +The \deflinkx{null member pointer value}{value!null member pointer}{conv.mem} is converted to the null member pointer value of the destination type. If class \tcode{B} contains the original member, or is a base class of the class containing the original member, the resulting pointer to member points @@ -4296,7 +4285,7 @@ then the resulting pointer value\iref{basic.compound} is unspecified. Otherwise, if the original pointer value points to an object \placeholder{a}, and there is an object \placeholder{b} of type similar to \tcode{T} -that is pointer-interconvertible\iref{basic.compound} with \placeholder{a}, +that is \deflink{pointer-interconvertible}{basic.compound} with \placeholder{a}, the result is a pointer to \placeholder{b}. Otherwise, the pointer value is unchanged by the conversion. \begin{example} @@ -4322,8 +4311,8 @@ If \tcode{T} is an lvalue reference type or an rvalue reference to function type, the result is an lvalue; if \tcode{T} is an rvalue reference to object type, the result is an xvalue; otherwise, the result is a prvalue and the -lvalue-to-rvalue\iref{conv.lval}, array-to-pointer\iref{conv.array}, -and function-to-pointer\iref{conv.func} standard conversions are +\link{lvalue-to-rvalue}{conv.lval}, \link{array-to-pointer}{conv.array}, +and \link{function-to-pointer}{conv.func} standard conversions are performed on the expression \tcode{v}. Conversions that can be performed explicitly using \keyword{reinterpret_cast} are listed below. No other conversion can be performed explicitly using \keyword{reinterpret_cast}. @@ -4448,7 +4437,6 @@ The null member pointer value\iref{conv.mem} is converted to the null member pointer value of the destination type. The result of this conversion is unspecified, except in the following cases: - \begin{itemize} \item Converting a prvalue of type ``pointer to member function'' to a different pointer-to-member-function type and back to its original type @@ -4492,8 +4480,8 @@ lvalue; if \tcode{T} is an rvalue reference to object type, the result is an xvalue; otherwise, the result is a prvalue and the -lvalue-to-rvalue\iref{conv.lval}, array-to-pointer\iref{conv.array}, -and function-to-pointer\iref{conv.func} standard conversions are +\link{lvalue-to-rvalue}{conv.lval}, \link{array-to-pointer}{conv.array}, +and \link{function-to-pointer}{conv.func} standard conversions are performed on the expression \tcode{v}. Conversions that can be performed explicitly using \keyword{const_cast} are listed below. No other conversion shall be performed explicitly using \keyword{const_cast}. @@ -4505,7 +4493,7 @@ \end{note} \pnum -For two similar types \tcode{T1} and \tcode{T2}\iref{conv.qual}, +For two \deflink{similar types}{conv.qual} \tcode{T1} and \tcode{T2}, a prvalue of type \tcode{T1} may be explicitly converted to the type \tcode{T2} using a \keyword{const_cast} if, considering the qualification-decompositions of both types, @@ -4541,7 +4529,7 @@ The result of a reference \keyword{const_cast} refers to the original object if the operand is a glvalue and -to the result of applying the temporary materialization conversion\iref{conv.rval} otherwise. +to the result of applying the \link{temporary materialization conversion}{conv.rval} otherwise. \pnum A null pointer value\iref{basic.compound} is converted to the null pointer @@ -4863,7 +4851,6 @@ \pnum Evaluation of an \grammarterm{await-expression} involves the following auxiliary types, expressions, and objects: - \begin{itemize} \item \placeholder{p} is an lvalue naming the promise @@ -5031,7 +5018,7 @@ The \keyword{sizeof} operator yields the number of bytes occupied by a non-potentially-overlapping object of the type of its operand. The operand is either an expression, -which is an unevaluated operand\iref{term.unevaluated.operand}, or a parenthesized +which is an \deflink{unevaluated operand}{expr.context}, or a parenthesized \grammarterm{type-id}. \indextext{type!incomplete}% The \keyword{sizeof} operator shall not be applied to an expression that @@ -5086,7 +5073,7 @@ function-to-pointer\iref{conv.func} standard conversions are not applied to the operand of \keyword{sizeof}. If the operand is a prvalue, -the temporary materialization conversion\iref{conv.rval} +the \link{temporary materialization conversion}{conv.rval} is applied. \pnum @@ -5231,7 +5218,7 @@ \end{bnf} \pnum -If a placeholder type\iref{dcl.spec.auto} or +If a \link{placeholder type}{dcl.spec.auto} or a placeholder for a deduced class type\iref{dcl.type.class.deduct} appears in the \grammarterm{type-specifier-seq} of a \grammarterm{new-type-id} or @@ -5244,7 +5231,6 @@ the \grammarterm{new-expression}, then the allocated type is the type deduced for the variable \tcode{x} in the invented declaration\iref{dcl.spec.auto}: - \begin{codeblock} T x @\textrm{\placeholder{init}}@ ; \end{codeblock} @@ -5359,7 +5345,7 @@ \item its value is such that the size of the allocated object would exceed the -\impldef{maximum size of an allocated object} limit\iref{implimits}; or +\impldef{maximum size of an allocated object} \link{limit}{implimits}; or \item the \grammarterm{new-initializer} is a \grammarterm{braced-init-list} and the @@ -5384,7 +5370,7 @@ \item otherwise, the \grammarterm{new-expression} terminates by throwing an exception of a type that would match a handler\iref{except.handle} of type -\tcode{std::bad_array_new_length}\iref{new.badlength}. +\link{\tcode{std::bad_array_new_length}}{new.badlength}. \end{itemize} \end{itemize} When the value of the \grammarterm{expression} is zero, the allocation @@ -5435,8 +5421,8 @@ A \grammarterm{new-expression} may obtain storage for the object by calling an allocation function\iref{basic.stc.dynamic.allocation}. If the \grammarterm{new-expression} terminates by throwing an exception, it -may release storage by calling a deallocation -function\iref{basic.stc.dynamic.deallocation}. If the allocated type +may release storage by calling a \link{deallocation +function}{basic.stc.dynamic.deallocation}. If the allocated type is a non-array type, the allocation function's name is \indextext{\idxcode{operator new}}% \indextext{\idxcode{operator delete}}% @@ -5547,7 +5533,7 @@ result of the \grammarterm{new-expression} and the address returned by the allocation function shall be an integral multiple of the strictest fundamental -alignment requirement\iref{basic.align} of any object type whose size +\link{alignment requirement}{basic.align} of any object type whose size is no greater than the size of the array being created. \begin{note} \indextext{allocation!alignment storage}% @@ -5596,7 +5582,6 @@ otherwise, an argument that is the type's alignment and has type \tcode{std::align_val_t} is added into the argument list immediately after the first argument; - \end{itemize} and then overload resolution is performed again. @@ -5638,7 +5623,7 @@ \pnum \begin{note} Unless an allocation function has a non-throwing -exception specification\iref{except.spec}, +\link{exception specification}{except.spec}, it indicates failure to allocate storage by throwing a \indextext{\idxcode{bad_alloc}}% \indexlibraryglobal{bad_alloc}% @@ -5674,7 +5659,6 @@ \indextext{\idxcode{new}!default constructor and}% A \grammarterm{new-expression} that creates an object of type \tcode{T} initializes that object as follows: - \begin{itemize} \item If the \grammarterm{new-initializer} is omitted, the object is default-initialized\iref{dcl.init}. @@ -5763,7 +5747,6 @@ S* p = new (0) S; // error: non-placement deallocation function matches // placement allocation function \end{codeblock} - \end{example} \pnum @@ -5784,8 +5767,8 @@ \pnum \indextext{expression!\idxcode{delete}}% \indextext{\idxcode{delete}}% -The \grammarterm{delete-expression} operator destroys a most derived -object\iref{intro.object} or array created by a +The \grammarterm{delete-expression} operator destroys a +\deflink{most derived object}{intro.object} or array created by a \grammarterm{new-expression}. \begin{bnf} @@ -5883,13 +5866,12 @@ \pnum If the value of the operand of the \grammarterm{delete-expression} is not a null pointer value, then: - \begin{itemize} \item If the allocation call for the \grammarterm{new-expression} for the object to be deleted was not omitted and the allocation was not extended\iref{expr.new}, the -\grammarterm{delete-expression} shall call a deallocation -function\iref{basic.stc.dynamic.deallocation}. The value returned from the +\grammarterm{delete-expression} shall call a \link{deallocation +function}{basic.stc.dynamic.deallocation}. The value returned from the allocation call of the \grammarterm{new-expression} shall be passed as the first argument to the deallocation function. @@ -6248,8 +6230,8 @@ whose second operand is a pointer to a data member is an lvalue if the first operand is an lvalue and an xvalue otherwise. The result of a \tcode{.*} expression whose second operand is a pointer to a member function is a prvalue. -If the second operand is the null -member pointer value\iref{conv.mem}, the behavior is undefined. +If the second operand is the \deflinkx{null member pointer value}{value!null member pointer}{conv.mem}, +the behavior is undefined. \rSec2[expr.mul]{Multiplicative operators}% \indextext{expression!multiplicative operators}% @@ -6278,7 +6260,7 @@ \pnum The operands of \tcode{*} and \tcode{/} shall have arithmetic or unscoped enumeration type; the operands of \tcode{\%} shall have integral or unscoped -enumeration type. The usual arithmetic conversions\iref{expr.arith.conv} are performed on the +enumeration type. The \link{usual arithmetic conversions}{expr.arith.conv} are performed on the operands and determine the type of the result. \pnum @@ -6414,7 +6396,7 @@ \pnum For addition or subtraction, if the expressions \tcode{P} or \tcode{Q} have type ``pointer to \cv{}~\tcode{T}'', where \tcode{T} and the array element type -are not similar\iref{conv.qual}, the behavior is undefined. +are not \deflinkx{similar}{similar types}{conv.qual}, the behavior is undefined. \begin{example} \begin{codeblock} int arr[5] = {1, 2, 3, 4, 5}; @@ -6505,12 +6487,11 @@ If both operands have arithmetic types, or one operand has integral type and the other operand has unscoped enumeration type, -the usual arithmetic conversions\iref{expr.arith.conv} are applied to the operands. +the \link{usual arithmetic conversions}{expr.arith.conv} are applied to the operands. Then: - \begin{itemize} \item -If a narrowing conversion\iref{dcl.init.list} is required, +If a \deflinkx{narrowing conversion}{conversion!narrowing}{dcl.init.list} is required, other than from an integral type to a floating-point type, the program is ill-formed. @@ -6552,13 +6533,13 @@ array-to-pointer conversions\iref{conv.array}, pointer conversions\iref{conv.ptr}, and -qualification conversions\iref{conv.qual} +\link{qualification conversions}{conv.qual} are performed on both operands to bring them to their composite pointer type\iref{expr.type}. After the conversions, the operands shall have the same type. \begin{note} If both of the operands are arrays, -array-to-pointer conversions\iref{conv.array} are not applied. +\link{array-to-pointer conversions}{conv.array} are not applied. \end{note} In this case, \tcode{p <=> q} is of type \tcode{std::strong_ordering} and @@ -6649,7 +6630,7 @@ function pointer conversions\iref{conv.fctptr}, and qualification conversions\iref{conv.qual} are performed to bring -them to their composite pointer type\iref{expr.type}. +them to their \deflink{composite pointer type}{expr.type}. After conversions, the operands shall have the same type. \pnum @@ -6664,7 +6645,6 @@ $n$ for this purpose. \end{footnote} is defined in terms of a partial order consistent with the following rules: - \begin{itemize} \item If two pointers point to different elements of the same array, or to subobjects thereof, the pointer to the element with the higher subscript @@ -6677,7 +6657,6 @@ and their class is not a union. \item Otherwise, neither pointer is required to compare greater than the other. - \end{itemize} \pnum @@ -6736,12 +6715,11 @@ \indextext{comparison!pointer}% \indextext{comparison!pointer to function}% If at least one of the operands is a pointer, -pointer conversions\iref{conv.ptr}, -function pointer conversions\iref{conv.fctptr}, and -qualification conversions\iref{conv.qual} -are performed on both operands to bring them to their composite pointer type\iref{expr.type}. +\link{pointer conversions}{conv.ptr}, +\link{function pointer conversions}{conv.fctptr}, and +\link{qualification conversions}{conv.qual} +are performed on both operands to bring them to their \deflink{composite pointer type}{expr.type}. Comparing pointers is defined as follows: - \begin{itemize} \item If one pointer represents the address of a complete object, and another @@ -6756,7 +6734,8 @@ \item Otherwise, if the pointers are both null, both point to the same \indextext{address}% -function, or both represent the same address\iref{basic.compound}, +function, or both +\deflinkx{represent the same address}{represents the address}{basic.compound}, they compare equal. \item Otherwise, the pointers compare unequal. @@ -6770,7 +6749,6 @@ are performed on both operands to bring them to their composite pointer type\iref{expr.type}. Comparing pointers to members is defined as follows: - \begin{itemize} \item If two pointers to members are both the null member pointer value, they compare @@ -6801,12 +6779,12 @@ \end{example} \item -If both refer to (possibly different) members of the same union\iref{class.union}, +If both refer to (possibly different) members of the same \link{union}{class.union}, they compare equal. \item Otherwise, two pointers to members compare equal if they would refer to the same member of -the same most derived object\iref{intro.object} or the same subobject if +the same \deflink{most derived object}{intro.object} or the same subobject if indirection with a hypothetical object of the associated class type were performed, otherwise they compare unequal. \begin{example} @@ -7032,7 +7010,7 @@ either has (possibly cv-qualified) class type, or if both are glvalues of the same value category and the same type except for cv-qualification, an attempt is made to -form an implicit conversion sequence\iref{over.best.ics} from +form an \link{implicit conversion sequence}{over.best.ics} from each of those operands to the type of the other. \begin{note} Properties such as access, whether an operand is a bit-field, or whether @@ -7042,7 +7020,6 @@ from an operand expression \tcode{E1} of type \tcode{T1} to a target type related to the type \tcode{T2} of the operand expression \tcode{E2} as follows: - \begin{itemize} \item If \tcode{E2} is an lvalue, the target type is ``lvalue reference to \tcode{T2}'', @@ -7074,9 +7051,9 @@ \item otherwise, the target type is the type that \tcode{E2} would have after applying the -lvalue-to-rvalue\iref{conv.lval}, -array-to-pointer\iref{conv.array}, and -function-to-pointer\iref{conv.func} +\link{lvalue-to-rvalue}{conv.lval}, +\link{array-to-pointer}{conv.array}, and +\link{function-to-pointer}{conv.func} standard conversions. \end{itemize} \end{itemize} @@ -7117,25 +7094,24 @@ subclause. \pnum -Lvalue-to-rvalue\iref{conv.lval}, array-to-pointer\iref{conv.array}, -and function-to-pointer\iref{conv.func} standard conversions are +\link{Lvalue-to-rvalue}{conv.lval}, \link{array-to-pointer}{conv.array}, +and \link{function-to-pointer}{conv.func} standard conversions are performed on the second and third operands. After those conversions, one of the following shall hold: - \begin{itemize} \item The second and third operands have the same type; the result is of that type and the result object is initialized using the selected operand. \item The second and third operands have arithmetic or enumeration type; -the usual arithmetic conversions\iref{expr.arith.conv} are performed to bring them to a common +the \link{usual arithmetic conversions}{expr.arith.conv} are performed to bring them to a common type, and the result is of that type. \item One or both of the second and third operands have pointer type; -pointer conversions\iref{conv.ptr}, -function pointer conversions\iref{conv.fctptr}, and -qualification conversions\iref{conv.qual} +\link{pointer conversions}{conv.ptr}, +\link{function pointer conversions}{conv.fctptr}, and +\link{qualification conversions}{conv.qual} are performed to bring them to their -composite pointer type\iref{expr.type}. The result is of the composite +\deflink{composite pointer type}{expr.type}. The result is of the composite pointer type. \item One or both of the second and third operands have pointer-to-member type; @@ -7149,7 +7125,6 @@ Both the second and third operands have type \tcode{std::nullptr_t} or one has that type and the other is a null pointer constant. The result is of type \tcode{std::nullptr_t}. - \end{itemize} \rSec2[expr.yield]{Yielding a value}% @@ -7314,7 +7289,7 @@ \pnum \indextext{assignment!conversion by}% If the right operand is an expression, it is implicitly -converted\iref{conv} to the cv-unqualified type of the left +\link{converted}{conv} to the cv-unqualified type of the left operand. \pnum @@ -7328,7 +7303,7 @@ An assignment whose left operand is of a volatile-qualified type is deprecated\iref{depr.volatile.type} unless the (possibly parenthesized) assignment is a discarded-value expression or -an unevaluated operand\iref{term.unevaluated.operand}. +an \deflink{unevaluated operand}{expr.context}. \pnum The behavior of an expression of the form \tcode{E1 \placeholder{op}= E2} @@ -7400,7 +7375,7 @@ A pair of expressions separated by a comma is evaluated left-to-right; the left expression is -a discarded-value expression\iref{expr.prop}. +a \deflink{discarded-value expression}{expr.prop}. The left expression is sequenced before the right expression\iref{intro.execution}. \indextext{operator!side effects and comma}% @@ -7434,7 +7409,7 @@ requirements as detailed in this subclause; other contexts have different semantics depending on whether or not an expression satisfies these requirements. Expressions that satisfy these requirements, -assuming that copy elision\iref{class.copy.elision} is not performed, +assuming that \link{copy elision}{class.copy.elision} is not performed, are called \indexdefn{expression!constant}% \defnx{constant expressions}{constant expression}. @@ -7487,8 +7462,8 @@ An object or reference is \defn{usable in constant expressions} if it is \begin{itemize} \item a variable that is usable in constant expressions, or -\item a template parameter object\iref{temp.param}, or -\item a string literal object\iref{lex.string}, or +\item a \link{template parameter}{temp.param} object, or +\item a \link{string literal}{lex.string} object, or \item a temporary object of non-volatile const-qualified literal type whose lifetime is extended\iref{class.temporary} to that of a variable that is usable in constant expressions, or @@ -7562,7 +7537,7 @@ \end{footnote} \item -an lvalue-to-rvalue conversion\iref{conv.lval} unless +an \link{lvalue-to-rvalue conversion}{conv.lval} unless it is applied to \begin{itemize} \item @@ -7581,7 +7556,7 @@ \item an lvalue-to-rvalue conversion that is applied to -an object with an indeterminate value\iref{basic.indet}; +an object with an \deflinkx{indeterminate value}{value!indeterminate}{basic.indet}; \item an invocation of an implicitly-defined copy/move constructor or @@ -7909,7 +7884,7 @@ Such expressions can be used as bit-field lengths\iref{class.bit}, as enumerator initializers if the underlying type is not fixed\iref{dcl.enum}, -and as alignments\iref{dcl.align}. +and as \link{alignments}{dcl.align}. \end{note} \pnum @@ -7959,9 +7934,8 @@ Such expressions can be used in \keyword{new} expressions\iref{expr.new}, as case expressions\iref{stmt.switch}, as enumerator initializers if the underlying type is -fixed\iref{dcl.enum}, as array bounds\iref{dcl.array}, and -as non-type template -arguments\iref{temp.arg}. +\deflinkx{fixed}{type!underlying!fixed}{dcl.enum}, as \link{array}{dcl.array} bounds, and +as non-type \link{template arguments}{temp.arg}. \end{note} \indextext{contextually converted constant expression of type \tcode{bool}|see{conversion, contextual}}% \indextext{conversion!contextual to constant expression of type \tcode{bool}}% @@ -8238,7 +8212,7 @@ a manifestly constant-evaluated expression, \item -a potentially-evaluated expression\iref{basic.def.odr}, +a \deflinkx{potentially-evaluated}{potentially evaluated}{basic.def.odr} expression, \item an immediate subexpression of a \grammarterm{braced-init-list}, @@ -8265,7 +8239,9 @@ if it is: \begin{itemize} \item -a constexpr function that is named by an expression\iref{basic.def.odr} +a constexpr function that +\deflinkx{is named by}{function!named by expression or conversion}{basic.def.odr} +an expression that is potentially constant evaluated, or \item diff --git a/source/future.tex b/source/future.tex index 4eab361bf9..ec7a2e714d 100644 --- a/source/future.tex +++ b/source/future.tex @@ -14,7 +14,7 @@ Normative for the current revision of \Cpp{}, but having been identified as a candidate for removal from future revisions. An implementation may declare library names and entities described in this Clause with the -\tcode{deprecated} attribute\iref{dcl.attr.deprecated}. +\link{\tcode{deprecated} attribute}{dcl.attr.deprecated}. \rSec1[depr.local]{Non-local use of TU-local entities} @@ -138,11 +138,11 @@ \rSec1[depr.impldec]{Implicit declaration of copy functions} \pnum -The implicit definition of a copy constructor\iref{class.copy.ctor} +The implicit definition of a \link{copy constructor}{class.copy.ctor} as defaulted is deprecated if the class has a user-declared copy assignment operator or -a user-declared destructor\iref{class.dtor}. -The implicit definition of a copy assignment operator\iref{class.copy.assign} +a user-declared \link{destructor}{class.dtor}. +The implicit definition of a \link{copy assignment operator}{class.copy.assign} as defaulted is deprecated if the class has a user-declared copy constructor or a user-declared destructor. @@ -283,7 +283,6 @@ \pnum The header \libheaderrefx{type_traits}{meta.type.synop} has the following addition: - \begin{codeblock} namespace std { template struct is_pod; @@ -323,7 +322,7 @@ \pnum \remarks -\tcode{is_pod} is a \oldconcept{UnaryTypeTrait}\iref{meta.rqmts} +\tcode{is_pod} is a \oldconceptref{UnaryTypeTrait}\iref{meta.rqmts} with a base characteristic of \tcode{true_type} if \tcode{T} is a POD type, and \tcode{false_type} otherwise. @@ -486,7 +485,6 @@ \pnum The header \libheaderref{tuple} has the following additions: - \begin{codeblock} namespace std { template struct tuple_size; @@ -506,9 +504,9 @@ \pnum Let \tcode{TS} denote \tcode{tuple_size} of the cv-unqualified type \tcode{T}. If the expression \tcode{TS::value} is well-formed -when treated as an unevaluated operand\iref{term.unevaluated.operand}, +when treated as an \deflink{unevaluated operand}{expr.context}, then specializations of each of the two templates meet -the \oldconcept{TransformationTrait} requirements with a base characteristic of +the \oldconceptref{TransformationTrait} requirements with a base characteristic of \tcode{integral_constant}. Otherwise, they have no member \tcode{value}. @@ -536,7 +534,7 @@ Let \tcode{TE} denote \tcode{tuple_element_t} of the cv-unqualified type \tcode{T}. Then specializations of each of the two templates meet -the \oldconcept{TransformationTrait} requirements +the \oldconceptref{TransformationTrait} requirements with a member typedef \tcode{type} that names the following type: \begin{itemize} \item for the first specialization, \tcode{add_volatile_t}, and @@ -556,7 +554,6 @@ \pnum The header \libheaderref{variant} has the following additions: - \begin{codeblock} namespace std { template struct variant_size; @@ -577,7 +574,7 @@ Let \tcode{VS} denote \tcode{variant_size} of the cv-unqualified type \tcode{T}. Then specializations of each of the two templates meet -the \oldconcept{UnaryTypeTrait} requirements +the \oldconceptref{UnaryTypeTrait} requirements with a base characteristic of \tcode{integral_constant}. \end{itemdescr} @@ -591,7 +588,7 @@ Let \tcode{VA} denote \tcode{variant_alternative} of the cv-unqualified type \tcode{T}. Then specializations of each of the two templates meet -the \oldconcept{TransformationTrait} requirements +the \oldconceptref{TransformationTrait} requirements with a member typedef \tcode{type} that names the following type: \begin{itemize} \item for the first specialization, \tcode{add_volatile_t}, and @@ -603,7 +600,6 @@ \pnum The header \libheaderrefx{iterator}{iterator.synopsis} has the following addition: - \indexlibraryglobal{iterator}% \begin{codeblock} namespace std { @@ -637,7 +633,6 @@ If a \Cpp{} program wants to define a bidirectional iterator for some data structure containing \tcode{double} and such that it works on a large memory model of the implementation, it can do so with: - \begin{codeblock} class MyIterator : public iterator { @@ -651,7 +646,6 @@ \pnum The following member is declared in addition to those members specified in \ref{move.iter.elem}: - \begin{codeblock} namespace std { template @@ -744,7 +738,6 @@ \pnum The header \libheaderrefx{filesystem}{fs.filesystem.syn} has the following additions: - \indexlibraryglobal{u8path}% \begin{itemdecl} template @@ -825,7 +818,6 @@ \pnum The header \libheaderrefx{atomic}{atomics.syn} has the following additions. - \begin{codeblock} namespace std { template diff --git a/source/intro.tex b/source/intro.tex index 4f2984457d..35a4372bbd 100644 --- a/source/intro.tex +++ b/source/intro.tex @@ -94,8 +94,8 @@ modifications of scalar objects are described in \ref{expr.ass}, \ref{expr.post.incr}, and \ref{expr.pre.incr}. Attempts to read or modify an object of class type -typically invoke a constructor\iref{class.ctor} -or assignment operator\iref{class.copy.assign}; +typically invoke a \deflink{constructor}{class.ctor} +or \link{assignment operator}{class.copy.assign}; such invocations do not themselves constitute accesses, although they may involve accesses of scalar subobjects. \end{defnote} @@ -237,10 +237,11 @@ glvalue refers \begin{example} -If a pointer\iref{dcl.ptr} \tcode{p} whose static type is ``pointer to -class \tcode{B}'' is pointing to an object of class \tcode{D}, derived -from \tcode{B}\iref{class.derived}, the dynamic type of the -expression \tcode{*p} is ``\tcode{D}''. References\iref{dcl.ref} are +If a \link{pointer}{dcl.ptr} \tcode{p} whose static type is ``pointer to +class \tcode{B}'' is pointing to an object of class \tcode{D}, +\link{derived}{class.derived} +from \tcode{B}, the dynamic type of the +expression \tcode{*p} is ``\tcode{D}''. \link{References}{dcl.ref} are treated similarly. \end{example} @@ -308,7 +309,7 @@ \indexdefn{program!ill-formed}% \definition{ill-formed program}{defns.ill.formed} -program that is not well-formed\iref{defns.well.formed} +program that is not \link{well-formed}{defns.well.formed} \indexdefn{behavior!implementation-defined}% \definition{implementation-defined behavior}{defns.impl.defined} @@ -776,7 +777,7 @@ \indextext{conformance requirements!classes}% \indextext{conformance requirements!class templates}% For classes and class templates, the library Clauses specify partial -definitions. Private members\iref{class.access} are not +definitions. \link{Private members}{class.access} are not specified, but each implementation shall supply them to complete the definitions according to the description in the library Clauses. @@ -793,7 +794,7 @@ \pnum The templates, classes, functions, and objects in the library have -external linkage\iref{basic.link}. The implementation provides +external \link{linkage}{basic.link}. The implementation provides definitions for standard library entities, as necessary, while combining translation units to form a complete \Cpp{} program\iref{lex.phases}.% \indextext{conformance requirements!library|)} diff --git a/source/iostreams.tex b/source/iostreams.tex index 34bd3341a7..072fd94abd 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -555,7 +555,7 @@ returns \tcode{\&cout}. Its state is otherwise the same as required for -\tcode{basic_ios::init}\iref{basic.ios.cons}. +\libmemberrefx{basic_ios::init}{basic_ios}{init}. \end{itemdescr} \indexlibraryglobal{cout}% @@ -588,7 +588,7 @@ \tcode{cerr.flags() \& unitbuf} is nonzero and \tcode{cerr.tie()} returns \tcode{\&cout}. Its state is otherwise the same as required for -\tcode{basic_ios::init}\iref{basic.ios.cons}. +\libmemberrefx{basic_ios::init}{basic_ios}{init}. \end{itemdescr} \indexlibraryglobal{clog}% @@ -625,7 +625,7 @@ returns \tcode{\&wcout}. Its state is otherwise the same as required for -\tcode{basic_ios::init}\iref{basic.ios.cons}. +\libmemberrefx{basic_ios::init}{basic_ios}{init}. \end{itemdescr} \indexlibraryglobal{wcout}% @@ -658,7 +658,7 @@ \tcode{wcerr.flags() \& unitbuf} is nonzero and \tcode{wcerr.tie()} returns \tcode{\&wcout}. Its state is otherwise the same as required for -\tcode{basic_ios::init}\iref{basic.ios.cons}. +\libmemberrefx{basic_ios::init}{basic_ios}{init}. \end{itemdescr} \indexlibraryglobal{wclog}% @@ -1378,7 +1378,7 @@ \pnum \returns \tcode{true} -if the previous state of the standard iostream objects\iref{iostream.objects} +if the previous state of the \link{standard iostream objects}{iostream.objects} was synchronized and otherwise returns \tcode{false}. The first time it is called, @@ -1437,8 +1437,8 @@ \pnum \remarks -Concurrent access to this function by multiple threads does not result in a data -race\iref{intro.multithread}. +Concurrent access to this function by multiple threads does not result in a +\deflink{data race}{intro.multithread}. \end{itemdescr} \indexlibrarymember{iword}{ios_base}% @@ -1681,10 +1681,10 @@ It holds a state object whose type is equal to the template parameter \tcode{stateT}. Type \tcode{stateT} shall meet -the \oldconcept{DefaultConstructible} (\tref{cpp17.defaultconstructible}), -\oldconcept{CopyConstructible} (\tref{cpp17.copyconstructible}), -\oldconcept{CopyAssignable} (\tref{cpp17.copyassignable}), and -\oldconcept{Destructible} (\tref{cpp17.destructible}) requirements. +the \oldconceptref{DefaultConstructible} (\tref{cpp17.defaultconstructible}), +\oldconceptref{CopyConstructible} (\tref{cpp17.copyconstructible}), +\oldconceptref{CopyAssignable} (\tref{cpp17.copyassignable}), and +\oldconceptref{Destructible} (\tref{cpp17.destructible}) requirements. If \tcode{is_trivially_copy_constructible_v} is \tcode{true}, then \tcode{fpos} has a trivial copy constructor. If \tcode{is_trivially_copy_assignable_v} is \tcode{true}, @@ -1692,11 +1692,11 @@ If \tcode{is_trivially_destructible_v} is \tcode{true}, then \tcode{fpos} has a trivial destructor. All specializations of \tcode{fpos} meet -the \oldconcept{DefaultConstructible}, -\oldconcept{CopyConstructible}, -\oldconcept{CopyAssignable}, -\oldconcept{Destructible}, -and \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) requirements. +the \oldconceptref{DefaultConstructible}, +\oldconceptref{CopyConstructible}, +\oldconceptref{CopyAssignable}, +\oldconceptref{Destructible}, +and \oldconceptref{EqualityComparable} (\tref{cpp17.equalitycomparable}) requirements. In addition, the expressions shown in \tref{fpos.operations} are valid and have the indicated semantics. In that table, @@ -2025,12 +2025,12 @@ \pnum \effects Calls -\tcode{ios_base::imbue(loc)}\iref{ios.base.locales} +\libmemberrefx{ios_base::imbue}{ios_base}{imbue}\tcode{(loc)} and if \tcode{rdbuf() != 0} then -\tcode{rdbuf()->pubimbue(loc)}\iref{streambuf.locales}. +\tcode{rdbuf()->}\libmemberrefx{pubimbue}{basic_streambuf}{pubimbue}\tcode{(loc)}. \pnum \returns @@ -2102,14 +2102,12 @@ Otherwise assigns to the member objects of \tcode{*this} the corresponding member objects of \tcode{rhs} as follows: - \begin{itemize} \item calls each registered callback pair \tcode{(fn, idx)} as \tcode{(*fn)(erase_event, *this, idx)}; \item then, assigns to the member objects of \tcode{*this} the corresponding member objects of \tcode{rhs}, except that - \begin{itemize} \item \tcode{rdstate()}, \tcode{rdbuf()}, and \tcode{exceptions()} are left unchanged; @@ -3283,7 +3281,7 @@ If a read position is available, returns \tcode{egptr() - gptr()}. Otherwise returns -\tcode{showmanyc()}\iref{streambuf.virt.get}. +\libmemberrefx{showmanyc()}{basic_streambuf}{showmanyc}. \end{itemdescr} \indexlibrarymember{snextc}{basic_streambuf}% @@ -4308,7 +4306,7 @@ template> class basic_istream : virtual public basic_ios { public: - // types (inherited from \tcode{basic_ios}\iref{ios}) + // types (inherited from \link{\tcode{basic_ios}}{ios}) using char_type = charT; using int_type = typename traits::int_type; using pos_type = typename traits::pos_type; @@ -4714,7 +4712,7 @@ \pnum As in the case of the inserters, these extractors depend on the locale's -\tcode{num_get<>}\iref{locale.num.get} object to perform parsing the input +\link{\tcode{num_get<>}}{locale.num.get} object to perform parsing the input stream data. These extractors behave as formatted input functions (as described in~\ref{istream.formatted.reqmts}). After a \tcode{sentry} object is constructed, the conversion occurs as if performed by the following code fragment, @@ -5001,7 +4999,7 @@ \begin{itemdescr} \pnum \effects -Behaves as an unformatted input function\iref{istream.unformatted}. +Behaves as an \link{unformatted input function}{istream.unformatted}. If \tcode{sb} is null, calls \tcode{setstate(fail\-bit)}, which may throw @@ -5396,7 +5394,7 @@ Characters are extracted until any of the following occurs: \begin{itemize} \item -\tcode{n != numeric_limits::max()}\iref{numeric.limits} +\tcode{n != \libmemberrefx{numeric_limits::max()}{numeric_limits}{max}{numeric.limits}} and \tcode{n} characters have been extracted so far; \item @@ -5732,12 +5730,12 @@ \begin{itemdescr} \pnum \effects -Behaves as an unformatted input function\iref{istream.unformatted}, except that it does not count the number of characters extracted and +Behaves as an \link{unformatted input function}{istream.unformatted}, except that it does not count the number of characters extracted and does not affect the value returned by subsequent calls to \tcode{is.gcount()}. After constructing a \tcode{sentry} object extracts characters as long as the next available character \tcode{c} is whitespace or until there are no more characters in the sequence. Whitespace characters are distinguished with the same criterion as used by -\tcode{sentry::sentry}\iref{istream.sentry}. +\link{\tcode{sentry::sentry}}{istream.sentry}. If \tcode{ws} stops extracting characters because there are no more available it sets @@ -5762,7 +5760,7 @@ \pnum \constraints The expression \tcode{is >> std::forward(x)} is well-formed -when treated as an unevaluated operand\iref{term.unevaluated.operand} and +when treated as an \deflink{unevaluated operand}{expr.context} and \tcode{Istream} is publicly and unambiguously derived from \tcode{ios_base}. \pnum @@ -5830,7 +5828,7 @@ Initializes the base class subobjects with \tcode{basic_istream(sb)}\iref{istream} and -\tcode{basic_ostream(sb)}\iref{ostream}. +\link{\tcode{basic_ostream(sb)}}{ostream}. \pnum \ensures @@ -5916,7 +5914,7 @@ template> class basic_ostream : virtual public basic_ios { public: - // types (inherited from \tcode{basic_ios}\iref{ios}) + // types (inherited from \link{\tcode{basic_ios}}{ios}) using char_type = charT; using int_type = typename traits::int_type; using pos_type = typename traits::pos_type; @@ -6685,7 +6683,7 @@ \end{codeblock} where \tcode{s} is an \impldef{NTCTS in \tcode{basic_ostream\& op\-er\-ator<<(nullptr_t)}} -NTCTS\iref{defns.ntcts}. +\link{NTCTS}{defns.ntcts}. \end{itemdescr} \rSec4[ostream.inserters.character]{Character inserter function templates} @@ -6709,7 +6707,7 @@ \begin{itemdescr} \pnum \effects -Behaves as a formatted output function\iref{ostream.formatted.reqmts} +Behaves as a \link{formatted output function}{ostream.formatted.reqmts} of \tcode{out}. Constructs a character sequence \tcode{seq}. If \tcode{c} has type \tcode{char} @@ -7198,7 +7196,6 @@ format flags stored in the \tcode{basic_ostream} object \tcode{cout} (the same as \tcode{cout << noshowbase}). \end{footnote} - \begin{codeblock} void f(ios_base& str, ios_base::fmtflags mask) { // reset specified flags @@ -7237,7 +7234,6 @@ behaves as if it called \tcode{f(in, mask)}, where the function \tcode{f} is defined as: \indexlibrarymember{fmtflags}{ios_base}% - \begin{codeblock} void f(ios_base& str, ios_base::fmtflags mask) { // set specified flags @@ -7283,7 +7279,6 @@ \tcode{in >> setbase(base)} behaves as if it called \tcode{f(in, base)}, where the function \tcode{f} is defined as: - \begin{codeblock} void f(ios_base& str, int base) { // set \tcode{basefield} @@ -7326,7 +7321,6 @@ \tcode{out << setfill(c)} behaves as if it called \tcode{f(out, c)}, where the function \tcode{f} is defined as: - \begin{codeblock} template void f(basic_ios& str, charT c) { @@ -7367,7 +7361,6 @@ \tcode{in >> setprecision(n)} behaves as if it called \tcode{f(in, n)}, where the function \tcode{f} is defined as: - \begin{codeblock} void f(ios_base& str, int n) { // set precision @@ -7413,7 +7406,6 @@ \tcode{in >> setw(n)} behaves as if it called \tcode{f(in, n)}, where the function \tcode{f} is defined as: - \begin{codeblock} void f(ios_base& str, int n) { // set width @@ -7455,7 +7447,7 @@ \pnum \effects The expression \tcode{in >> get_money(mon, intl)} described below -behaves as a formatted input function\iref{istream.formatted.reqmts}. +behaves as a \link{formatted input function}{istream.formatted.reqmts}. \pnum \returns @@ -7463,7 +7455,6 @@ \tcode{in} is an object of type \tcode{basic_istream} then the expression \tcode{in >> get_money(mon, intl)} behaves as if it called \tcode{f(in, mon, intl)}, where the function \tcode{f} is defined as: - \begin{codeblock} template void f(basic_ios& str, moneyT& mon, bool intl) { @@ -7500,9 +7491,8 @@ An object of unspecified type such that if \tcode{out} is an object of type \tcode{basic_ostream} then the expression \tcode{out << put_money(mon, intl)} behaves as a -formatted output function\iref{ostream.formatted.reqmts} that calls +\link{formatted output function}{ostream.formatted.reqmts} that calls \tcode{f(out, mon, intl)}, where the function \tcode{f} is defined as: - \begin{codeblock} template void f(basic_ios& str, const moneyT& mon, bool intl) { @@ -7538,7 +7528,6 @@ \tcode{basic_istream} then the expression \tcode{in >> get_time(tmb, fmt)} behaves as if it called \tcode{f(in, tmb, fmt)}, where the function \tcode{f} is defined as: - \begin{codeblock} template void f(basic_ios& str, tm* tmb, const charT* fmt) { @@ -7577,7 +7566,6 @@ type \tcode{basic_ostream} then the expression \tcode{out << put_time(tmb, fmt)} behaves as if it called \tcode{f(out, tmb, fmt)}, where the function \tcode{f} is defined as: - \begin{codeblock} template void f(basic_ios& str, const tm* tmb, const charT* fmt) { @@ -7624,7 +7612,7 @@ \tcode{charT} and with member type \tcode{traits_type}, which in the second and third forms is the same as \tcode{traits}, then the expression \tcode{out << quoted(s, delim, escape)} -behaves as a formatted output function\iref{ostream.formatted.reqmts} +behaves as a \link{formatted output function}{ostream.formatted.reqmts} of \tcode{out}. This forms a character sequence \tcode{seq}, initially consisting of the following elements: \begin{itemize} @@ -11413,7 +11401,6 @@ sequence as if by reading from the associated file into an internal buffer (\tcode{extern_buf}) and then as if by doing: - \begin{codeblock} char extern_buf[XSIZE]; char* extern_end; @@ -12953,7 +12940,7 @@ \pnum \tcode{Allocator} shall meet -the \oldconcept{Allocator} requirements\iref{allocator.requirements.general}. +the \oldconceptref{Allocator} requirements\iref{allocator.requirements.general}. \pnum \begin{example} @@ -13246,7 +13233,7 @@ \pnum Template parameters named \tcode{InputIterator} shall meet the -\oldconcept{InputIterator} requirements\iref{input.iterators} and shall +\oldconceptref{InputIterator} requirements\iref{input.iterators} and shall have a value type that is one of the encoded character types. \pnum @@ -13260,7 +13247,7 @@ \pnum Template parameters named \tcode{Allocator} shall meet -the \oldconcept{Allocator} requirements\iref{allocator.requirements.general}. +the \oldconceptref{Allocator} requirements\iref{allocator.requirements.general}. \rSec2[fs.filesystem.syn]{Header \tcode{} synopsis} @@ -13897,8 +13884,7 @@ \pnum \indextext{path!normalization|(}% -\defnx{Normalization}{normalization!path|see{path, normalization}} of a generic format pathname means: - +\defnx{Normalization}{normalization!path} of a generic format pathname means: \begin{enumerate} \item If the path is empty, stop. \item Replace each slash character in the \grammarterm{root-name} with a \grammarterm{preferred-separator}. @@ -14074,7 +14060,7 @@ \item \tcode{basic_string_view}. A function argument \tcode{const Source\&} \tcode{source} shall have an effective range \range{source.begin()}{source.end()}. -\item A type meeting the \oldconcept{InputIterator} requirements that iterates over a NTCTS\@. +\item A type meeting the \oldconceptref{InputIterator} requirements that iterates over a NTCTS\@. The value type shall be an encoded character type. A function argument \tcode{const Source\&} \tcode{source} shall have an effective range \range{source}{end} where \tcode{end} is the first @@ -14104,7 +14090,7 @@ \pnum \begin{note} -See path conversions\iref{fs.path.cvt} +See \link{path conversions}{fs.path.cvt} for how the value types above and their encodings convert to \tcode{path::value_type} and its encoding. \end{note} @@ -14704,7 +14690,7 @@ \pnum Generic format observer functions return strings formatted according to the -generic pathname format\iref{fs.path.generic}. +\link{generic pathname format}{fs.path.generic}. A single slash (\tcode{'/'}) character is used as the \grammarterm{directory-separator}. @@ -15247,11 +15233,11 @@ \indexlibrarymember{path}{iterator}% \pnum Path iterators iterate over the elements of the pathname -in the generic format\iref{fs.path.generic}. +in the \link{generic format}{fs.path.generic}. \pnum A \tcode{path::iterator} is a constant iterator meeting all the -requirements of a bidirectional iterator\iref{bidirectional.iterators} +requirements of a \link{bidirectional iterator}{bidirectional.iterators} except that, for dereferenceable iterators \tcode{a} and \tcode{b} of type \tcode{path::iterator} @@ -16554,7 +16540,7 @@ \pnum \tcode{directory_iterator} meets the -\oldconcept{InputIterator} requirements\iref{input.iterators}. +\oldconceptref{InputIterator} requirements\iref{input.iterators}. \pnum If an iterator of type \tcode{directory_iterator} reports an error or @@ -16608,7 +16594,7 @@ construction of a \tcode{directory_iterator} for the directory, it is unspecified whether or not subsequently incrementing the iterator will ever result in an iterator referencing the removed or added directory entry. See -POSIX \tcode{readdir}. +POSIX \weblink{\tcode{readdir}}{http://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html}. \end{note} \rSec3[fs.dir.itr.members]{Members} @@ -16700,7 +16686,7 @@ \pnum \effects As specified for the prefix increment operation of -Input iterators\iref{input.iterators}. +\link{Input iterators}{input.iterators}. \pnum \returns @@ -17012,9 +16998,8 @@ \pnum \effects As specified for the prefix increment operation of -Input iterators\iref{input.iterators}, +\link{Input iterators}{input.iterators}, except that: - \begin{itemize} \item If there are no more entries at the current depth, then if \tcode{depth() != 0} iteration over the parent directory resumes; otherwise \tcode{*this = recursive_directory_iterator()}. @@ -17358,16 +17343,16 @@ \pnum \begin{example} Given this directory structure: -\begin{codeblock} +\begin{outputblock} /dir1 file1 file2 dir2 file3 -\end{codeblock} +\end{outputblock} Calling \tcode{copy("/dir1", "/dir3")} would result in: -\begin{codeblock} +\begin{outputblock} /dir1 file1 file2 @@ -17376,10 +17361,10 @@ /dir3 file1 file2 -\end{codeblock} +\end{outputblock} Alternatively, calling \tcode{copy("/dir1", "/dir3", copy_options::recursive)} would result in: -\begin{codeblock} +\begin{outputblock} /dir1 file1 file2 @@ -17390,7 +17375,7 @@ file2 dir2 file3 -\end{codeblock} +\end{outputblock} \end{example} \end{itemdescr} @@ -17603,7 +17588,7 @@ \begin{itemdescr} \pnum \effects -Establishes the postcondition, as if by POSIX \tcode{symlink()}. +Establishes the postcondition, as if by POSIX \weblink{\tcode{symlink()}}{http://pubs.opengroup.org/onlinepubs/9699919799/functions/symlink.html}. \pnum \ensures @@ -17679,7 +17664,7 @@ \begin{itemdescr} \pnum \effects -Establishes the postcondition, as if by POSIX \tcode{symlink()}. +Establishes the postcondition, as if by POSIX \weblink{\tcode{symlink()}}{http://pubs.opengroup.org/onlinepubs/9699919799/functions/symlink.html}. \pnum \ensures @@ -17712,7 +17697,7 @@ \returns The absolute path of the current working directory, whose pathname in the native format is - obtained as if by POSIX \tcode{getcwd()}. + obtained as if by POSIX \weblink{\tcode{getcwd()}}{http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html}. The signature with argument \tcode{ec} returns \tcode{path()} if an error occurs. @@ -17749,7 +17734,7 @@ \begin{itemdescr} \pnum \effects -Establishes the postcondition, as if by POSIX \tcode{chdir()}. +Establishes the postcondition, as if by POSIX \weblink{\tcode{chdir()}}{http://pubs.opengroup.org/onlinepubs/9699919799/functions/chdir.html}. \pnum \ensures @@ -17860,7 +17845,7 @@ \item If \tcode{is_regular_file(p)}, the size in bytes of the file \tcode{p} resolves to, determined as if by the value of the POSIX \tcode{stat} - class member \tcode{st_size} obtained as if by POSIX \tcode{stat()}. + class member \tcode{st_size} obtained as if by POSIX \weblink{\tcode{stat()}}{http://pubs.opengroup.org/onlinepubs/9699919799/functions/stat.html}. \item Otherwise, the result is \impldef{result of \tcode{filesystem::file_size}}. \end{itemize} @@ -18242,7 +18227,7 @@ \pnum \effects Sets the time of last data modification of the file - resolved to by \tcode{p} to \tcode{new_time}, as if by POSIX \tcode{futimens()}. + resolved to by \tcode{p} to \tcode{new_time}, as if by POSIX \weblink{\tcode{futimens()}}{http://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html}. \pnum \throws diff --git a/source/iterators.tex b/source/iterators.tex index e1c8f73ad0..804e0b7d64 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -715,7 +715,7 @@ \pnum \indextext{iterator!constexpr}% -Iterators meet the \defn{constexpr iterator} requirements +Iterators meet the \defnadjx{constexpr}{iterators}{iterator} requirements if all operations provided to meet iterator category requirements are constexpr functions. \begin{note} @@ -934,7 +934,6 @@ \pnum The definitions in this subclause make use of the following exposition-only concepts: - \begin{codeblock} template concept @\defexposconcept{cpp17-iterator}@ = @@ -992,7 +991,6 @@ \pnum The members of a specialization \tcode{iterator_traits} generated from the \tcode{iterator_traits} primary template are computed as follows: - \begin{itemize} \item If \tcode{I} has valid\iref{temp.deduct} member @@ -1141,7 +1139,6 @@ a customization point object\iref{customization.point.object}. The expression \tcode{ranges::\-iter_move(E)} for a subexpression \tcode{E} is expression-equivalent to: - \begin{itemize} \item \tcode{iter_move(E)}, if \tcode{E} has class or enumeration type and @@ -2780,7 +2777,6 @@ A program-defined iterator \tcode{BinaryTreeIterator} can be included into the bidirectional iterator category by specializing the \tcode{iterator_traits} template: - \begin{codeblock} template struct iterator_traits> { using iterator_category = bidirectional_iterator_tag; @@ -2798,7 +2794,6 @@ \tcode{evolve()} is well-defined for bidirectional iterators, but can be implemented more efficiently for random access iterators, then the implementation is as follows: - \begin{codeblock} template inline void @@ -3406,7 +3401,6 @@ Iterator tmp = current; return *--tmp; \end{codeblock} - \end{itemdescr} \indexlibrarymember{operator->}{reverse_iterator}% @@ -4788,7 +4782,6 @@ vector v2(make_move_iterator(s.begin()), make_move_iterator(s.end())); // moves strings into \tcode{v2} \end{codeblock} - \end{example} \rSec3[move.iterator]{Class template \tcode{move_iterator}} @@ -6507,7 +6500,6 @@ istream_iterator(), ostream_iterator(cout, "@\textbackslash@n")); \end{codeblock} - reads a file containing floating-point numbers from \tcode{cin}, and prints the partial sums onto @@ -6861,7 +6853,7 @@ The class template \tcode{istreambuf_iterator} -defines an input iterator\iref{input.iterators} that +defines an \link{input iterator}{input.iterators} that reads successive \textit{characters} from the streambuf for which it was constructed. @@ -6986,7 +6978,6 @@ Initializes \tcode{sbuf_} with \keyword{nullptr}. \end{itemdescr} - \indexlibraryctor{istreambuf_iterator}% \begin{itemdecl} istreambuf_iterator(istream_type& s) noexcept; @@ -6998,7 +6989,6 @@ Initializes \tcode{sbuf_} with \tcode{s.rdbuf()}. \end{itemdescr} - \indexlibraryctor{istreambuf_iterator}% \begin{itemdecl} istreambuf_iterator(streambuf_type* s) noexcept; @@ -7010,7 +7000,6 @@ Initializes \tcode{sbuf_} with \tcode{s}. \end{itemdescr} - \indexlibraryctor{istreambuf_iterator}% \begin{itemdecl} istreambuf_iterator(const @\placeholder{proxy}@& p) noexcept; @@ -7161,7 +7150,6 @@ Initializes \tcode{sbuf_} with \tcode{s.rdbuf()}. \end{itemdescr} - \indexlibraryctor{ostreambuf_iterator}% \begin{itemdecl} ostreambuf_iterator(streambuf_type* s) noexcept; diff --git a/source/lex.tex b/source/lex.tex index 73dd7f788c..d6d3a5bcc2 100644 --- a/source/lex.tex +++ b/source/lex.tex @@ -29,8 +29,8 @@ \indextext{compilation!separate|(}% The text of the program is kept in units called \defnx{source files}{source file} in this document. -A source file together with all the headers\iref{headers} -and source files included\iref{cpp.include} via the preprocessing +A source file together with all the \link{headers}{headers} +and source files \link{included}{cpp.include} via the preprocessing directive \tcode{\#include}, less any source lines skipped by any of the conditional inclusion\iref{cpp.cond} preprocessing directives, as modified by the implementation-defined behavior of any @@ -50,8 +50,8 @@ calls to functions whose identifiers have external or module linkage, manipulation of objects whose identifiers have external or module linkage, or manipulation of data files. Translation units can be separately -translated and then later linked to produce an executable -program\iref{basic.link}. +translated and then later \link{linked}{basic.link} to produce an executable +program. \end{note} \indextext{compilation!separate|)} @@ -566,7 +566,7 @@ \item \indextext{literal!string!raw}% If the next character begins a sequence of characters that could be the prefix -and initial double quote of a raw string literal, such as \tcode{R"}, the next preprocessing +and initial double quote of a raw string literal, such as \literaltcode{R"}, the next preprocessing token shall be a raw string literal. Between the initial and final double quote characters of the raw string, any transformations performed in phase 2 (line splicing) are reverted; this reversion @@ -574,7 +574,7 @@ parenthesis is identified. The raw string literal is defined as the shortest sequence of characters that matches the raw-string pattern \begin{ncbnf} -\opt{encoding-prefix} \terminal{R} raw-string +\opt{encoding-prefix} \literalterminal{R} raw-string \end{ncbnf} \item Otherwise, if the next three characters are \tcode{<::} and the subsequent character @@ -594,7 +594,6 @@ \item within a \grammarterm{has-include-expression}. - \end{itemize} \end{itemize} @@ -694,15 +693,15 @@ \begin{bnf} \nontermdef{pp-number}\br digit\br - \terminal{.} digit\br + \literalterminal{.} digit\br pp-number identifier-continue\br - pp-number \terminal{'} digit\br - pp-number \terminal{'} nondigit\br - pp-number \terminal{e} sign\br - pp-number \terminal{E} sign\br - pp-number \terminal{p} sign\br - pp-number \terminal{P} sign\br - pp-number \terminal{.} + pp-number \literalterminal{'} digit\br + pp-number \literalterminal{'} nondigit\br + pp-number \literalterminal{e} sign\br + pp-number \literalterminal{E} sign\br + pp-number \literalterminal{p} sign\br + pp-number \literalterminal{P} sign\br + pp-number \literalterminal{.} \end{bnf} \pnum @@ -1123,19 +1122,19 @@ \nontermdef{binary-literal}\br \terminal{0b} binary-digit\br \terminal{0B} binary-digit\br - binary-literal \opt{\terminal{'}} binary-digit + binary-literal \opt{\literalterminal{'}} binary-digit \end{bnf} \begin{bnf} \nontermdef{octal-literal}\br \terminal{0}\br - octal-literal \opt{\terminal{'}} octal-digit + octal-literal \opt{\literalterminal{'}} octal-digit \end{bnf} \begin{bnf} \nontermdef{decimal-literal}\br nonzero-digit\br - decimal-literal \opt{\terminal{'}} digit + decimal-literal \opt{\literalterminal{'}} digit \end{bnf} \begin{bnf} @@ -1166,14 +1165,14 @@ \begin{bnf} \nontermdef{hexadecimal-digit-sequence}\br hexadecimal-digit\br - hexadecimal-digit-sequence \opt{\terminal{'}} hexadecimal-digit + hexadecimal-digit-sequence \opt{\literalterminal{'}} hexadecimal-digit \end{bnf} \begin{bnf} \nontermdef{hexadecimal-digit} \textnormal{one of}\br - \terminal{0 1 2 3 4 5 6 7 8 9}\br - \terminal{a b c d e f}\br - \terminal{A B C D E F} + \literalterminal{0 1 2 3 4 5 6 7 8 9}\br + \literalterminal{a b c d e f}\br + \literalterminal{A B C D E F} \end{bnf} \begin{bnf} @@ -1188,17 +1187,17 @@ \begin{bnf} \nontermdef{unsigned-suffix} \textnormal{one of}\br - \terminal{u U} + \literalterminal{u U} \end{bnf} \begin{bnf} \nontermdef{long-suffix} \textnormal{one of}\br - \terminal{l L} + \literalterminal{l L} \end{bnf} \begin{bnf} \nontermdef{long-long-suffix} \textnormal{one of}\br - \terminal{ll LL} + \literalterminal{ll LL} \end{bnf} \begin{bnf} @@ -1237,7 +1236,7 @@ \pnum The \grammarterm{hexadecimal-digit}s -\tcode{a} through \tcode{f} and \tcode{A} through \tcode{F} +\literaltcode{a} through \literaltcode{f} and \literaltcode{A} through \literaltcode{F} have decimal values ten through fifteen. \begin{example} The number twelve can be written \tcode{12}, \tcode{014}, @@ -1281,7 +1280,7 @@ & & \tcode{unsigned long long int}\\\hline -\tcode{u} or \tcode{U} & +\literaltcode{u} or \literaltcode{U} & \tcode{unsigned int} & \tcode{unsigned int}\\ & @@ -1290,7 +1289,7 @@ & \tcode{unsigned long long int} & \tcode{unsigned long long int}\\\hline -\tcode{l} or \tcode{L} & +\literaltcode{l} or \literaltcode{L} & \tcode{long int} & \tcode{long int}\\ & @@ -1302,22 +1301,22 @@ & & \tcode{unsigned long long int}\\\hline -Both \tcode{u} or \tcode{U} & +Both \literaltcode{u} or \literaltcode{U} & \tcode{unsigned long int} & \tcode{unsigned long int}\\ -and \tcode{l} or \tcode{L} & +and \literaltcode{l} or \literaltcode{L} & \tcode{unsigned long long int} & \tcode{unsigned long long int}\\\hline -\tcode{ll} or \tcode{LL} & +\literaltcode{ll} or \literaltcode{LL} & \tcode{long long int} & \tcode{long long int}\\ & & \tcode{unsigned long long int}\\\hline -Both \tcode{u} or \tcode{U} & +Both \literaltcode{u} or \literaltcode{U} & \tcode{unsigned long long int} & \tcode{unsigned long long int}\\ -and \tcode{ll} or \tcode{LL} & +and \literaltcode{ll} or \literaltcode{LL} & & \\\hline \tcode{z} or \tcode{Z} & @@ -1365,12 +1364,12 @@ \indextext{literal!character}% \begin{bnf} \nontermdef{character-literal}\br - \opt{encoding-prefix} \terminal{'} c-char-sequence \terminal{'} + \opt{encoding-prefix} \literalterminal{'} c-char-sequence \literalterminal{'} \end{bnf} \begin{bnf} \nontermdef{encoding-prefix} \textnormal{one of}\br - \terminal{u8}\quad\terminal{u}\quad\terminal{U}\quad\terminal{L} + \literalterminal{u8}\quad\literalterminal{u}\quad\literalterminal{U}\quad\literalterminal{L} \end{bnf} \begin{bnf} @@ -1423,16 +1422,16 @@ \begin{bnf} \nontermdef{octal-escape-sequence}\br - \terminal{\textbackslash} octal-digit\br - \terminal{\textbackslash} octal-digit octal-digit\br - \terminal{\textbackslash} octal-digit octal-digit octal-digit\br - \terminal{\textbackslash o\{} simple-octal-digit-sequence \terminal{\}}\br + \literalterminal{\textbackslash} octal-digit\br + \literalterminal{\textbackslash} octal-digit octal-digit\br + \literalterminal{\textbackslash} octal-digit octal-digit octal-digit\br + \literalterminal{\textbackslash o\{} simple-octal-digit-sequence \literalterminal{\}}\br \end{bnf} \begin{bnf} \nontermdef{hexadecimal-escape-sequence}\br - \terminal{\textbackslash x} simple-hexadecimal-digit-sequence\br - \terminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \terminal{\}} + \literalterminal{\textbackslash x} simple-hexadecimal-digit-sequence\br + \literalterminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \literalterminal{\}} \end{bnf} \begin{bnf} @@ -1620,42 +1619,42 @@ \begin{bnf} \nontermdef{fractional-constant}\br - \opt{digit-sequence} \terminal{.} digit-sequence\br - digit-sequence \terminal{.} + \opt{digit-sequence} \literalterminal{.} digit-sequence\br + digit-sequence \literalterminal{.} \end{bnf} \begin{bnf} \nontermdef{hexadecimal-fractional-constant}\br - \opt{hexadecimal-digit-sequence} \terminal{.} hexadecimal-digit-sequence\br - hexadecimal-digit-sequence \terminal{.} + \opt{hexadecimal-digit-sequence} \literalterminal{.} hexadecimal-digit-sequence\br + hexadecimal-digit-sequence \literalterminal{.} \end{bnf} \begin{bnf} \nontermdef{exponent-part}\br - \terminal{e} \opt{sign} digit-sequence\br - \terminal{E} \opt{sign} digit-sequence + \literalterminal{e} \opt{sign} digit-sequence\br + \literalterminal{E} \opt{sign} digit-sequence \end{bnf} \begin{bnf} \nontermdef{binary-exponent-part}\br - \terminal{p} \opt{sign} digit-sequence\br - \terminal{P} \opt{sign} digit-sequence + \literalterminal{p} \opt{sign} digit-sequence\br + \literalterminal{P} \opt{sign} digit-sequence \end{bnf} \begin{bnf} \nontermdef{sign} \textnormal{one of}\br - \terminal{+ -} + \literalterminal{+ -} \end{bnf} \begin{bnf} \nontermdef{digit-sequence}\br digit\br - digit-sequence \opt{\terminal{'}} digit + digit-sequence \opt{\literalterminal{'}} digit \end{bnf} \begin{bnf} \nontermdef{floating-point-suffix} \textnormal{one of}\br - \terminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16} + \literalterminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16} \end{bnf} \pnum @@ -1683,13 +1682,13 @@ \topline \lhdr{\grammarterm{floating-point-suffix}} & \rhdr{type} \\ \capsep none & \keyword{double} \\ -\tcode{f} or \tcode{F} & \keyword {float} \\ -\tcode{l} or \tcode{L} & \keyword{long} \keyword{double} \\ -\tcode{f16} or \tcode{F16} & \tcode{std::float16_t} \\ -\tcode{f32} or \tcode{F32} & \tcode{std::float32_t} \\ -\tcode{f64} or \tcode{F64} & \tcode{std::float64_t} \\ -\tcode{f128} or \tcode{F128} & \tcode{std::float128_t} \\ -\tcode{bf16} or \tcode{BF16} & \tcode{std::bfloat16_t} \\ +\literaltcode{f} or \literaltcode{F} & \keyword {float} \\ +\literaltcode{l} or \literaltcode{L} & \keyword{long} \keyword{double} \\ +\literaltcode{f16} or \literaltcode{F16} & \literaltcode{std::float16_t} \\ +\literaltcode{f32} or \literaltcode{F32} & \literaltcode{std::float32_t} \\ +\literaltcode{f64} or \literaltcode{F64} & \literaltcode{std::float64_t} \\ +\literaltcode{f128} or \literaltcode{F128} & \literaltcode{std::float128_t} \\ +\literaltcode{bf16} or \literaltcode{BF16} & \literaltcode{std::bfloat16_t} \\ \end{simpletypetable} \pnum @@ -1740,8 +1739,8 @@ \indextext{literal!string}% \begin{bnf} \nontermdef{string-literal}\br - \opt{encoding-prefix} \terminal{"} \opt{s-char-sequence} \terminal{"}\br - \opt{encoding-prefix} \terminal{R} raw-string + \opt{encoding-prefix} \literalterminal{"} \opt{s-char-sequence} \literalterminal{"}\br + \opt{encoding-prefix} \literalterminal{R} raw-string \end{bnf} \begin{bnf} @@ -1765,7 +1764,7 @@ \begin{bnf} \nontermdef{raw-string}\br - \terminal{"} \opt{d-char-sequence} \terminal{(} \opt{r-char-sequence} \terminal{)} \opt{d-char-sequence} \terminal{"} + \literalterminal{"} \opt{d-char-sequence} \literalterminal{(} \opt{r-char-sequence} \literalterminal{)} \opt{d-char-sequence} \literalterminal{"} \end{bnf} \begin{bnf} @@ -1852,7 +1851,7 @@ \pnum \indextext{literal!string!raw}% -A \grammarterm{string-literal} that has an \tcode{R} +A \grammarterm{string-literal} that has an \literaltcode{R} \indextext{prefix!\idxcode{R}}% in the prefix is a \defn{raw string literal}. The \grammarterm{d-char-sequence} serves as a delimiter. The terminating @@ -2239,7 +2238,7 @@ \pnum If \placeholder{L} is a \grammarterm{user-defined-character-literal}, let \placeholder{ch} be the literal without its \grammarterm{ud-suffix}. -\placeholder{S} shall contain a literal operator\iref{over.literal} whose only parameter has +\placeholder{S} shall contain a \deflinkx{literal operator}{literal!operator}{over.literal} whose only parameter has the type of \placeholder{ch} and the literal \placeholder{L} is treated as a call of the form diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 4698b64fd6..b9fe43700b 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -101,7 +101,7 @@ regular expression matching and searching. \pnum -The numerics library\iref{numerics} provides +The \link{numerics library}{numerics} provides numeric algorithms and complex number components that extend support for numeric processing. The \tcode{valarray} @@ -196,7 +196,6 @@ For example, if a Clause does not specify any requirements, there will be no ``Requirements'' subclause. \end{footnote} - \begin{itemize} \item Summary \item Requirements @@ -213,7 +212,6 @@ \pnum The contents of the summary and the detailed specifications include: - \begin{itemize} \item macros \item values @@ -230,7 +228,6 @@ \indextext{requirements}% Requirements describe constraints that shall be met by a \Cpp{} program that extends the standard library. Such extensions are generally one of the following: - \begin{itemize} \item Template arguments \item Derived classes @@ -305,7 +302,6 @@ \pnum The detailed specifications each contain the following elements:% - \begin{itemize} \item name and brief description \item synopsis (class definition or function declaration, as appropriate) @@ -322,7 +318,6 @@ For example, if a class does not specify any comparison operator functions, there will be no ``Comparison operator functions'' subclause. \end{footnote} - \begin{itemize} \item constructor(s) and destructor \item copying, moving \& assignment functions @@ -340,7 +335,6 @@ For example, if a function specifies no preconditions, there will be no \expects element. \end{footnote} - \begin{itemize} \item \constraints @@ -481,8 +475,8 @@ Subclause \ref{conventions} describes several editorial conventions used to describe the contents of the \Cpp{} standard library. These conventions are for describing -implementation-defined types\iref{type.descriptions}, -and member functions\iref{functions.within.classes}. +\link{implementation-defined types}{type.descriptions}, +and \link{member functions}{functions.within.classes}. \rSec3[expos.only.entity]{Exposition-only entities, etc.} @@ -576,7 +570,6 @@ \pnum The enumerated type \tcode{\placeholder{enumerated}} can be written: - \begin{codeblock} enum @\placeholder{enumerated}@ { @$\tcode{\placeholder{V}}_{0}$@, @$\tcode{\placeholder{V}}_{1}$@, @$\tcode{\placeholder{V}}_{2}$@, @$\tcode{\placeholder{V}}_{3}$@, @$\ldots$@ }; @@ -604,12 +597,11 @@ Each bitmask type can be implemented as an enumerated type that overloads certain operators, as an integer type, or as a -\tcode{bitset}\iref{template.bitset}. +\link{\tcode{bitset}}{template.bitset}. \indextext{type!enumerated}% \pnum The bitmask type \tcode{\placeholder{bitmask}} can be written: - \begin{codeblock} // For exposition only. // \tcode{int_type} is an integral type capable of representing all values of the bitmask type. @@ -686,7 +678,6 @@ The C standard library makes widespread use \indextext{library!C standard}% of characters and character sequences that follow a few uniform conventions: - \begin{itemize} \item Properties specified as \defn{locale-specific} @@ -730,7 +721,7 @@ \item A \defn{character sequence} -is an array object\iref{dcl.array} \tcode{\placeholdernc{A}} that +is an \link{array object}{dcl.array} \tcode{\placeholdernc{A}} that can be declared as \tcode{\placeholdernc{T\;A}[\placeholder{N}]}, where \tcode{\placeholder{T}} is any of the types @@ -880,7 +871,7 @@ \pnum \ref{\firstlibchapter} through \ref{\lastlibchapter} and \ref{depr} do not specify the representation of classes, and intentionally -omit specification of class members\iref{class.mem}. An implementation may +omit specification of \link{class members}{class.mem}. An implementation may define static or non-static class members, or both, as needed to implement the semantics of the member functions specified in \ref{\firstlibchapter} through \ref{\lastlibchapter} and \ref{depr}. @@ -891,7 +882,6 @@ private members of classes that meet the external specifications of the classes. The declarations for such members are followed by a comment that ends with \expos, as in: - \begin{codeblock} streambuf* sb; // \expos \end{codeblock} @@ -1286,10 +1276,10 @@ Except as noted in \ref{library} through \ref{\lastlibchapter} and \ref{depr}, the contents of each header \tcode{c\placeholder{name}} is the same as that of the corresponding header \tcode{\placeholder{name}.h} as -specified in the C standard library\iref{intro.refs}. +specified in the \deflinkx{C standard library}{C!standard library}{intro.refs}. In the \Cpp{} standard library, however, the declarations (except for names which are defined as macros in C) are within -namespace scope\iref{basic.scope.namespace} of the namespace \tcode{std}. +\link{namespace scope}{basic.scope.namespace} of the namespace \tcode{std}. It is unspecified whether these names (including any overloads added in \ref{\firstlibchapter} through \ref{\lastlibchapter} and \ref{depr}) are first declared within the global namespace scope @@ -1596,8 +1586,8 @@ \pnum Subclause \ref{using} describes how a \Cpp{} program gains access to the facilities of the \Cpp{} standard library. \ref{using.headers} describes effects during translation -phase 4, while~\ref{using.linkage} describes effects during phase -8\iref{lex.phases}. +phase 4, while~\ref{using.linkage} describes effects during \link{phase +8}{lex.phases}. \rSec3[using.headers]{Headers} @@ -1640,7 +1630,7 @@ \rSec3[using.linkage]{Linkage} \pnum -Entities in the \Cpp{} standard library have external linkage\iref{basic.link}. +Entities in the \Cpp{} standard library have \link{external linkage}{basic.link}. Unless otherwise specified, objects and functions have the default \tcode{extern "C++"} linkage\iref{dcl.link}. @@ -1674,8 +1664,8 @@ \indextext{startup!program}% \pnum See also -replacement functions\iref{replacement.functions}, -runtime changes\iref{handler.functions}. +\link{replacement functions}{replacement.functions}, +\link{runtime changes}{handler.functions}. \rSec2[utility.requirements]{Requirements on types and expressions} @@ -1723,7 +1713,7 @@ In general, a default constructor is not required. Certain container class member function signatures specify \tcode{T()} as a default argument. \tcode{T()} shall be a well-defined expression\iref{dcl.init} if one of those -signatures is called using the default argument\iref{dcl.fct.default}. +signatures is called using the \link{default argument}{dcl.fct.default}. \begin{oldconcepttable}{EqualityComparable}{}{cpp17.equalitycomparable} {x{1in}x{1in}p{3in}} @@ -1780,7 +1770,7 @@ }\\ \end{oldconcepttable} -\begin{oldconcepttable}{CopyConstructible}{ (in addition to \oldconcept{MoveConstructible})}{cpp17.copyconstructible} +\begin{oldconcepttable}{CopyConstructible}{ (in addition to \oldconceptref{MoveConstructible})}{cpp17.copyconstructible} {p{1in}p{4.15in}} \topline \hdstyle{Expression} & \hdstyle{Post-condition} \\ \capsep @@ -1807,7 +1797,7 @@ }\\ \end{oldconcepttable} -\begin{oldconcepttable}{CopyAssignable}{ (in addition to \oldconcept{MoveAssignable})}{cpp17.copyassignable} +\begin{oldconcepttable}{CopyAssignable}{ (in addition to \oldconceptref{MoveAssignable})}{cpp17.copyassignable} {p{1in}p{1in}p{1in}p{1.9in}} \topline \hdstyle{Expression} & \hdstyle{Return type} & \hdstyle{Return value} & \hdstyle{Post-condition} \\ \capsep @@ -1821,7 +1811,7 @@ \tcode{u.\~T()} & All resources owned by \tcode{u} are reclaimed, no exception is propagated. \\ \rowsep \multicolumn{2}{|l|}{ \begin{tailnote} - Array types and non-object types are not \oldconcept{Destructible}. + Array types and non-object types are not \oldconceptref{Destructible}. \end{tailnote} } \\ \end{oldconcepttable} @@ -1840,7 +1830,6 @@ evaluated in the context described below, and \item these expressions have the following effects: - \begin{itemize} \item the object referred to by \tcode{t} has the value originally held by \tcode{u} and \item the object referred to by \tcode{u} has the value originally held by \tcode{t}. @@ -1849,13 +1838,13 @@ \pnum The context in which \tcode{swap(t, u)} and \tcode{swap(u, t)} are evaluated shall -ensure that a binary non-member function named ``swap'' is selected via overload -resolution\iref{over.match} on a candidate set that includes: +ensure that a binary non-member function named ``swap'' is selected via \link{overload +resolution}{over.match} on a candidate set that includes: \begin{itemize} \item the two \tcode{swap} function templates defined in \libheaderref{utility} and -\item the lookup set produced by argument-dependent lookup\iref{basic.lookup.argdep}. +\item the lookup set produced by \link{argument-dependent lookup}{basic.lookup.argdep}. \end{itemize} \begin{note} If \tcode{T} and \tcode{U} are both fundamental types or arrays of @@ -1901,7 +1890,7 @@ // for rvalues and lvalues } -// Preconditions: \tcode{T} meets the \oldconcept{Swappable} requirements. +// Preconditions: \tcode{T} meets the \oldconceptref{Swappable} requirements. template void lv_swap(T& t1, T& t2) { using std::swap; @@ -1938,9 +1927,9 @@ A \oldconcept{NullablePointer} type is a pointer-like type that supports null values. A type \tcode{P} meets the \oldconcept{\-Nullable\-Pointer} requirements if \begin{itemize} -\item \tcode{P} meets the \oldconcept{EqualityComparable}, -\oldconcept{DefaultConstructible}, \oldconcept{CopyConstructible}, \oldconcept{\-Copy\-Assign\-able}, -\oldconcept{Swappable}, and \oldconcept{Destructible} requirements, +\item \tcode{P} meets the \oldconceptref{EqualityComparable}, +\oldconceptref{DefaultConstructible}, \oldconceptref{CopyConstructible}, \oldconcept{\-Copy\-Assign\-able}, +\oldconceptref{Swappable}, and \oldconceptref{Destructible} requirements, \item the expressions shown in \tref{cpp17.nullablepointer} are valid and have the indicated semantics, and @@ -1958,8 +1947,9 @@ \end{note} \pnum -An object \tcode{p} of type \tcode{P} can be contextually converted to -\tcode{bool}\iref{conv}. The effect shall be as if \tcode{p != nullptr} +An object \tcode{p} of type \tcode{P} can be +\deflinkx{contextually converted to \tcode{bool}}{conversion!contextual to \tcode{bool}}{conv}. +The effect shall be as if \tcode{p != nullptr} had been evaluated in place of \tcode{p}. \pnum @@ -2015,8 +2005,8 @@ A type \tcode{H} meets the \defnoldconcept{Hash} requirements if \begin{itemize} \item it is a function object type\iref{function.objects}, -\item it meets the \oldconcept{CopyConstructible} (\tref{cpp17.copyconstructible}) and - \oldconcept{Destructible} (\tref{cpp17.destructible}) requirements, and +\item it meets the \oldconceptref{CopyConstructible} (\tref{cpp17.copyconstructible}) and + \oldconceptref{Destructible} (\tref{cpp17.destructible}) requirements, and \item the expressions shown in \tref{cpp17.hash} are valid and have the indicated semantics. \end{itemize} @@ -2062,7 +2052,7 @@ string types\iref{strings}, containers\iref{containers} (except \tcode{array} and \tcode{inplace_vector}), string buffers and string streams\iref{input.output}, and -\tcode{match_results}\iref{re} are parameterized in terms of +\link{\tcode{match_results}}{re} are parameterized in terms of allocators. \pnum @@ -2700,7 +2690,7 @@ \tcode{true_type} only if an allocator of type \tcode{X} should be copied when the client container is copy-assigned; if so, \tcode{X} shall meet -the \oldconcept{CopyAssignable} requirements (\tref{cpp17.copyassignable}) and +the \oldconceptref{CopyAssignable} requirements (\tref{cpp17.copyassignable}) and the copy operation shall not throw exceptions. \pnum @@ -2722,7 +2712,7 @@ \tcode{true_type} only if an allocator of type \tcode{X} should be moved when the client container is move-assigned; if so, \tcode{X} shall meet -the \oldconcept{MoveAssignable} requirements (\tref{cpp17.moveassignable}) and +the \oldconceptref{MoveAssignable} requirements (\tref{cpp17.moveassignable}) and the move operation shall not throw exceptions. \pnum @@ -2744,7 +2734,7 @@ \tcode{true_type} only if an allocator of type \tcode{X} should be swapped when the client container is swapped; if so, -\tcode{X} shall meet the \oldconcept{Swappable} requirements\iref{swappable.requirements} and +\tcode{X} shall meet the \oldconceptref{Swappable} requirements\iref{swappable.requirements} and the \tcode{swap} operation shall not throw exceptions. \pnum @@ -2774,7 +2764,7 @@ \pnum An allocator type \tcode{X} shall meet the -\oldconcept{CopyConstructible} requirements (\tref{cpp17.copyconstructible}). +\oldconceptref{CopyConstructible} requirements (\tref{cpp17.copyconstructible}). The \tcode{XX::pointer}, \tcode{XX::const_pointer}, \tcode{XX::void_pointer}, and \tcode{XX::const_void_pointer} types shall meet the \oldconcept{Nullable\-Pointer} requirements (\tref{cpp17.nullablepointer}). @@ -2782,7 +2772,7 @@ comparison operator function, copy operation, move operation, or swap operation on these pointer types shall exit via an exception. \tcode{XX::pointer} and \tcode{XX::const_pointer} shall also meet the requirements for -a \oldconcept{RandomAccessIterator}\iref{random.access.iterators} and +a \oldconceptref{RandomAccessIterator}\iref{random.access.iterators} and the additional requirement that, when \tcode{p} and \tcode{(p + n)} are dereferenceable pointer values for some integral value \tcode{n}, \begin{codeblock} @@ -2845,7 +2835,6 @@ \begin{example} The following is an allocator class template supporting the minimal interface that meets the requirements of \ref{allocator.requirements.general}: - \begin{codeblock} template struct SimpleAllocator { @@ -2886,7 +2875,7 @@ whether or not \tcode{T} is a complete type: \begin{itemize} \item \tcode{X} is a complete type, and -\item all the member types of \tcode{allocator_traits}\iref{allocator.traits} +\item all the member types of \link{\tcode{allocator_traits}}{allocator.traits} other than \tcode{value_type} are complete types. \end{itemize} @@ -2897,11 +2886,11 @@ \pnum Subclause \ref{constraints} describes restrictions on \Cpp{} programs that use the facilities of the \Cpp{} standard library. The following subclauses specify constraints on the -program's use of namespaces\iref{namespace.std}, its use of various reserved -names\iref{reserved.names}, its use of headers\iref{alt.headers}, its use of +program's use of \link{namespaces}{namespace.std}, its use of various \link{reserved +names}{reserved.names}, its use of \link{headers}{alt.headers}, its use of standard library classes as base classes\iref{derived.classes}, its -definitions of replacement functions\iref{replacement.functions}, and its -installation of handler functions during execution\iref{handler.functions}. +definitions of \link{replacement functions}{replacement.functions}, and its +installation of \link{handler functions}{handler.functions} during execution. \rSec3[namespace.constraints]{Namespace use} @@ -3294,7 +3283,7 @@ If a file with a name equivalent to the derived file name for one of the \Cpp{} standard library headers is not provided as part of the implementation, and a file with that name -is placed in any of the standard places for a source file to be included\iref{cpp.include}, +is placed in any of the standard places for a source file to be \link{included}{cpp.include}, the behavior is undefined.% \indextext{source file}% \indextext{undefined} @@ -3325,7 +3314,6 @@ A \Cpp{} program may provide the definition for any of the following dynamic memory allocation function signatures declared in header \tcode{}\iref{basic.stc.dynamic,new.syn}: - \indextext{\idxcode{new}!\idxcode{operator}!replaceable}% \indexlibrarymember{new}{operator}% \begin{codeblock} @@ -3384,7 +3372,6 @@ \pnum The \Cpp{} standard library provides a default version of the following handler function\iref{support}: - \begin{itemize} \item \tcode{terminate_handler} @@ -3405,7 +3392,6 @@ \pnum A \Cpp{} program can get a pointer to the current handler function by calling the following functions: - \begin{itemize} \item \indexlibraryglobal{get_new_handler}% @@ -3431,7 +3417,6 @@ \pnum In particular, the behavior is undefined in the following cases: - \begin{itemize} \item For replacement functions\iref{new.delete}, if the installed replacement function does not @@ -3524,7 +3509,7 @@ \pnum If an object of a standard library type is accessed, and -the beginning of the object's lifetime\iref{basic.life} +the beginning of the object's \link{lifetime}{basic.life} does not happen before the access, or the access does not happen before the end of the object's lifetime, the behavior is undefined unless otherwise specified. @@ -3584,7 +3569,7 @@ included after any other header that also defines it\iref{basic.def.odr}. \pnum -The C standard library headers\iref{support.c.headers} +The \link{C standard library headers}{support.c.headers} shall include only their corresponding \Cpp{} standard library header, as described in~\ref{headers}. @@ -3612,7 +3597,7 @@ It is unspecified whether any non-member functions in the \Cpp{} standard library are defined as -inline\iref{dcl.inline}. +\link{inline}{dcl.inline}. \pnum A call to a non-member function signature @@ -3640,7 +3625,7 @@ the swappable with requirements\iref{swappable.requirements}. The exception for overloaded operators allows argument-dependent lookup in cases like that of -\tcode{ostream_iterator::operator=}\iref{ostream.iterator.ops}: +\libmemberrefx{ostream_iterator::operator=}{ostream_iterator}{operator=}: \effects \begin{codeblock} @@ -3655,7 +3640,7 @@ \pnum It is unspecified whether any member functions in the \Cpp{} standard library are defined as -inline\iref{dcl.inline}. +\link{inline}{dcl.inline}. \pnum For a non-virtual member function described in the \Cpp{} standard library, @@ -3710,7 +3695,6 @@ \indextext{stable algorithm}% When the requirements for an algorithm state that it is ``stable'' without further elaboration, it means: - \begin{itemize} \item For the sort algorithms the relative order of equivalent elements is preserved. @@ -3734,8 +3718,8 @@ \rSec3[res.on.data.races]{Data race avoidance} \pnum -This subclause specifies requirements that implementations shall meet to prevent data -races\iref{intro.multithread}. +This subclause specifies requirements that implementations shall meet to prevent +\deflinkx{data races}{data race}{intro.multithread}. Every standard library function shall meet each requirement unless otherwise specified. Implementations may prevent data races in cases other than those specified below. @@ -3778,7 +3762,7 @@ \pnum Unless otherwise specified, \Cpp{} standard library functions shall perform all operations solely within the current thread if those operations have effects that are -visible\iref{intro.multithread} to users. +\deflinkx{visible}{side effects!visible}{intro.multithread} to users. \pnum \begin{note} @@ -3885,7 +3869,7 @@ \begin{footnote} In particular, they can report a failure to allocate storage by throwing an exception of type -\tcode{bad_alloc}, +\link{\tcode{bad_alloc}}{bad.alloc}, or a class derived from \tcode{bad_alloc}\iref{bad.alloc}. \end{footnote} @@ -3904,7 +3888,7 @@ \pnum Certain functions in the \Cpp{} standard library report errors via a -\tcode{std::error_code}\iref{syserr.errcode.overview} object. That object's +\link{\tcode{std::error_code}}{syserr.errcode.overview} object. That object's \tcode{category()} member shall return \tcode{std::system_category()} for errors originating from the operating system, or a reference to an \impldef{\tcode{error_category} for errors originating outside the diff --git a/source/limits.tex b/source/limits.tex index bdc1f3deb6..1218066116 100644 --- a/source/limits.tex +++ b/source/limits.tex @@ -120,8 +120,7 @@ \item% Handlers per try block\iref{except.handle} [256]. \item% -Number of placeholders\iref{func.bind.place} [10]. +Number of \link{placeholders}{func.bind.place} [10]. \item% Number of hazard-protectable possibly-reclaimable objects\iref{saferecl.hp.general} [256]. - \end{itemize} diff --git a/source/memory.tex b/source/memory.tex index 1260365953..8e72a508e0 100644 --- a/source/memory.tex +++ b/source/memory.tex @@ -977,7 +977,7 @@ disambiguate constructor and function overloading. Specifically, several types (see \tcode{tuple}~\ref{tuple}) have constructors with \tcode{allocator_arg_t} as the first argument, immediately followed by an argument of a type that meets the -\oldconcept{Allocator} requirements\iref{allocator.requirements.general}. +\oldconceptref{Allocator} requirements\iref{allocator.requirements.general}. \rSec2[allocator.uses]{\tcode{uses_allocator}} @@ -992,7 +992,7 @@ \pnum \remarks Automatically detects whether \tcode{T} has a nested \tcode{allocator_type} that -is convertible from \tcode{Alloc}. Meets the \oldconcept{BinaryTypeTrait} +is convertible from \tcode{Alloc}. Meets the \oldconceptref{BinaryTypeTrait} requirements\iref{meta.rqmts}. The implementation shall provide a definition that is derived from \tcode{true_type} if the \grammarterm{qualified-id} \tcode{T::allocator_type} is valid and denotes a type\iref{temp.deduct} and @@ -1075,7 +1075,7 @@ \begin{itemize} \item If \tcode{uses_allocator_v, Alloc>} is \tcode{false} and - \tcode{is_constructible_v} is \tcode{true}, + \tcode{is_constructible_v} is \tcode{true}, return \tcode{forward_as_tuple(std::forward(args)...)}. \item Otherwise, if \tcode{uses_allocator_v, Alloc>} is \tcode{true} and @@ -1275,7 +1275,6 @@ \pnum Let \exposid{pair-constructor} be an exposition-only class defined as follows: - \begin{codeblock} class @\exposid{pair-constructor}@ { using @\exposid{pair-type}@ = remove_cv_t; // \expos @@ -1918,8 +1917,8 @@ Each object of a type \tcode{U} instantiated from the \tcode{unique_ptr} template specified in \ref{unique.ptr} has the strict ownership semantics, specified above, of a unique pointer. In partial satisfaction of these semantics, each such \tcode{U} -is \oldconcept{MoveConstructible} and \oldconcept{MoveAssignable}, but is not -\oldconcept{CopyConstructible} nor \oldconcept{CopyAssignable}. +is \oldconceptref{MoveConstructible} and \oldconceptref{MoveAssignable}, but is not +\oldconceptref{CopyConstructible} nor \oldconceptref{CopyAssignable}. The template parameter \tcode{T} of \tcode{unique_ptr} may be an incomplete type. \pnum @@ -2098,7 +2097,7 @@ \pnum If the deleter's type \tcode{D} is not a reference type, \tcode{D} shall meet -the \oldconcept{Destructible} requirements (\tref{cpp17.destructible}). +the \oldconceptref{Destructible} requirements (\tref{cpp17.destructible}). \pnum If the \grammarterm{qualified-id} \tcode{remove_reference_t::pointer} is valid and denotes a @@ -2106,7 +2105,7 @@ D>::pointer} shall be a synonym for \tcode{remove_reference_t::pointer}. Otherwise \tcode{unique_ptr::pointer} shall be a synonym for \tcode{element_type*}. The type \tcode{unique_ptr::pointer} shall -meet the \oldconcept{NullablePointer} requirements (\tref{cpp17.nullablepointer}). +meet the \oldconceptref{NullablePointer} requirements (\tref{cpp17.nullablepointer}). \pnum \begin{example} @@ -2132,7 +2131,7 @@ \pnum \expects -\tcode{D} meets the \oldconcept{DefaultConstructible} requirements (\tref{cpp17.defaultconstructible}), +\tcode{D} meets the \oldconceptref{DefaultConstructible} requirements (\tref{cpp17.defaultconstructible}), and that construction does not throw an exception. \pnum @@ -2159,7 +2158,7 @@ \pnum \expects -\tcode{D} meets the \oldconcept{DefaultConstructible} requirements (\tref{cpp17.defaultconstructible}), +\tcode{D} meets the \oldconceptref{DefaultConstructible} requirements (\tref{cpp17.defaultconstructible}), and that construction does not throw an exception. \pnum @@ -2188,10 +2187,10 @@ \pnum \expects For the first constructor, if \tcode{D} is not a reference type, -\tcode{D} meets the \oldconcept{CopyConstructible} requirements and +\tcode{D} meets the \oldconceptref{CopyConstructible} requirements and such construction does not exit via an exception. For the second constructor, if \tcode{D} is not a reference type, -\tcode{D} meets the \oldconcept{MoveConstructible} requirements and +\tcode{D} meets the \oldconceptref{MoveConstructible} requirements and such construction does not exit via an exception. \pnum @@ -2216,8 +2215,8 @@ \begin{example} \begin{codeblock} D d; -unique_ptr p1(new int, D()); // \tcode{D} must be \oldconcept{MoveConstructible} -unique_ptr p2(new int, d); // \tcode{D} must be \oldconcept{CopyConstructible} +unique_ptr p1(new int, D()); // \tcode{D} must be \oldconceptref{MoveConstructible} +unique_ptr p2(new int, d); // \tcode{D} must be \oldconceptref{CopyConstructible} unique_ptr p3(new int, d); // \tcode{p3} holds a reference to \tcode{d} unique_ptr p4(new int, D()); // error: rvalue deleter object combined // with reference deleter type @@ -2238,7 +2237,7 @@ \pnum \expects If \tcode{D} is not a reference type, -\tcode{D} meets the \oldconcept{MoveConstructible} +\tcode{D} meets the \oldconceptref{MoveConstructible} requirements (\tref{cpp17.moveconstructible}). Construction of the deleter from an rvalue of type \tcode{D} does not @@ -2347,10 +2346,10 @@ \pnum \expects If \tcode{D} is not a reference type, \tcode{D} meets the -\oldconcept{MoveAssignable} requirements (\tref{cpp17.moveassignable}) and assignment +\oldconceptref{MoveAssignable} requirements (\tref{cpp17.moveassignable}) and assignment of the deleter from an rvalue of type \tcode{D} does not throw an exception. Otherwise, \tcode{D} is a reference type; -\tcode{remove_reference_t} meets the \oldconcept{CopyAssignable} +\tcode{remove_reference_t} meets the \oldconceptref{CopyAssignable} requirements and assignment of the deleter from an lvalue of type \tcode{D} does not throw an exception. @@ -3244,8 +3243,8 @@ \end{codeblock} \pnum -Specializations of \tcode{shared_ptr} shall be \oldconcept{CopyConstructible}, -\oldconcept{CopyAssignable}, and \oldconcept{\-Less\-Than\-Comparable}, allowing their use in standard +Specializations of \tcode{shared_ptr} shall be \oldconceptref{CopyConstructible}, +\oldconceptref{CopyAssignable}, and \oldconceptref{LessThanComparable}, allowing their use in standard containers. Specializations of \tcode{shared_ptr} shall be contextually convertible to \tcode{bool}, allowing their use in boolean expressions and declarations in conditions. @@ -3373,7 +3372,6 @@ \tcode{is_move_constructible_v} is \tcode{true}, and \tcode{d(p)} is a well-formed expression. For the first two overloads: - \begin{itemize} \item If \tcode{T} is an array type, then either @@ -3391,7 +3389,7 @@ The expression \tcode{d(p)} has well-defined behavior and does not throw exceptions. \tcode{A} meets -the \oldconcept{Allocator} requirements\iref{allocator.requirements.general}. +the \oldconceptref{Allocator} requirements\iref{allocator.requirements.general}. \pnum \effects @@ -3908,7 +3906,7 @@ \pnum \expects \tcode{A} meets -the \oldconcept{Allocator} requirements\iref{allocator.requirements.general}. +the \oldconceptref{Allocator} requirements\iref{allocator.requirements.general}. \pnum \effects @@ -3998,7 +3996,7 @@ such that its \tcode{value_type} is \tcode{remove_cv_t}. \item When a (sub)object of non-array type \tcode{U} is initialized by - \tcode{make_shared_for_overwrite} or\linebreak % avoid Overfull + \tcode{make_shared_for_overwrite} or \tcode{allocate_shared_for_overwrite}, it is initialized via the expression \tcode{::new(pv) U}, where \tcode{pv} has type \tcode{void*} and @@ -4562,8 +4560,8 @@ \end{codeblock} \pnum -Specializations of \tcode{weak_ptr} shall be \oldconcept{CopyConstructible} and -\oldconcept{CopyAssignable}, allowing their use in standard +Specializations of \tcode{weak_ptr} shall be \oldconceptref{CopyConstructible} and +\oldconceptref{CopyAssignable}, allowing their use in standard containers. The template parameter \tcode{T} of \tcode{weak_ptr} may be an incomplete type. @@ -5142,7 +5140,7 @@ \end{codeblock} \pnum -\tcode{Pointer} shall meet the \oldconcept{NullablePointer} requirements. +\tcode{Pointer} shall meet the \oldconceptref{NullablePointer} requirements. If \tcode{Smart} is a specialization of \tcode{shared_ptr} and \tcode{sizeof...(Args) == 0}, the program is ill-formed. @@ -5231,7 +5229,7 @@ \end{codeblock} if the expression \tcode{s.reset(static_cast(p), std::forward(args)...)} -is well-\linebreak formed; +is well-formed; \item otherwise, \begin{codeblock} @@ -5382,7 +5380,7 @@ \end{codeblock} \pnum -\tcode{Pointer} shall meet the \oldconcept{NullablePointer} requirements. +\tcode{Pointer} shall meet the \oldconceptref{NullablePointer} requirements. If \tcode{Smart} is a specialization of \tcode{shared_ptr}, the program is ill-formed. \begin{note} diff --git a/source/meta.tex b/source/meta.tex index ec59b440b8..20cefd6c50 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -94,12 +94,12 @@ A \defnoldconcept{UnaryTypeTrait} describes a property of a type. It shall be a class template that takes one template type argument and, optionally, additional arguments that help define the -property being described. It shall be \oldconcept{DefaultConstructible}, -\oldconcept{CopyConstructible}, +property being described. It shall be \oldconceptref{DefaultConstructible}, +\oldconceptref{CopyConstructible}, and publicly and unambiguously derived, directly or indirectly, from its \defn{base characteristic}, which is a specialization of the template -\tcode{integral_constant}\iref{meta.help}, with +\libglobalref{integral_constant}, with the arguments to the template \tcode{integral_constant} determined by the requirements for the particular property being described. The member names of the base characteristic shall not be hidden and shall be @@ -110,12 +110,12 @@ relationship between two types. It shall be a class template that takes two template type arguments and, optionally, additional arguments that help define the relationship being described. It shall -be \oldconcept{DefaultConstructible}, \oldconcept{CopyConstructible}, +be \oldconceptref{DefaultConstructible}, \oldconceptref{CopyConstructible}, and publicly and unambiguously derived, directly or indirectly, from its \term{base characteristic}, which is a specialization of the template -\tcode{integral_constant}\iref{meta.help}, with +\libglobalref{integral_constant}, with the arguments to the template \tcode{integral_constant} determined by the requirements for the particular relationship being described. The member names of the base characteristic shall not be hidden and shall be @@ -283,17 +283,17 @@ template struct add_cv; template - using @\libglobal{remove_const_t}@ = typename remove_const::type; + using @\libglobal{remove_const_t}@ = typename @\libglobalref{remove_const}@::type; template - using @\libglobal{remove_volatile_t}@ = typename remove_volatile::type; + using @\libglobal{remove_volatile_t}@ = typename @\libglobalref{remove_volatile}@::type; template - using @\libglobal{remove_cv_t}@ = typename remove_cv::type; + using @\libglobal{remove_cv_t}@ = typename @\libglobalref{remove_cv}@::type; template - using @\libglobal{add_const_t}@ = typename add_const::type; + using @\libglobal{add_const_t}@ = typename @\libglobalref{add_const}@::type; template - using @\libglobal{add_volatile_t}@ = typename add_volatile::type; + using @\libglobal{add_volatile_t}@ = typename @\libglobalref{add_volatile}@::type; template - using @\libglobal{add_cv_t}@ = typename add_cv::type; + using @\libglobal{add_cv_t}@ = typename @\libglobalref{add_cv}@::type; // \ref{meta.trans.ref}, reference modifications template struct remove_reference; @@ -301,38 +301,38 @@ template struct add_rvalue_reference; template - using @\libglobal{remove_reference_t}@ = typename remove_reference::type; + using @\libglobal{remove_reference_t}@ = typename @\libglobalref{remove_reference}@::type; template - using @\libglobal{add_lvalue_reference_t}@ = typename add_lvalue_reference::type; + using @\libglobal{add_lvalue_reference_t}@ = typename @\libglobalref{add_lvalue_reference}@::type; template - using @\libglobal{add_rvalue_reference_t}@ = typename add_rvalue_reference::type; + using @\libglobal{add_rvalue_reference_t}@ = typename @\libglobalref{add_rvalue_reference}@::type; // \ref{meta.trans.sign}, sign modifications template struct make_signed; template struct make_unsigned; template - using @\libglobal{make_signed_t}@ = typename make_signed::type; + using @\libglobal{make_signed_t}@ = typename @\libglobalref{make_signed}@::type; template - using @\libglobal{make_unsigned_t}@ = typename make_unsigned::type; + using @\libglobal{make_unsigned_t}@ = typename @\libglobalref{make_unsigned}@::type; // \ref{meta.trans.arr}, array modifications template struct remove_extent; template struct remove_all_extents; template - using @\libglobal{remove_extent_t}@ = typename remove_extent::type; + using @\libglobal{remove_extent_t}@ = typename @\libglobalref{remove_extent}@::type; template - using @\libglobal{remove_all_extents_t}@ = typename remove_all_extents::type; + using @\libglobal{remove_all_extents_t}@ = typename @\libglobalref{remove_all_extents}@::type; // \ref{meta.trans.ptr}, pointer modifications template struct remove_pointer; template struct add_pointer; template - using @\libglobal{remove_pointer_t}@ = typename remove_pointer::type; + using @\libglobal{remove_pointer_t}@ = typename @\libglobalref{remove_pointer}@::type; template - using @\libglobal{add_pointer_t}@ = typename add_pointer::type; + using @\libglobal{add_pointer_t}@ = typename @\libglobalref{add_pointer}@::type; // \ref{meta.trans.other}, other transformations template struct type_identity; @@ -350,27 +350,27 @@ template struct unwrap_ref_decay; template - using @\libglobal{type_identity_t}@ = typename type_identity::type; + using @\libglobal{type_identity_t}@ = typename @\libglobalref{type_identity}@::type; template - using @\libglobal{remove_cvref_t}@ = typename remove_cvref::type; + using @\libglobal{remove_cvref_t}@ = typename @\libglobalref{remove_cvref}@::type; template - using @\libglobal{decay_t}@ = typename decay::type; + using @\libglobal{decay_t}@ = typename @\libglobalref{decay}@::type; template - using @\libglobal{enable_if_t}@ = typename enable_if::type; + using @\libglobal{enable_if_t}@ = typename @\libglobalref{enable_if}@::type; template - using @\libglobal{conditional_t}@ = typename conditional::type; + using @\libglobal{conditional_t}@ = typename @\libglobalref{conditional}@::type; template - using @\libglobal{common_type_t}@ = typename common_type::type; + using @\libglobal{common_type_t}@ = typename @\libglobalref{common_type}@::type; template - using @\libglobal{common_reference_t}@ = typename common_reference::type; + using @\libglobal{common_reference_t}@ = typename @\libglobalref{common_reference}@::type; template - using @\libglobal{underlying_type_t}@ = typename underlying_type::type; + using @\libglobal{underlying_type_t}@ = typename @\libglobalref{underlying_type}@::type; template - using @\libglobal{invoke_result_t}@ = typename invoke_result::type; + using @\libglobal{invoke_result_t}@ = typename @\libglobalref{invoke_result}@::type; template - using unwrap_reference_t = typename unwrap_reference::type; + using @\libglobal{unwrap_reference_t}@ = typename @\libglobalref{unwrap_reference}@::type; template - using unwrap_ref_decay_t = typename unwrap_ref_decay::type; + using @\libglobal{unwrap_ref_decay_t}@ = typename @\libglobalref{unwrap_ref_decay}@::type; template using @\libglobal{void_t}@ = void; @@ -381,202 +381,202 @@ // \ref{meta.unary.cat}, primary type categories template - constexpr bool @\libglobal{is_void_v}@ = is_void::value; + constexpr bool @\libglobal{is_void_v}@ = @\libglobalref{is_void}@::value; template - constexpr bool @\libglobal{is_null_pointer_v}@ = is_null_pointer::value; + constexpr bool @\libglobal{is_null_pointer_v}@ = @\libglobalref{is_null_pointer}@::value; template - constexpr bool @\libglobal{is_integral_v}@ = is_integral::value; + constexpr bool @\libglobal{is_integral_v}@ = @\libglobalref{is_integral}@::value; template - constexpr bool @\libglobal{is_floating_point_v}@ = is_floating_point::value; + constexpr bool @\libglobal{is_floating_point_v}@ = @\libglobalref{is_floating_point}@::value; template - constexpr bool @\libglobal{is_array_v}@ = is_array::value; + constexpr bool @\libglobal{is_array_v}@ = @\libglobalref{is_array}@::value; template - constexpr bool @\libglobal{is_pointer_v}@ = is_pointer::value; + constexpr bool @\libglobal{is_pointer_v}@ = @\libglobalref{is_pointer}@::value; template - constexpr bool @\libglobal{is_lvalue_reference_v}@ = is_lvalue_reference::value; + constexpr bool @\libglobal{is_lvalue_reference_v}@ = @\libglobalref{is_lvalue_reference}@::value; template - constexpr bool @\libglobal{is_rvalue_reference_v}@ = is_rvalue_reference::value; + constexpr bool @\libglobal{is_rvalue_reference_v}@ = @\libglobalref{is_rvalue_reference}@::value; template - constexpr bool @\libglobal{is_member_object_pointer_v}@ = is_member_object_pointer::value; + constexpr bool @\libglobal{is_member_object_pointer_v}@ = @\libglobalref{is_member_object_pointer}@::value; template - constexpr bool @\libglobal{is_member_function_pointer_v}@ = is_member_function_pointer::value; + constexpr bool @\libglobal{is_member_function_pointer_v}@ = @\libglobalref{is_member_function_pointer}@::value; template - constexpr bool @\libglobal{is_enum_v}@ = is_enum::value; + constexpr bool @\libglobal{is_enum_v}@ = @\libglobalref{is_enum}@::value; template - constexpr bool @\libglobal{is_union_v}@ = is_union::value; + constexpr bool @\libglobal{is_union_v}@ = @\libglobalref{is_union}@::value; template - constexpr bool @\libglobal{is_class_v}@ = is_class::value; + constexpr bool @\libglobal{is_class_v}@ = @\libglobalref{is_class}@::value; template - constexpr bool @\libglobal{is_function_v}@ = is_function::value; + constexpr bool @\libglobal{is_function_v}@ = @\libglobalref{is_function}@::value; // \ref{meta.unary.comp}, composite type categories template - constexpr bool @\libglobal{is_reference_v}@ = is_reference::value; + constexpr bool @\libglobal{is_reference_v}@ = @\libglobalref{is_reference}@::value; template - constexpr bool @\libglobal{is_arithmetic_v}@ = is_arithmetic::value; + constexpr bool @\libglobal{is_arithmetic_v}@ = @\libglobalref{is_arithmetic}@::value; template - constexpr bool @\libglobal{is_fundamental_v}@ = is_fundamental::value; + constexpr bool @\libglobal{is_fundamental_v}@ = @\libglobalref{is_fundamental}@::value; template - constexpr bool @\libglobal{is_object_v}@ = is_object::value; + constexpr bool @\libglobal{is_object_v}@ = @\libglobalref{is_object}@::value; template - constexpr bool @\libglobal{is_scalar_v}@ = is_scalar::value; + constexpr bool @\libglobal{is_scalar_v}@ = @\libglobalref{is_scalar}@::value; template - constexpr bool @\libglobal{is_compound_v}@ = is_compound::value; + constexpr bool @\libglobal{is_compound_v}@ = @\libglobalref{is_compound}@::value; template - constexpr bool @\libglobal{is_member_pointer_v}@ = is_member_pointer::value; + constexpr bool @\libglobal{is_member_pointer_v}@ = @\libglobalref{is_member_pointer}@::value; // \ref{meta.unary.prop}, type properties template - constexpr bool @\libglobal{is_const_v}@ = is_const::value; + constexpr bool @\libglobal{is_const_v}@ = @\libglobalref{is_const}@::value; template - constexpr bool @\libglobal{is_volatile_v}@ = is_volatile::value; + constexpr bool @\libglobal{is_volatile_v}@ = @\libglobalref{is_volatile}@::value; template - constexpr bool @\libglobal{is_trivial_v}@ = is_trivial::value; + constexpr bool @\libglobal{is_trivial_v}@ = @\libglobalref{is_trivial}@::value; template - constexpr bool @\libglobal{is_trivially_copyable_v}@ = is_trivially_copyable::value; + constexpr bool @\libglobal{is_trivially_copyable_v}@ = @\libglobalref{is_trivially_copyable}@::value; template - constexpr bool @\libglobal{is_standard_layout_v}@ = is_standard_layout::value; + constexpr bool @\libglobal{is_standard_layout_v}@ = @\libglobalref{is_standard_layout}@::value; template constexpr bool @\libglobal{is_empty_v}@ = is_empty::value; template - constexpr bool @\libglobal{is_polymorphic_v}@ = is_polymorphic::value; + constexpr bool @\libglobal{is_polymorphic_v}@ = @\libglobalref{is_polymorphic}@::value; template - constexpr bool @\libglobal{is_abstract_v}@ = is_abstract::value; + constexpr bool @\libglobal{is_abstract_v}@ = @\libglobalref{is_abstract}@::value; template - constexpr bool @\libglobal{is_final_v}@ = is_final::value; + constexpr bool @\libglobal{is_final_v}@ = @\libglobalref{is_final}@::value; template - constexpr bool @\libglobal{is_aggregate_v}@ = is_aggregate::value; + constexpr bool @\libglobal{is_aggregate_v}@ = @\libglobalref{is_aggregate}@::value; template constexpr bool @\libglobal{is_signed_v}@ = is_signed::value; template - constexpr bool @\libglobal{is_unsigned_v}@ = is_unsigned::value; + constexpr bool @\libglobal{is_unsigned_v}@ = @\libglobalref{is_unsigned}@::value; template - constexpr bool @\libglobal{is_bounded_array_v}@ = is_bounded_array::value; + constexpr bool @\libglobal{is_bounded_array_v}@ = @\libglobalref{is_bounded_array}@::value; template - constexpr bool @\libglobal{is_unbounded_array_v}@ = is_unbounded_array::value; + constexpr bool @\libglobal{is_unbounded_array_v}@ = @\libglobalref{is_unbounded_array}@::value; template - constexpr bool @\libglobal{is_scoped_enum_v}@ = is_scoped_enum::value; + constexpr bool @\libglobal{is_scoped_enum_v}@ = @\libglobalref{is_scoped_enum}@::value; template - constexpr bool @\libglobal{is_constructible_v}@ = is_constructible::value; + constexpr bool @\libglobal{is_constructible_v}@ = @\libglobalref{is_constructible}@::value; template - constexpr bool @\libglobal{is_default_constructible_v}@ = is_default_constructible::value; + constexpr bool @\libglobal{is_default_constructible_v}@ = @\libglobalref{is_default_constructible}@::value; template - constexpr bool @\libglobal{is_copy_constructible_v}@ = is_copy_constructible::value; + constexpr bool @\libglobal{is_copy_constructible_v}@ = @\libglobalref{is_copy_constructible}@::value; template - constexpr bool @\libglobal{is_move_constructible_v}@ = is_move_constructible::value; + constexpr bool @\libglobal{is_move_constructible_v}@ = @\libglobalref{is_move_constructible}@::value; template - constexpr bool @\libglobal{is_assignable_v}@ = is_assignable::value; + constexpr bool @\libglobal{is_assignable_v}@ = @\libglobalref{is_assignable}@::value; template - constexpr bool @\libglobal{is_copy_assignable_v}@ = is_copy_assignable::value; + constexpr bool @\libglobal{is_copy_assignable_v}@ = @\libglobalref{is_copy_assignable}@::value; template - constexpr bool @\libglobal{is_move_assignable_v}@ = is_move_assignable::value; + constexpr bool @\libglobal{is_move_assignable_v}@ = @\libglobalref{is_move_assignable}@::value; template - constexpr bool @\libglobal{is_swappable_with_v}@ = is_swappable_with::value; + constexpr bool @\libglobal{is_swappable_with_v}@ = @\libglobalref{is_swappable_with}@::value; template - constexpr bool @\libglobal{is_swappable_v}@ = is_swappable::value; + constexpr bool @\libglobal{is_swappable_v}@ = @\libglobalref{is_swappable}@::value; template - constexpr bool @\libglobal{is_destructible_v}@ = is_destructible::value; + constexpr bool @\libglobal{is_destructible_v}@ = @\libglobalref{is_destructible}@::value; template - constexpr bool is_trivially_constructible_v - = is_trivially_constructible::value; + constexpr @\libglobal{bool is_trivially_constructible_v}@ + = @\libglobalref{is_trivially_constructible}@::value; template - constexpr bool is_trivially_default_constructible_v - = is_trivially_default_constructible::value; + constexpr bool @\libglobal{is_trivially_default_constructible_v}@ + = @\libglobalref{is_trivially_default_constructible}@::value; template - constexpr bool is_trivially_copy_constructible_v - = is_trivially_copy_constructible::value; + constexpr bool @\libglobal{is_trivially_copy_constructible_v}@ + = @\libglobalref{is_trivially_copy_constructible}@::value; template - constexpr bool is_trivially_move_constructible_v - = is_trivially_move_constructible::value; + constexpr bool @\libglobal{is_trivially_move_constructible_v}@ + = @\libglobalref{is_trivially_move_constructible}@::value; template - constexpr bool @\libglobal{is_trivially_assignable_v}@ = is_trivially_assignable::value; + constexpr bool @\libglobal{is_trivially_assignable_v}@ = @\libglobalref{is_trivially_assignable}@::value; template - constexpr bool is_trivially_copy_assignable_v - = is_trivially_copy_assignable::value; + constexpr bool @\libglobal{is_trivially_copy_assignable_v}@ + = @\libglobalref{is_trivially_copy_assignable}@::value; template - constexpr bool is_trivially_move_assignable_v - = is_trivially_move_assignable::value; + constexpr bool @\libglobal{is_trivially_move_assignable_v}@ + = @\libglobalref{is_trivially_move_assignable}@::value; template - constexpr bool @\libglobal{is_trivially_destructible_v}@ = is_trivially_destructible::value; + constexpr bool @\libglobal{is_trivially_destructible_v}@ = @\libglobalref{is_trivially_destructible}@::value; template - constexpr bool is_nothrow_constructible_v - = is_nothrow_constructible::value; + constexpr bool @\libglobal{is_nothrow_constructible_v}@ + = @\libglobalref{is_nothrow_constructible}@::value; template - constexpr bool is_nothrow_default_constructible_v - = is_nothrow_default_constructible::value; + constexpr bool @\libglobal{is_nothrow_default_constructible_v}@ + = @\libglobalref{is_nothrow_default_constructible}@::value; template - constexpr bool is_nothrow_copy_constructible_v - = is_nothrow_copy_constructible::value; + constexpr bool @\libglobal{is_nothrow_copy_constructible_v}@ + = @\libglobalref{is_nothrow_copy_constructible}@::value; template - constexpr bool is_nothrow_move_constructible_v - = is_nothrow_move_constructible::value; + constexpr bool @\libglobal{is_nothrow_move_constructible_v}@ + = @\libglobalref{is_nothrow_move_constructible}@::value; template - constexpr bool @\libglobal{is_nothrow_assignable_v}@ = is_nothrow_assignable::value; + constexpr bool @\libglobal{is_nothrow_assignable_v}@ = @\libglobalref{is_nothrow_assignable}@::value; template - constexpr bool @\libglobal{is_nothrow_copy_assignable_v}@ = is_nothrow_copy_assignable::value; + constexpr bool @\libglobal{is_nothrow_copy_assignable_v}@ = @\libglobalref{is_nothrow_copy_assignable}@::value; template - constexpr bool @\libglobal{is_nothrow_move_assignable_v}@ = is_nothrow_move_assignable::value; + constexpr bool @\libglobal{is_nothrow_move_assignable_v}@ = @\libglobalref{is_nothrow_move_assignable}@::value; template - constexpr bool @\libglobal{is_nothrow_swappable_with_v}@ = is_nothrow_swappable_with::value; + constexpr bool @\libglobal{is_nothrow_swappable_with_v}@ = @\libglobalref{is_nothrow_swappable_with}@::value; template - constexpr bool @\libglobal{is_nothrow_swappable_v}@ = is_nothrow_swappable::value; + constexpr bool @\libglobal{is_nothrow_swappable_v}@ = @\libglobalref{is_nothrow_swappable}@::value; template - constexpr bool @\libglobal{is_nothrow_destructible_v}@ = is_nothrow_destructible::value; + constexpr bool @\libglobal{is_nothrow_destructible_v}@ = @\libglobalref{is_nothrow_destructible}@::value; template - constexpr bool @\libglobal{is_implicit_lifetime_v}@ = is_implicit_lifetime::value; + constexpr bool @\libglobal{is_implicit_lifetime_v}@ = @\libglobalref{is_implicit_lifetime}@::value; template - constexpr bool @\libglobal{has_virtual_destructor_v}@ = has_virtual_destructor::value; + constexpr bool @\libglobal{has_virtual_destructor_v}@ = @\libglobalref{has_virtual_destructor}@::value; template - constexpr bool has_unique_object_representations_v - = has_unique_object_representations::value; + constexpr bool @\libglobal{has_unique_object_representations_v}@ + = @\libglobalref{has_unique_object_representations}@::value; template constexpr bool @\libglobal{reference_constructs_from_temporary_v}@ - = reference_constructs_from_temporary::value; + = @\libglobalref{reference_constructs_from_temporary}@::value; template constexpr bool @\libglobal{reference_converts_from_temporary_v}@ - = reference_converts_from_temporary::value; + = @\libglobalref{reference_converts_from_temporary}@::value; // \ref{meta.unary.prop.query}, type property queries template - constexpr size_t @\libglobal{alignment_of_v}@ = alignment_of::value; + constexpr size_t @\libglobal{alignment_of_v}@ = @\libglobalref{alignment_of}@::value; template - constexpr size_t @\libglobal{rank_v}@ = rank::value; + constexpr size_t @\libglobal{rank_v}@ = @\libglobalref{rank}@::value; template - constexpr size_t @\libglobal{extent_v}@ = extent::value; + constexpr size_t @\libglobal{extent_v}@ = @\libglobalref{extent}@::value; // \ref{meta.rel}, type relations template - constexpr bool @\libglobal{is_same_v}@ = is_same::value; + constexpr bool @\libglobal{is_same_v}@ = @\libglobalref{is_same}@::value; template - constexpr bool @\libglobal{is_base_of_v}@ = is_base_of::value; + constexpr bool @\libglobal{is_base_of_v}@ = @\libglobalref{is_base_of}@::value; template - constexpr bool @\libglobal{is_virtual_base_of_v}@ = is_virtual_base_of::value; + constexpr bool @\libglobal{is_virtual_base_of_v}@ = @\libglobalref{is_virtual_base_of}@::value; template - constexpr bool @\libglobal{is_convertible_v}@ = is_convertible::value; + constexpr bool @\libglobal{is_convertible_v}@ = @\libglobalref{is_convertible}@::value; template - constexpr bool @\libglobal{is_nothrow_convertible_v}@ = is_nothrow_convertible::value; + constexpr bool @\libglobal{is_nothrow_convertible_v}@ = @\libglobalref{is_nothrow_convertible}@::value; template - constexpr bool @\libglobal{is_layout_compatible_v}@ = is_layout_compatible::value; + constexpr bool @\libglobal{is_layout_compatible_v}@ = @\libglobalref{is_layout_compatible}@::value; template - constexpr bool is_pointer_interconvertible_base_of_v - = is_pointer_interconvertible_base_of::value; + constexpr bool @\libglobal{is_pointer_interconvertible_base_of_v}@ + = @\libglobalref{is_pointer_interconvertible_base_of}@::value; template - constexpr bool @\libglobal{is_invocable_v}@ = is_invocable::value; + constexpr bool @\libglobal{is_invocable_v}@ = @\libglobalref{is_invocable}@::value; template - constexpr bool @\libglobal{is_invocable_r_v}@ = is_invocable_r::value; + constexpr bool @\libglobal{is_invocable_r_v}@ = @\libglobalref{is_invocable_r}@::value; template - constexpr bool @\libglobal{is_nothrow_invocable_v}@ = is_nothrow_invocable::value; + constexpr bool @\libglobal{is_nothrow_invocable_v}@ = @\libglobalref{is_nothrow_invocable}@::value; template constexpr bool is_nothrow_invocable_r_v - = is_nothrow_invocable_r::value; + = @\libglobalref{is_nothrow_invocable_r}@::value; // \ref{meta.logical}, logical operator traits template - constexpr bool @\libglobal{conjunction_v}@ = conjunction::value; + constexpr bool @\libglobal{conjunction_v}@ = @\libglobalref{conjunction}@::value; template - constexpr bool @\libglobal{disjunction_v}@ = disjunction::value; + constexpr bool @\libglobal{disjunction_v}@ = @\libglobalref{disjunction}@::value; template - constexpr bool @\libglobal{negation_v}@ = negation::value; + constexpr bool @\libglobal{negation_v}@ = @\libglobalref{negation}@::value; // \ref{meta.member}, member relationships template @@ -628,7 +628,7 @@ \pnum Each of these templates shall be a -\oldconcept{UnaryTypeTrait}\iref{meta.rqmts} +\oldconceptref{UnaryTypeTrait} with a base characteristic of \tcode{true_type} if the corresponding condition is \tcode{true}, otherwise \tcode{false_type}. @@ -658,17 +658,14 @@ \topline \lhdr{Template} & \chdr{Condition} & \rhdr{Comments} \\ \capsep \endhead -\indexlibraryglobal{is_void}% \tcode{template}\br - \tcode{struct is_void;} & + \tcode{struct \libglobal{is_void};} & \tcode{T} is \keyword{void} & \\ \rowsep -\indexlibraryglobal{is_null_pointer}% \tcode{template}\br - \tcode{struct is_null_pointer;} & + \tcode{struct \libglobal{is_null_pointer};} & \tcode{T} is \tcode{nullptr_t}\iref{basic.fundamental} & \\ \rowsep -\indexlibraryglobal{is_integral}% \tcode{template}\br - \tcode{struct is_integral;} & + \tcode{struct \libglobal{is_integral};} & \tcode{T} is an integral type\iref{basic.fundamental} & \\ \rowsep \indexlibraryglobal{is_floating_point}% \tcode{template}\br @@ -874,9 +871,8 @@ \tcode{T} is an abstract class\iref{class.abstract} & If \tcode{T} is a non-union class type, \tcode{T} shall be a complete type. \\ \rowsep -\indexlibraryglobal{is_final}% \tcode{template}\br - \tcode{struct is_final;} & + \tcode{struct \libglobal{is_final};} & \tcode{T} is a class type marked with the \grammarterm{class-virt-specifier} \tcode{final}\iref{class.pre}. \begin{tailnote} @@ -886,9 +882,8 @@ & If \tcode{T} is a class type, \tcode{T} shall be a complete type. \\ \rowsep -\indexlibraryglobal{is_aggregate}% \tcode{template}\br - \tcode{struct is_aggregate;} & + \tcode{struct \libglobal{is_aggregate};} & \tcode{T} is an aggregate type\iref{dcl.init.aggr} & \tcode{T} shall be an array type, a complete type, or \cv~\keyword{void}. \\ \rowsep @@ -899,16 +894,14 @@ \tcode{T(-1) < T(0)}; otherwise, \tcode{false} & \\ \rowsep -\indexlibraryglobal{is_unsigned}% \tcode{template}\br - \tcode{struct is_unsigned;} & + \tcode{struct \libglobal{is_unsigned};} & If \tcode{is_arithmetic_v} is \tcode{true}, the same result as \tcode{T(0) < T(-1)}; otherwise, \tcode{false} & \\ \rowsep -\indexlibraryglobal{is_bounded_array}% \tcode{template}\br - \tcode{struct is_bounded_array;} & + \tcode{struct \libglobal{is_bounded_array};} & \tcode{T} is an array type of known bound\iref{dcl.array} & \\ \rowsep @@ -1402,7 +1395,7 @@ \end{libreqtab2a} \pnum -Each of these templates shall be a \oldconcept{UnaryTypeTrait}\iref{meta.rqmts} with a +Each of these templates shall be a \oldconceptref{UnaryTypeTrait}\iref{meta.rqmts} with a base characteristic of \tcode{integral_constant}. \pnum @@ -1438,7 +1431,7 @@ \pnum Each of these templates shall be a -\oldconcept{BinaryTypeTrait}\iref{meta.rqmts} +\oldconceptref{BinaryTypeTrait}\iref{meta.rqmts} with a base characteristic of \tcode{true_type} if the corresponding condition is true, otherwise \tcode{false_type}. @@ -1452,7 +1445,7 @@ \lhdr{Template} & \chdr{Condition} & \rhdr{Comments} \\ \capsep \endhead \tcode{template}\br - \tcode{struct is_same;} & + \tcode{struct \libglobal{is_same};} & \tcode{T} and \tcode{U} name the same type with the same cv-qualifications & \\ \rowsep \indexlibraryglobal{is_base_of}% @@ -1600,7 +1593,6 @@ The predicate condition for a template specialization \tcode{is_convertible} shall be satisfied if and only if the return expression in the following code would be well-formed, including any implicit conversions to the return type of the function: - \begin{codeblock} To test() { return declval(); @@ -1633,7 +1625,7 @@ \pnum Each of the templates in \ref{meta.trans} shall be a -\oldconcept{TransformationTrait}\iref{meta.rqmts}. +\oldconceptref{TransformationTrait}\iref{meta.rqmts}. \rSec3[meta.trans.cv]{Const-volatile modifications} @@ -1914,16 +1906,16 @@ \tcode{template\br struct \libglobal{remove_cvref};} & The member typedef \tcode{type} denotes - \tcode{remove_cv_t>}. + \tcode{\libglobalref{remove_cv_t}<\libglobalref{remove_reference_t}>}. \\ \rowsep \tcode{template\br struct \libglobal{decay};} & - Let \tcode{U} be \tcode{remove_reference_t}. If \tcode{is_array_v} is + Let \tcode{U} be \tcode{\libglobalref{remove_reference_t}}. If \tcode{\libglobalref{is_array_v}} is \tcode{true}, the member typedef \tcode{type} denotes - \tcode{remove_extent_t*}. If \tcode{is_function_v} is \tcode{true}, - the member typedef \tcode{type} denotes \tcode{add_pointer_t}. Otherwise - the member typedef \tcode{type} denotes \tcode{remove_cv_t}. + \tcode{\libglobalref{remove_extent_t}*}. If \tcode{\libglobalref{is_function_v}} is \tcode{true}, + the member typedef \tcode{type} denotes \tcode{\libglobalref{add_pointer_t}}. Otherwise + the member typedef \tcode{type} denotes \tcode{\libglobalref{remove_cv_t}}. \begin{tailnote} This behavior is similar to the lvalue-to-rvalue\iref{conv.lval}, array-to-pointer\iref{conv.array}, and function-to-pointer\iref{conv.func} @@ -2003,7 +1995,7 @@ \tcode{template} \tcode{struct \libglobal{unwrap_reference};} & If \tcode{T} is - a specialization \tcode{reference_wrapper} for some type \tcode{X}, + a specialization \tcode{\libglobalref{reference_wrapper}} for some type \tcode{X}, the member typedef \tcode{type} of \tcode{unwrap_reference} denotes \tcode{X\&}, otherwise \tcode{type} denotes \tcode{T}. \\ \rowsep @@ -2011,7 +2003,7 @@ \tcode{template} \tcode{\libglobal{unwrap_ref_decay};} & The member typedef \tcode{type} of \tcode{unwrap_ref_decay} - denotes the type \tcode{unwrap_reference_t>}.\\ + denotes the type \tcode{\libglobalref{unwrap_reference_t}<\libglobalref{decay_t}>}.\\ \end{libreqtab2a} \pnum @@ -2029,7 +2021,7 @@ Let: \begin{itemize} \item \tcode{\placeholdernc{CREF}(A)} be - \tcode{add_lvalue_reference_t{}>}, + \tcode{\libglobalref{add_lvalue_reference_t}{}>}, \item \tcode{\placeholdernc{XREF}(A)} denote a unary alias template \tcode{T} such that \tcode{T} denotes the same type as \tcode{U} with the addition of \tcode{A}'s cv and reference qualifiers, for a non-reference cv-unqualified @@ -2054,15 +2046,15 @@ \placeholdernc{COPYCV}(\brk{}Y, X) \&)} if that type exists and is a reference type. \item Otherwise, let \tcode{C} be - \tcode{remove_reference_t<\placeholdernc{COMMON-REF}(X\&, Y\&)>\&\&}. + \tcode{\libglobalref{remove_reference_t}<\placeholdernc{COMMON-REF}(X\&, Y\&)>\&\&}. If \tcode{A} and \tcode{B} are both rvalue reference types, \tcode{C} is well-formed, and - \tcode{is_convertible_v \&\& is_convertible_v} is \tcode{true}, + \tcode{\libglobalref{is_convertible_v} \&\& \libglobalref{is_convertible_v}} is \tcode{true}, then \tcode{\placeholdernc{COMMON-REF}(A, B)} is \tcode{C}. \item Otherwise, let \tcode{D} be \tcode{\placeholdernc{COMMON-REF}(const X\&, Y\&)}. If \tcode{A} is an rvalue reference and \tcode{B} is an lvalue reference and \tcode{D} is - well-formed and \tcode{is_convertible_v} is + well-formed and \tcode{\libglobalref{is_convertible_v}} is \tcode{true}, then \tcode{\placeholdernc{COMMON-REF}(A, B)} is \tcode{D}. \item Otherwise, if \tcode{A} is an lvalue reference and \tcode{B} is an rvalue reference, then \tcode{\placeholdernc{COMMON-REF}(A, B)} is @@ -2076,7 +2068,6 @@ \pnum For the \tcode{common_type} trait applied to a template parameter pack \tcode{T} of types, the member \tcode{type} shall be either defined or not present as follows: - \begin{itemize} \item If \tcode{sizeof...(T)} is zero, there shall be no member \tcode{type}. @@ -2163,7 +2154,7 @@ \item Let \tcode{R} be \tcode{\placeholdernc{COMMON-REF}(T1, T2)}. If \tcode{T1} and \tcode{T2} are reference types, \tcode{R} is well-formed, and - \tcode{is_convertible_v, add_pointer_t> \&\& is_convertible_v, add_pointer_t>} is \tcode{true}, + \tcode{is_convertible_v, add_pointer_t> \&\& is_convertible_v, add_pointer_t>} is \tcode{true}, then the member typedef \tcode{type} denotes \tcode{R}. \item Otherwise, if @@ -2362,7 +2353,7 @@ The class template \tcode{negation} forms the logical negation of its template type argument. The type \tcode{negation} -is a \oldconcept{UnaryTypeTrait} with a base characteristic of \tcode{bool_constant}. +is a \oldconceptref{UnaryTypeTrait} with a base characteristic of \tcode{bool_constant}. \end{itemdescr} \rSec2[meta.member]{Member relationships} diff --git a/source/numerics.tex b/source/numerics.tex index b07a973ac9..2f9cdc98c8 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -40,10 +40,10 @@ A \Cpp{} program shall instantiate these components only with a numeric type. A \defnadj{numeric}{type} is a cv-unqualified object type \tcode{T} that meets the -\oldconcept{DefaultConstructible}, -\oldconcept{CopyConstructible}, -\oldconcept{CopyAssignable}, and -\oldconcept{Destructible} +\oldconceptref{DefaultConstructible}, +\oldconceptref{CopyConstructible}, +\oldconceptref{CopyAssignable}, and +\oldconceptref{Destructible} requirements\iref{utility.arg.requirements}. \begin{footnote} In other words, value types. @@ -166,8 +166,8 @@ \rSec2[cfenv.thread]{Threads} \pnum -The floating-point environment has thread storage -duration\iref{basic.stc.thread}. The initial state for a thread's floating-point +The floating-point environment has \deflinkx{thread storage duration}{storage duration!thread}{basic.stc.thread}. +The initial state for a thread's floating-point environment is the state of the floating-point environment of the thread that constructs the corresponding \tcode{thread} object\iref{thread.thread.class} or \tcode{jthread} object\iref{thread.jthread.class} @@ -615,7 +615,6 @@ \pnum \returns \tcode{complex(lhs)}. - \end{itemdescr} \begin{itemdecl} @@ -754,7 +753,6 @@ \effects Inserts the complex number \tcode{x} onto the stream \tcode{o} as if it were implemented as follows: - \begin{codeblock} basic_ostringstream s; s.flags(o.flags()); @@ -1571,21 +1569,21 @@ is undefined unless the corresponding template argument is cv-unqualified and meets the requirements - of seed sequence\iref{rand.req.seedseq}. + of \link{seed sequence}{rand.req.seedseq}. \item that has a template type parameter named \tcode{URBG} is undefined unless the corresponding template argument is cv-unqualified and meets the requirements - of uniform random bit generator\iref{rand.req.urng}. + of \link{uniform random bit generator}{rand.req.urng}. \item that has a template type parameter named \tcode{Engine} is undefined unless the corresponding template argument is cv-unqualified and meets the requirements - of random number engine\iref{rand.req.eng}. + of \link{random number engine}{rand.req.eng}. \item that has a template type parameter named \tcode{RealType} @@ -1709,7 +1707,7 @@ \endhead \tcode{S::result_type} & \tcode{T} - & \tcode{T} is an unsigned integer type\iref{basic.fundamental} + & \tcode{T} is an \deflinkx{unsigned integer type}{type!unsigned integer}{basic.fundamental} of at least 32 bits. & compile-time \\ \rowsep @@ -1874,7 +1872,7 @@ \pnum A class \tcode{E} that meets the requirements -of a uniform random bit generator\iref{rand.req.urng} +of a \link{uniform random bit generator}{rand.req.urng} also meets the requirements of a \term{random number engine} if the expressions shown @@ -1895,7 +1893,7 @@ \tcode{s} is a value of \tcode{T}; \item \tcode{q} is an lvalue - meeting the requirements of a seed sequence\iref{rand.req.seedseq}; + meeting the requirements of a \link{seed sequence}{rand.req.seedseq}; \item \tcode{z} is a value of type \tcode{unsigned long long}; @@ -1934,19 +1932,19 @@ with the same initial state as all other default-constructed engines of type \tcode{E}. - & \bigoh{$\text{size of state}$} + & \bigoh{\text{size of state}} \\ \rowsep \tcode{E(x)} & & Creates an engine that compares equal to \tcode{x}. - & \bigoh{$\text{size of state}$} + & \bigoh{\text{size of state}} \\ \rowsep \tcode{E(s)}% & & Creates an engine with initial state determined by \tcode{s}. - & \bigoh{$\text{size of state}$} + & \bigoh{\text{size of state}} \\ \rowsep \tcode{E(q)}% \begin{footnote} @@ -2021,12 +2019,12 @@ returns \tcode{true} if $S_x = S_y$; else returns \tcode{false}. - & \bigoh{$\text{size of state}$} + & \bigoh{\text{size of state}} \\ \rowsep \tcode{x != y}% & \tcode{bool} & \tcode{!(x == y)}. - & \bigoh{$\text{size of state}$} + & \bigoh{\text{size of state}} \\ \rowsep \tcode{os << x}% & reference to the type of \tcode{os} @@ -2041,7 +2039,7 @@ by one or more space characters. \ensures The \tcode{os.}\textit{fmtflags} and fill character are unchanged. - & \bigoh{$\text{size of state}$} + & \bigoh{\text{size of state}} \\ \rowsep \tcode{is >> v}% & reference to the type of \tcode{is} @@ -2071,14 +2069,14 @@ were respectively the same as those of \tcode{is}. \ensures The \tcode{is.}\textit{fmtflags} are unchanged. - & \bigoh{$\text{size of state}$} + & \bigoh{\text{size of state}} \\ \end{libreqtab4d} \pnum \tcode{E} shall meet the -\oldconcept{CopyConstructible} (\tref{cpp17.copyconstructible}) -and \oldconcept{CopyAssignable} (\tref{cpp17.copyassignable}) requirements. +\oldconceptref{CopyConstructible} (\tref{cpp17.copyconstructible}) +and \oldconceptref{CopyAssignable} (\tref{cpp17.copyassignable}) requirements. These operations shall each be of complexity no worse than \bigoh{\text{size of state}}. @@ -2287,7 +2285,7 @@ \item \tcode{g}, \tcode{g1}, and \tcode{g2} are lvalues of a type meeting the requirements - of a uniform random bit generator\iref{rand.req.urng}; + of a \link{uniform random bit generator}{rand.req.urng}; \item \tcode{os} is an lvalue of the type of some class template specialization \tcode{basic_ostream}; @@ -2319,7 +2317,7 @@ \endhead \tcode{D::result_type} & \tcode{T} - & \tcode{T} is an arithmetic type\iref{basic.fundamental}. + & \tcode{T} is an \deflinkx{arithmetic type}{type!arithmetic}{basic.fundamental}. & compile-time \\ \rowsep \tcode{D::param_type} @@ -2448,8 +2446,8 @@ \pnum \tcode{D} shall meet the -\oldconcept{CopyConstructible} (\tref{cpp17.copyconstructible}) -and \oldconcept{CopyAssignable} (\tref{cpp17.copyassignable}) requirements. +\oldconceptref{CopyConstructible} (\tref{cpp17.copyconstructible}) +and \oldconceptref{CopyAssignable} (\tref{cpp17.copyassignable}) requirements. \pnum The sequence of numbers @@ -2480,10 +2478,10 @@ \pnum \tcode{P} shall meet the -\oldconcept{CopyConstructible} (\tref{cpp17.copyconstructible}), -\oldconcept{CopyAssignable} (\tref{cpp17.copyassignable}), +\oldconceptref{CopyConstructible} (\tref{cpp17.copyconstructible}), +\oldconceptref{CopyAssignable} (\tref{cpp17.copyassignable}), and -\oldconcept{Equality\-Comp\-arable} (\tref{cpp17.equalitycomparable}) requirements. +\oldconceptref{EqualityComparable} (\tref{cpp17.equalitycomparable}) requirements. \pnum For each of the constructors of \tcode{D} @@ -2526,7 +2524,7 @@ Each type instantiated from a class template specified in \ref{rand.eng} meets the requirements -of a random number engine\iref{rand.req.eng} type. +of a \link{random number engine}{rand.req.eng} type. \pnum Except where specified otherwise, @@ -3320,7 +3318,7 @@ Each type instantiated from a class template specified in \ref{rand.adapt} meets the requirements -of a random number engine adaptor\iref{rand.req.adapt} type. +of a \link{random number engine adaptor}{rand.req.adapt} type. \pnum Except where specified otherwise, @@ -4159,7 +4157,7 @@ \pnum \expects \tcode{InputIterator} meets the - \oldconcept{InputIterator} requirements\iref{input.iterators}. + \oldconceptref{InputIterator} requirements\iref{input.iterators}. \pnum \effects @@ -4186,7 +4184,7 @@ \pnum \expects \tcode{RandomAccessIterator} meets the - \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} + \oldconceptref{RandomAccessIterator} requirements\iref{random.access.iterators} and the requirements of a mutable iterator. \pnum @@ -4201,7 +4199,6 @@ each operation is to be carried out modulo $2^{32}$, each indexing operator applied to \tcode{begin} is to be taken modulo $n$, and $T(x)$ is defined as $x \xor (x \rightshift 27)$: - \begin{itemize} \item By way of initialization, @@ -4300,7 +4297,7 @@ \pnum \expects \tcode{OutputIterator} meets the - \oldconcept{OutputIterator} requirements\iref{output.iterators}. + \oldconceptref{OutputIterator} requirements\iref{output.iterators}. \pnum \effects @@ -4414,7 +4411,7 @@ Each type instantiated from a class template specified in \ref{rand.dist} meets the requirements -of a random number distribution\iref{rand.req.dist} type. +of a \link{random number distribution}{rand.req.dist} type. \pnum Descriptions are provided in \ref{rand.dist} @@ -5266,6 +5263,7 @@ \indexlibraryglobal{gamma_distribution}% \indexlibrarymember{result_type}{gamma_distribution}% +\indexlibrary{\idxcode{gamma_distribution}}% \begin{codeblock} namespace std { template @@ -5309,7 +5307,6 @@ } \end{codeblock} - \indexlibraryctor{gamma_distribution}% \begin{itemdecl} explicit gamma_distribution(RealType alpha, RealType beta = 1.0); @@ -5416,7 +5413,7 @@ \indexlibraryctor{weibull_distribution}% \begin{itemdecl} explicit weibull_distribution(RealType a, RealType b = 1.0); -\end{itemdecl}% +\end{itemdecl} \begin{itemdescr} \pnum @@ -5526,7 +5523,6 @@ } \end{codeblock} - \indexlibraryctor{extreme_value_distribution}% \begin{itemdecl} explicit extreme_value_distribution(RealType a, RealType b = 1.0); @@ -5650,7 +5646,6 @@ } \end{codeblock} - \indexlibraryctor{normal_distribution}% \begin{itemdecl} explicit normal_distribution(RealType mean, RealType stddev = 1.0); @@ -5854,7 +5849,6 @@ } \end{codeblock} - \indexlibraryctor{chi_squared_distribution}% \begin{itemdecl} explicit chi_squared_distribution(RealType n); @@ -6048,7 +6042,6 @@ } \end{codeblock} - \indexlibraryctor{fisher_f_distribution}% \begin{itemdecl} explicit fisher_f_distribution(RealType m, RealType n = 1); @@ -6151,7 +6144,6 @@ } \end{codeblock} - \indexlibraryctor{student_t_distribution}% \begin{itemdecl} explicit student_t_distribution(RealType n); @@ -6267,7 +6259,7 @@ } \end{codeblock} -\indexlibraryctor{discrete_distribution} +\indexlibraryctor{discrete_distribution}% \begin{itemdecl} discrete_distribution(); \end{itemdecl} @@ -6298,7 +6290,7 @@ \pnum \expects \tcode{InputIterator} meets the - \oldconcept{InputIterator} requirements\iref{input.iterators}. + \oldconceptref{InputIterator} requirements\iref{input.iterators}. If \tcode{firstW == lastW}, let $n = 1$ and $w_0 = 1$. Otherwise, @@ -6496,7 +6488,7 @@ \expects \tcode{InputIteratorB} and \tcode{InputIteratorW} each meet the - \oldconcept{InputIterator} requirements\iref{input.iterators}. + \oldconceptref{InputIterator} requirements\iref{input.iterators}. If \tcode{firstB == lastB} or \tcode{++firstB == lastB}, let $n = 1$, @@ -6731,7 +6723,7 @@ \expects \tcode{InputIteratorB} and \tcode{InputIteratorW} each meet the - \oldconcept{InputIterator} requirements\iref{input.iterators}. + \oldconceptref{InputIterator} requirements\iref{input.iterators}. If \tcode{firstB == lastB} or \tcode{++firstB == lastB}, let $n = 1$, @@ -7097,8 +7089,9 @@ \begin{itemize} \item for every function taking a -\tcode{const valarray\&} other than \tcode{begin} and -\tcode{end}\iref{valarray.range}, +\tcode{const valarray\&} other than +\libmemberrefx{begin}{begin}{valarray} and +\libmemberrefx{end}{end}{valarray}, identical functions taking the replacement types shall be added; \item for every function taking two @@ -7123,7 +7116,7 @@ \pnum These library functions are permitted to throw a -\tcode{bad_alloc}\iref{bad.alloc} exception if there are not sufficient resources available +\link{\tcode{bad_alloc}}{bad.alloc} exception if there are not sufficient resources available to carry out the operation. Note that the exception is not mandated. @@ -7283,7 +7276,7 @@ \pnum \effects Constructs a \tcode{valarray} that has length \tcode{n}. -Each element of the array is value-initialized\iref{dcl.init}. +Each element of the array is \deflinkx{value-initialized}{value-initialization}{dcl.init}. \end{itemdescr} \indexlibraryctor{valarray}% @@ -7543,7 +7536,7 @@ \pnum The reference returned by the subscript operator for an array shall be valid until the member function -\tcode{resize(size_t, T)}\iref{valarray.members} is called for that array or until the lifetime of +\libmemberrefx{resize(size_t, T)}{valarray}{resize} is called for that array or until the lifetime of that array ends, whichever happens first. \end{itemdescr} @@ -7969,7 +7962,7 @@ \pnum \begin{example} If the argument has the value $-2$, -the first two elements of the result will be value-initialized\iref{dcl.init}; the third element of the result will be assigned the value +the first two elements of the result will be \deflinkx{value-initialized}{value-initialization}{dcl.init}; the third element of the result will be assigned the value of the first element of \tcode{*this}; etc. \end{example} \end{itemdescr} @@ -8282,7 +8275,6 @@ to an operand of type \tcode{T}. This function returns a value of type \tcode{T} or which can be unambiguously implicitly converted to type \tcode{T}. - \end{itemdescr} \rSec3[valarray.special]{Specialized algorithms} @@ -8298,7 +8290,6 @@ Equivalent to \tcode{x.swap(y)}. \end{itemdescr} - \rSec2[class.slice]{Class \tcode{slice}} \rSec3[class.slice.overview]{Overview} @@ -8718,7 +8709,6 @@ This template is a helper template used by the \tcode{gslice} subscript operator - \indexlibraryglobal{gslice_array}% \indexlibraryglobal{valarray}% \begin{itemdecl} @@ -8844,7 +8834,6 @@ \pnum This template is a helper template used by the mask subscript operator: - \indexlibrarymember{operator[]}{mask_array}% \begin{itemdecl} mask_array valarray::operator[](const valarray&); @@ -8961,7 +8950,6 @@ \pnum This template is a helper template used by the indirect subscript operator - \indexlibrarymember{operator[]}{indirect_array}% \begin{itemdecl} indirect_array valarray::operator[](const valarray&); @@ -9081,12 +9069,12 @@ \pnum 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} +\oldconceptref{RandomAccessIterator}\iref{random.access.iterators} 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} +\oldconceptref{RandomAccessIterator} and models \libconcept{contiguous_iterator}, whose \tcode{value_type} is the template parameter \tcode{T} and whose \tcode{reference} type is \tcode{const T\&}. @@ -9094,7 +9082,7 @@ \pnum The iterators returned by \tcode{begin} and \tcode{end} for an array are guaranteed to be valid until the member function -\tcode{resize(size_t, T)}\iref{valarray.members} is called for that +\libmemberrefx{resize(size_t, T)}{valarray}{resize} is called for that array or until the lifetime of that array ends, whichever happens first. @@ -9731,12 +9719,12 @@ The contents and meaning of the header \libheader{cmath} are the same as the C standard library header \libheader{math.h}, with the addition of -a three-dimensional hypotenuse function\iref{c.math.hypot3}, -a linear interpolation function\iref{c.math.lerp}, and +a \link{three-dimensional hypotenuse function}{c.math.hypot3}, +a \link{linear interpolation function}{c.math.lerp}, and the mathematical special functions described in \ref{sf.cmath}. \begin{note} Several functions have additional overloads in this document, -but they have the same behavior as in the C standard library\iref{library.c}. +but they have the same behavior as in the \link{C standard library}{library.c}. \end{note} \pnum @@ -9800,7 +9788,7 @@ If \tcode{abs} is called with an argument of type \tcode{X} for which \tcode{is_unsigned_v} is \tcode{true} and if \tcode{X} cannot be converted to \tcode{int} -by integral promotion\iref{conv.prom}, the program is ill-formed. +by \link{integral promotion}{conv.prom}, the program is ill-formed. \begin{note} Allowing arguments that can be promoted to \tcode{int} provides compatibility with C. @@ -13700,7 +13688,7 @@ \mandates Let \tcode{a} be \tcode{\exposid{abs-if-needed}(declval())}. -Then, \tcode{decltype(\linebreak init + a * a} is convertible to \tcode{Scalar}. +Then, \tcode{decltype(init + a * a} is convertible to \tcode{Scalar}. \pnum \returns @@ -13906,7 +13894,7 @@ \mandates Let \tcode{a} be \tcode{\exposid{abs-if-needed}(declval())}. -Then, \tcode{decltype(\linebreak init + a * a)} +Then, \tcode{decltype(init + a * a)} is convertible to \tcode{Scalar}. \pnum diff --git a/source/overloading.tex b/source/overloading.tex index 48da87b1d2..07f9a5d05b 100644 --- a/source/overloading.tex +++ b/source/overloading.tex @@ -69,7 +69,7 @@ contexts within the language: \begin{itemize} \item -invocation of a function named in the function call syntax\iref{over.call.func}; +invocation of a function named in the \link{function call syntax}{over.call.func}; \item invocation of a function call operator, a pointer-to-function conversion function, a reference-to-pointer-to-function conversion @@ -83,14 +83,14 @@ of a class object\iref{over.match.ctor}; \item invocation of a user-defined conversion for -copy-initialization\iref{dcl.init} of a class object\iref{over.match.copy}; +\deflink{copy-initialization}{dcl.init} of a class object\iref{over.match.copy}; \item invocation of a conversion function for initialization of an object of a non-class type from an expression of class type\iref{over.match.conv}; and \item invocation of a conversion function for conversion in which a reference\iref{dcl.init.ref} -will be directly bound\iref{over.match.ref}. +will be \link{directly bound}{over.match.ref}. \end{itemize} Each of these contexts defines the set of candidate functions and @@ -98,7 +98,6 @@ But, once the candidate functions and argument lists have been identified, the selection of the best function is the same in all cases: - \begin{itemize} \item First, a subset of the candidate functions (those that have @@ -108,7 +107,7 @@ viable functions\iref{over.match.viable}. \item Then the best viable function is selected based on the -implicit conversion sequences\iref{over.best.ics} needed to +\link{implicit conversion sequences}{over.best.ics} needed to match each argument to the corresponding parameter of each viable function. \end{itemize} @@ -119,7 +118,7 @@ Otherwise overload resolution fails and the invocation is ill-formed. When overload resolution succeeds, -and the best viable function is not accessible\iref{class.access} in the context +and the best viable function is not \link{accessible}{class.access} in the context in which it is used, the program is ill-formed. @@ -233,7 +232,7 @@ converted to the type of the implicit object parameter. \begin{note} The fact that such an argument is an rvalue does not -affect the ranking of implicit conversion sequences\iref{over.ics.rank}. +affect the \link{ranking}{over.ics.rank} of implicit conversion sequences. \end{note} \pnum @@ -356,7 +355,7 @@ \indextext{overloading!resolution!function call syntax|(} \pnum -In a function call\iref{expr.call} +In a \link{function call}{expr.call} \begin{ncsimplebnf} postfix-expression \terminal{(} \opt{expression-list} \terminal{)} \end{ncsimplebnf} @@ -391,7 +390,6 @@ \grammarterm{postfix-expression}, perhaps nested arbitrarily deep in parentheses, has one of the following forms: - \begin{ncbnf} postfix-expression:\br postfix-expression \terminal{.} id-expression\br @@ -912,7 +910,7 @@ If a built-in candidate is selected by overload resolution, the operands of class type are converted to the types of the corresponding parameters of the selected operation function, except that the second standard conversion -sequence of a user-defined conversion sequence\iref{over.ics.user} is not applied. +sequence of a \link{user-defined conversion sequence}{over.ics.user} is not applied. Then the operator is treated as the corresponding built-in operator and interpreted according to \ref{expr.compound}. \begin{example} @@ -972,7 +970,6 @@ the lookup rules for operator function names in a function call, as shown in the following example: - \begin{codeblock} struct A { }; void operator + (A, A); @@ -995,10 +992,10 @@ \indextext{overloading!resolution!initialization} \pnum -When objects of class type are direct-initialized\iref{dcl.init}, +When objects of class type are \deflinkx{direct-initialized}{direct-initialization}{dcl.init}, copy-initialized from an expression of the same or a derived class type\iref{dcl.init}, -or default-initialized\iref{dcl.init}, +or \deflinkx{default-initialized}{default-initialization}{dcl.init}, overload resolution selects the constructor. For direct-initialization or default-initialization (including default-initialization in the context of copy-list-initialization), @@ -1034,10 +1031,9 @@ \tcode{T} a class type, the candidate functions are selected as follows: - \begin{itemize} \item -The converting constructors\iref{class.conv.ctor} of +The \deflinkx{converting constructors}{constructor!converting}{class.conv.ctor} of \tcode{T} are candidate functions. \item @@ -1080,7 +1076,6 @@ Assuming that ``\cv{} \tcode{T}'' is the type of the object being initialized, the candidate functions are selected as follows: - \begin{itemize} \item The permissible types for non-explicit conversion functions are @@ -1152,7 +1147,6 @@ is performed according to the rules in this subclause or when forming a list-initialization sequence according to \ref{over.ics.list}, overload resolution selects the constructor in two phases: - \begin{itemize} \item If the initializer list is not empty or \tcode{T} has no default constructor, @@ -1233,7 +1227,6 @@ For each \grammarterm{deduction-guide}, a function or function template with the following properties: - \begin{itemize} \item The \grammarterm{template-head}, if any, @@ -1689,7 +1682,7 @@ \tcode{F} to be a viable function, there shall exist for each argument an -implicit conversion sequence\iref{over.best.ics} that +\deflinkx{implicit conversion sequence}{conversion sequence!implicit}{over.best.ics} that converts that argument to the corresponding parameter of \tcode{F}. If the parameter has reference type, the implicit conversion sequence @@ -1753,8 +1746,8 @@ \end{example} or, if not that, -\item the context is an initialization by conversion function for direct -reference binding\iref{over.match.ref} of a reference to function type, the +\item the context is an initialization by conversion function for \link{direct +reference binding}{over.match.ref} of a reference to function type, the return type of $\tcode{F}_1$ is the same kind of reference (lvalue or rvalue) as the reference being initialized, and the return type of $\tcode{F}_2$ is not \begin{example} @@ -1895,7 +1888,7 @@ and $\tcode{F}_2$ is not, or, if not that, \item -$\tcode{F}_1$ is the copy deduction candidate\iref{over.match.class.deduct} +$\tcode{F}_1$ is the \deflink{copy deduction candidate}{over.match.class.deduct} and $\tcode{F}_2$ is not, or, if not that, \item @@ -2040,7 +2033,7 @@ \begin{note} Other properties, such as the lifetime, storage duration, linkage, alignment, accessibility of the argument, whether the argument is a bit-field, -and whether a function is deleted\iref{dcl.fct.def.delete}, are ignored. +and whether a function is \link{deleted}{dcl.fct.def.delete}, are ignored. So, although an implicit conversion sequence can be defined for a given argument-parameter pair, the conversion from the argument to the parameter might still @@ -2053,11 +2046,11 @@ sequence is one of the following forms: \begin{itemize} \item -a standard conversion sequence\iref{over.ics.scs}, +a \link{standard conversion sequence}{over.ics.scs}, \item -a user-defined conversion sequence\iref{over.ics.user}, or +a \link{user-defined conversion sequence}{over.ics.user}, or \item -an ellipsis conversion sequence\iref{over.ics.ellipsis}. +an \link{ellipsis conversion sequence}{over.ics.ellipsis}. \end{itemize} \pnum @@ -2238,10 +2231,10 @@ also has an associated rank (Exact Match, Promotion, or Conversion). These are used -to rank standard conversion sequences\iref{over.ics.rank}. +to \link{rank standard conversion sequences}{over.ics.rank}. The rank of a conversion sequence is determined by considering the -rank of each conversion in the sequence and the rank of any reference -binding\iref{over.ics.ref}. +rank of each conversion in the sequence and the rank of any \link{reference +binding}{over.ics.ref}. If any of those has Conversion rank, the sequence has Conversion rank; otherwise, if any of those has Promotion rank, the sequence has Promotion rank; otherwise, the sequence has Exact @@ -2278,7 +2271,7 @@ conversion sequence converts the source type to the type of the first parameter of that constructor. If the user-defined -conversion is specified by a conversion function\iref{class.conv.fct}, the +conversion is specified by a \link{conversion function}{class.conv.fct}, the initial standard conversion sequence converts the source type to the type of the object parameter of that conversion function. @@ -2409,7 +2402,7 @@ \rSec4[over.ics.list]{List-initialization sequence} \pnum -When an argument is an initializer list\iref{dcl.init.list}, it is not an +When an argument is an initializer list\iref{dcl.init.list}, it is not an % todo expression and special rules apply for converting it to a parameter type. \pnum @@ -2651,20 +2644,19 @@ (as defined in~\ref{over.best.ics}) \begin{itemize} \item -a standard conversion sequence\iref{over.ics.scs} is a better +a \link{standard conversion sequence}{over.ics.scs} is a better conversion sequence than a user-defined conversion sequence or an ellipsis conversion sequence, and \item -a user-defined conversion sequence\iref{over.ics.user} is a -better conversion sequence than an ellipsis conversion -sequence\iref{over.ics.ellipsis}. +a \link{user-defined conversion sequence}{over.ics.user} is a +better conversion sequence than an \link{ellipsis conversion +sequence}{over.ics.ellipsis}. \end{itemize} \pnum Two implicit conversion sequences of the same form are indistinguishable conversion sequences unless one of the following rules applies: - \begin{itemize} \item List-initialization sequence \tcode{L1} is a better conversion sequence than @@ -2900,7 +2892,6 @@ // better than \tcode{short} $\to$ \tcode{float}. \end{codeblock} \end{example} - \end{itemize} \pnum @@ -2909,7 +2900,6 @@ a Conversion. Two conversion sequences with the same rank are indistinguishable unless one of the following rules applies: - \begin{itemize} \item A conversion that does not convert a pointer or a pointer to member @@ -3103,11 +3093,11 @@ \item an object or reference being initialized\iref{dcl.init,dcl.init.ref,dcl.init.list}, \item -the left side of an assignment\iref{expr.ass}, +the left side of an \link{assignment}{expr.ass}, \item a parameter of a function\iref{expr.call}, \item -a parameter of a user-defined operator\iref{over.oper}, +a parameter of a \link{user-defined operator}{over.oper}, \item the return value of a function, operator function, or conversion\iref{stmt.return}, \item @@ -3291,8 +3281,8 @@ and \tcode{[]} are formed from more than one token. -The latter two operators are function call\iref{expr.call} -and subscripting\iref{expr.sub}. +The latter two operators are \link{function call}{expr.call} +and \link{subscripting}{expr.sub}. \end{note} \indextext{operator!subscripting}% \indextext{operator!function call}% @@ -3393,7 +3383,7 @@ \pnum \indextext{argument!overloaded operator and default}% -An operator function cannot have default arguments\iref{dcl.fct.default}, +An operator function cannot have \link{default arguments}{dcl.fct.default}, except where explicitly stated below. Operator functions cannot have more or fewer parameters than the @@ -3729,7 +3719,7 @@ In this subclause, the term \defn{promoted integral type} is used to refer to those cv-unqualified integral types which are preserved by -integral promotion\iref{conv.prom} (including e.g. +\link{integral promotion}{conv.prom} (including e.g. \tcode{int} and \tcode{long} @@ -4065,7 +4055,6 @@ \pnum The declaration of a literal operator shall have a \grammarterm{parameter-declaration-clause} equivalent to one of the following: - \begin{codeblock} const char* unsigned long long int diff --git a/source/preprocessor.tex b/source/preprocessor.tex index 23944f5bc4..75936f0d48 100644 --- a/source/preprocessor.tex +++ b/source/preprocessor.tex @@ -143,7 +143,6 @@ (optionally after whitespace containing no new-line characters) or follows whitespace containing at least one new-line character, and is - \begin{itemize} \item a \tcode{\#} preprocessing token, or @@ -418,7 +417,7 @@ Each preprocessing token that remains (in the list of preprocessing tokens that will become the controlling expression) after all macro replacements have occurred -shall be in the lexical form of a token\iref{lex.token}. +shall be in the lexical form of a \link{token}{lex.token}. \pnum Preprocessing directives of the forms @@ -464,8 +463,8 @@ \tcode{0}, and then each preprocessing token is converted into a token. \begin{note} -An alternative -token\iref{lex.digraph} is not an identifier, +An \link{alternative +token}{lex.digraph} is not an identifier, even when its spelling consists entirely of letters and underscores. Therefore it is not subject to this replacement. \end{note} @@ -483,8 +482,8 @@ implementation where \tcode{std::numeric_limits::max()} is \tcode{0x7FFF} and \tcode{std::numeric_limits::max()} is \tcode{0xFFFF}, the integer literal \tcode{0x8000} is signed and positive within a \tcode{\#if} -expression even though it is unsigned in translation phase -7\iref{lex.phases}. +expression even though it is unsigned in \link{translation phase +7}{lex.phases}. \end{note} This includes interpreting \grammarterm{character-literal}s according to the rules in \ref{lex.ccon}. @@ -558,7 +557,6 @@ \begin{example} This demonstrates a way to include a library \tcode{optional} facility only if it is available: - \begin{codeblock} #if __has_include() # include @@ -717,14 +715,12 @@ with the implementation and the \tcode{" "} form for sources outside the control of the implementation achieves wider portability. For instance: - \begin{codeblock} #include #include #include "usefullib.h" #include "myprog.h" \end{codeblock} - \end{note} \pnum @@ -732,7 +728,6 @@ This illustrates macro-replaced \tcode{\#include} directives: - \begin{codeblock} #if VERSION == 1 #define INCFILE "vers1.h" @@ -1458,7 +1453,6 @@ \pnum \begin{example} In the following fragment: - \begin{codeblock} #define hash_hash # ## # #define mkstr(a) # a @@ -1468,7 +1462,6 @@ \end{codeblock} The expansion produces, at various stages: - \begin{codeblock} join(x, y) in_between(x hash_hash y) @@ -1602,7 +1595,7 @@ \defn{line number} of the current source line is one greater than the number of new-line characters read or introduced -in translation phase 1\iref{lex.phases} +in \link{translation phase 1}{lex.phases} while processing the source file to the current token. \pnum @@ -1696,7 +1689,6 @@ \pnum The following macro names shall be defined by the implementation: - \begin{description} \item @@ -1910,7 +1902,6 @@ \pnum The following macro names are conditionally defined by the implementation: - \begin{description} \item \indextext{__stdc__@\mname{STDC}}% @@ -1944,8 +1935,7 @@ \indextext{__stdcpp_threads__@\mname{STDCPP_THREADS}}% \mname{STDCPP_THREADS}\\ Defined, and has the value integer literal 1, if and only if a program -can have more than one thread of execution\iref{intro.multithread}. - +can have more than one \link{thread of execution}{intro.multithread}. \end{description} \pnum diff --git a/source/ranges.tex b/source/ranges.tex index 18fd5561d3..36ee86b6a9 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -626,7 +626,6 @@ Given a subexpression \tcode{E} with type \tcode{T}, let \tcode{t} be an lvalue that denotes the reified object for \tcode{E}. Then: - \begin{itemize} \item If \tcode{E} is an rvalue and @@ -687,7 +686,6 @@ Given a subexpression \tcode{E} with type \tcode{T}, let \tcode{t} be an lvalue that denotes the reified object for \tcode{E}. Then: - \begin{itemize} \item If \tcode{E} is an rvalue and @@ -813,7 +811,6 @@ Given a subexpression \tcode{E} with type \tcode{T}, let \tcode{t} be an lvalue that denotes the reified object for \tcode{E}. Then: - \begin{itemize} \item If \tcode{E} is an rvalue and @@ -877,7 +874,6 @@ Given a subexpression \tcode{E} with type \tcode{T}, let \tcode{t} be an lvalue that denotes the reified object for \tcode{E}. Then: - \begin{itemize} \item If \tcode{E} is an rvalue and @@ -1002,7 +998,6 @@ Given a subexpression \tcode{E} with type \tcode{T}, let \tcode{t} be an lvalue that denotes the reified object for \tcode{E}. Then: - \begin{itemize} \item If \tcode{T} is an array of unknown bound\iref{term.array.type}, @@ -1088,7 +1083,6 @@ Given a subexpression \tcode{E} with type \tcode{T}, let \tcode{t} be an lvalue that denotes the reified object for \tcode{E}. Then: - \begin{itemize} \item If \tcode{T} is an array of unknown bound\iref{term.array.type}, @@ -1139,7 +1133,6 @@ Given a subexpression \tcode{E} with type \tcode{T}, let \tcode{t} be an lvalue that denotes the reified object for \tcode{E}. Then: - \begin{itemize} \item If \tcode{E} is an rvalue and @@ -1624,7 +1617,6 @@ \pnum Many of the types in \ref{range.utility} are specified in terms of the following exposition-only concepts: - \begin{codeblock} template concept @\defexposconceptnc{simple-view}@ = // \expos @@ -3533,7 +3525,7 @@ Initializes \exposid{value_} with \tcode{make_from_tuple(std::move(value_args))} and -initializes\linebreak{} \exposid{bound_} with +initializes \exposid{bound_} with \tcode{make_from_tuple(std::move(bound_args))}. The behavior is undefined if \tcode{Bound} is not \tcode{unreachable_sentinel_t} and @@ -5714,7 +5706,6 @@ \tcode{views::take(E, F)} is ill-formed. Otherwise, the expression \tcode{views::take(E, F)} is expression-equivalent to: - \begin{itemize} \item If \tcode{T} is a specialization @@ -5735,7 +5726,6 @@ ranges::be\-gin(E) + std::min(ranges::distance(E), F))}, except that \tcode{E} is evaluated only once, where \tcode{U} is a type determined as follows: - \begin{itemize} \item if \tcode{T} is a specialization of \tcode{span}, then \tcode{U} is \tcode{span}; @@ -5751,7 +5741,7 @@ that models \libconcept{random_access_range} and \libconcept{sized_range}, then \tcode{iota_view(*ranges::begin(E), -*(ranges::begin(E) + std::\linebreak{}min(ranges::distance(E), F)))}, +*(ranges::begin(E) + std::min(ranges::distance(E), F)))}, except that \tcode{E} is evaluated only once. \item @@ -6179,7 +6169,6 @@ \tcode{views::drop(E, F)} is ill-formed. Otherwise, the expression \tcode{views::drop(E, F)} is expression-equivalent to: - \begin{itemize} \item If \tcode{T} is a specialization of @@ -6210,7 +6199,7 @@ a specialization of \tcode{subrange} that models \libconcept{random_access_range} and \libconcept{sized_range}, then -\tcode{T(ranges::begin(E) + std::min(ranges::distance(E), F), ranges::\linebreak{}end(E), +\tcode{T(ranges::begin(E) + std::min(ranges::distance(E), F), ranges::end(E), \exposid{to-unsigned-like}(ranges::distance(E) - std::min(ranges::distance(E), F)))}, except that \tcode{E} and \tcode{F} are each evaluated only once. @@ -6660,7 +6649,7 @@ then \tcode{iterator_concept} denotes \tcode{bidirectio\-nal_iterator_tag}. \item Otherwise, if \exposid{ref-is-glvalue} is \tcode{true} and \exposid{Base} and \tcode{range_reference_t<\exposid{Base}>} - each model \libconceptx{for\-ward_range}{forward_range}, then \tcode{iterator_concept} denotes + each model \libconceptx{forward_range}{forward_range}, then \tcode{iterator_concept} denotes \tcode{forward_iterator_tag}. \item Otherwise, \tcode{iterator_concept} denotes \tcode{input_iterator_tag}. \end{itemize} @@ -7238,7 +7227,6 @@ \exposid{Base} and \exposid{InnerBase} each model \libconcept{forward_range}. In that case, \tcode{\exposid{iterator}::iterator_category} is defined as follows: - \begin{itemize} \item Let \placeholder{OUTERC} denote @@ -7246,7 +7234,7 @@ let \placeholder{INNERC} denote \tcode{iterator_traits<\exposid{InnerIter}>::iterator_category}, and let \placeholder{PATTERNC} denote -\tcode{iterator_-\linebreak traits<\exposid{PatternIter}>::iterator_category}. +\tcode{iterator_traits<\exposid{PatternIter}>::iterator_category}. \item If \begin{codeblock} @@ -7738,7 +7726,7 @@ \pnum \effects Initializes \exposid{base_} with \tcode{views::all(std::forward(r))}, and -\exposid{pattern_} with \tcode{views::\linebreak single(std::move(e))}. +\exposid{pattern_} with \tcode{views::single(std::move(e))}. \end{itemdescr} \rSec3[range.lazy.split.outer]{Class template \tcode{lazy_split_view::\exposid{outer-iterator}}} @@ -8049,7 +8037,7 @@ \begin{itemize} \item \tcode{forward_iterator_tag} if -\tcode{iterator_traits>::iterator_category} models \linebreak +\tcode{iterator_traits>::iterator_category} models \tcode{\libconcept{derived_from}}; \item otherwise, \tcode{iterator_traits>::iterator_category}. \end{itemize} @@ -8267,7 +8255,7 @@ \pnum \effects Initializes \exposid{base_} with \tcode{views::all(std::forward(r))}, and -\exposid{pattern_} with \tcode{views::\linebreak single(std::move(e))}. +\exposid{pattern_} with \tcode{views::single(std::move(e))}. \end{itemdescr} \begin{itemdecl} @@ -8819,7 +8807,7 @@ \item Otherwise, if \tcode{\exposconcept{all-forward}} is modeled, -then \tcode{iterator_concept} denotes \tcode{for\-ward_iterator_tag}. +then \tcode{iterator_concept} denotes \tcode{forward_iterator_tag}. \item Otherwise, \tcode{iterator_concept} denotes \tcode{input_iterator_tag}. \end{itemize} @@ -8845,14 +8833,14 @@ \begin{itemize} \item If -\tcode{(\libconcept{derived_from} \&\& ...) \&\& \exposconceptx{concat-is-random-ac-\linebreak{}cess}{concat-is-random-access}} +\tcode{(\libconcept{derived_from} \&\& ...) \&\& \exposconceptx{concat-is-random-access}{concat-is-random-access}} is \tcode{true}, \tcode{iterator_category} denotes \tcode{random_access_iterator_tag}. \item Otherwise, if -\tcode{(\libconcept{derived_from} \&\& ...) \&\& \exposconceptx{concat-is-\linebreak{}bidirectional}{concat-is-bidirectional}} +\tcode{(\libconcept{derived_from} \&\& ...) \&\& \exposconceptx{concat-is-bidirectional}{concat-is-bidirectional}} is \tcode{true}, -\tcode{iterator_category} denotes \tcode{bidirectional_iter\-ator_tag}. +\tcode{iterator_category} denotes \tcode{bidirectional_iterator_tag}. \item Otherwise, if \tcode{(\libconcept{derived_from} \&\& ...)} @@ -9304,11 +9292,11 @@ %FIXME This is hard to parse. If \tcode{$i_\tcode{x}$ > $i_\tcode{y}$}, let \tcode{$d_\tcode{y}$} be -\tcode{ranges::distance(std::get<$i_\tcode{y}$>(y.\exposid{it_}), ranges::end(std::get<$i_\tcode{y}$>(y.\linebreak{}\exposid{parent_}->\exposid{views_})))}, +\tcode{ranges::distance(std::get<$i_\tcode{y}$>(y.\exposid{it_}), ranges::end(std::get<$i_\tcode{y}$>(y.\exposid{parent_}->\exposid{views_})))}, \tcode{$d_\tcode{x}$} be -\tcode{ranges::distance(ranges::begin(std::get<$i_\tcode{x}$>(x.\exposid{parent_}->\linebreak{}\exposid{views_})), std::get<$i_\tcode{x}$>(x.\exposid{it_}))}. +\tcode{ranges::distance(ranges::begin(std::get<$i_\tcode{x}$>(x.\exposid{parent_}->\exposid{views_})), std::get<$i_\tcode{x}$>(x.\exposid{it_}))}. Let \tcode{$s$} denote the sum of the sizes of all the ranges -\tcode{std::get<\linebreak{}$i$>(x.\exposid{parent_}->\exposid{views_})} +\tcode{std::get<$i$>(x.\exposid{parent_}->\exposid{views_})} for every integer \tcode{$i$} in the range \range{$i_\tcode{y}$ + 1}{$i_\tcode{x}$} if there is any, and @@ -9351,7 +9339,7 @@ Let \tcode{$i_\tcode{x}$} denote \tcode{x.\exposid{it_}.index()}, \tcode{$d_\tcode{x}$} be -\tcode{ranges::distance(std::get<$i_\tcode{x}$>(x.\exposid{it_}), ranges::\linebreak{}end(std::get<$i_\tcode{x}$>(x.\exposid{parent_}->\exposid{views_})))}. +\tcode{ranges::distance(std::get<$i_\tcode{x}$>(x.\exposid{it_}), ranges::end(std::get<$i_\tcode{x}$>(x.\exposid{parent_}->\exposid{views_})))}. Let \tcode{$s$} denote the sum of the sizes of all the ranges \tcode{std::get<$i$>(x.\exposid{parent_}->\exposid{views_})} for every integer \tcode{$i$} in the range @@ -9505,11 +9493,10 @@ \end{note} Otherwise, \tcode{views::counted(E, F)} is expression-equivalent to: - \begin{itemize} \item If \tcode{T} models \libconcept{contiguous_iterator}, -then \tcode{span(to_address(E), static_cast(static_-\linebreak{}cast(F)))}. +then \tcode{span(to_address(E), static_cast(static_cast(F)))}. \item Otherwise, if \tcode{T} models \libconcept{random_access_iterator}, @@ -11284,7 +11271,7 @@ \item Otherwise, if \tcode{\exposconcept{all-forward}} is modeled, -then \tcode{iterator_concept} denotes \tcode{for\-ward_iterator_tag}. +then \tcode{iterator_concept} denotes \tcode{forward_iterator_tag}. \item Otherwise, \tcode{iterator_concept} denotes \tcode{input_iterator_tag}. \end{itemize} @@ -13054,7 +13041,7 @@ \item If \tcode{invoke_result_t<\exposid{maybe-const}\&, \exposid{REPEAT}(range_reference_t<\exposid{Base}>, N)...>} -is\linebreak not a reference, +is not a reference, \tcode{iterator_category} denotes \tcode{input_iterator_tag}. \item Otherwise, let \tcode{C} denote the type @@ -14065,7 +14052,7 @@ \effects Initializes \exposid{current_} with \tcode{current}, \exposid{end_} with \tcode{ranges::end(parent->\exposid{base_})}, -\exposid{n_} with \tcode{parent\linebreak ->\exposid{n_}}, and +\exposid{n_} with \tcode{parent->\exposid{n_}}, and \exposid{missing_} with \tcode{missing}. \end{itemdescr} diff --git a/source/statements.tex b/source/statements.tex index 9940ee28de..f2eced7b7d 100644 --- a/source/statements.tex +++ b/source/statements.tex @@ -197,7 +197,7 @@ \end{bnf} The expression is -a discarded-value expression\iref{expr.context}. +a \deflink{discarded-value expression}{expr.context}. All \indextext{side effects}% side effects from an expression statement @@ -428,10 +428,10 @@ otherwise, it is the value of the decision variable. The value of the condition shall be of integral type, enumeration type, or class type. If of class type, the -condition is contextually implicitly converted\iref{conv} to +condition is \deflink{contextually implicitly converted}{conv} to an integral or enumeration type. -If the (possibly converted) type is subject to integral -promotions\iref{conv.prom}, the condition is converted +If the (possibly converted) type is subject to \link{integral +promotions}{conv.prom}, the condition is converted to the promoted type. Any statement within the \keyword{switch} statement can be labeled with one or @@ -441,7 +441,7 @@ \keyword{case} constant-expression \terminal{:} \end{ncbnf} where the \grammarterm{constant-expression} shall be -a converted constant expression\iref{expr.const} of the +a converted \link{constant expression}{expr.const} of the adjusted type of the switch condition. No two of the case constants in the same switch shall have the same value after conversion. @@ -540,7 +540,7 @@ \pnum \indextext{scope!\idxgram{iteration-statement}}% The substatement in an \grammarterm{iteration-statement} implicitly defines -a block scope\iref{basic.scope} which is entered and exited each time +a block \link{scope}{basic.scope} which is entered and exited each time through the loop. If the substatement in an \grammarterm{iteration-statement} is a single statement and not a \grammarterm{compound-statement}, @@ -638,7 +638,7 @@ \indextext{statement!\idxcode{do}} \pnum -The expression is contextually converted to \tcode{bool}\iref{conv}; +The expression is \deflinkx{contextually converted to \tcode{bool}}{conversion!contextual to \tcode{bool}}{conv}; if that conversion is ill-formed, the program is ill-formed. \pnum @@ -719,7 +719,6 @@ \item \exposid{begin-expr} and \exposid{end-expr} are determined as follows: - \begin{itemize} \item if the type of \exposid{range} is a reference to an array type \tcode{R}, \exposid{begin-expr} and \exposid{end-expr} are @@ -807,8 +806,8 @@ \indextext{local variable!destruction of}% \indextext{scope!destructor and exit from}% \begin{note} -On exit from a scope (however accomplished), objects with automatic storage -duration\iref{basic.stc.auto} that have been constructed in that scope are destroyed +On exit from a scope (however accomplished), objects with \link{automatic storage +duration}{basic.stc.auto} that have been constructed in that scope are destroyed in the reverse order of their construction\iref{stmt.dcl}. For temporaries, see~\ref{class.temporary}. However, the program can be terminated (by calling @@ -850,7 +849,6 @@ causes control to pass to the loop-continuation portion of the smallest such enclosing statement, that is, to the end of the loop. More precisely, in each of the statements - \begin{minipage}{.30\hsize} \begin{codeblock} while (foo) { @@ -881,7 +879,6 @@ } \end{codeblock} \end{minipage} - a \keyword{continue} not contained in an enclosed iteration statement is equivalent to \tcode{goto} \exposid{contin}. @@ -908,7 +905,7 @@ the \tcode{return} statement initializes the returned reference or prvalue result object of the (explicit or implicit) function call -by copy-initialization\iref{dcl.init} from the operand. +by \deflink{copy-initialization}{dcl.init} from the operand. \begin{note} A constructor or destructor does not have a return type. \end{note} @@ -1031,7 +1028,7 @@ The \tcode{goto} statement unconditionally transfers control to the statement labeled by the identifier. The identifier shall be a \indextext{label}% -label\iref{stmt.label} located in the current function. +\link{label}{stmt.label} located in the current function. \rSec1[stmt.dcl]{Declaration statement}% \indextext{statement!declaration} @@ -1100,8 +1097,8 @@ \indextext{initialization!local \tcode{static}}% \indextext{initialization!local \tcode{thread_local}}% Dynamic initialization of a block variable with -static storage duration\iref{basic.stc.static} or -thread storage duration\iref{basic.stc.thread} is performed +\link{static storage duration}{basic.stc.static} or +\link{thread storage duration}{basic.stc.thread} is performed the first time control passes through its declaration; such a variable is considered initialized upon the completion of its initialization. If the initialization exits by throwing an exception, the initialization is not @@ -1144,8 +1141,8 @@ \pnum There is an ambiguity in the grammar involving \grammarterm{expression-statement}{s} and \grammarterm{declaration}{s}: An -\grammarterm{expression-statement} with a function-style explicit type -conversion\iref{expr.type.conv} as its leftmost subexpression can be +\grammarterm{expression-statement} with a \link{function-style explicit type +conversion}{expr.type.conv} as its leftmost subexpression can be indistinguishable from a \grammarterm{declaration} where the first \grammarterm{declarator} starts with a \tcode{(}. In those cases the \grammarterm{statement} is considered a \grammarterm{declaration}, diff --git a/source/strings.tex b/source/strings.tex index c0dc123c6f..a5a3c68c7e 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -151,19 +151,19 @@ the smallest \tcode{q} in \tcode{[p,p+n)} such that \tcode{X::eq(*q,c)} is \tcode{true}, \tcode{nullptr} otherwise. & linear \\ \rowsep \tcode{X::move(s,p,n)} & \tcode{X::char_type*} & -for each \tcode{i} in \tcode{[0,n)}, performs \tcode{X::assign(s[i],p[i])}. -Copies correctly even where the ranges \tcode{[p,p+n)} and \tcode{[s,s+n)} overlap.\br \returns \tcode{s}. & linear \\ \rowsep +for each \tcode{i} in \range{0}{n}, performs \tcode{X::assign(s[i],p[i])}. +Copies correctly even where the ranges \range{p}{p+n} and \range{s}{s+n} overlap.\br \returns \tcode{s}. & linear \\ \rowsep \tcode{X::copy(s,p,n)} & \tcode{X::char_type*} & \expects The ranges \range{p}{p+n} and \range{s}{s+n} do not overlap.\par \returns \tcode{s}.\br for each \tcode{i} in -\tcode{[0,n)}, performs \tcode{X::assign(s[i],p[i])}. & linear \\ \rowsep +\range{0}{n}, performs \tcode{X::assign(s[i],p[i])}. & linear \\ \rowsep \tcode{X::assign(r,d)} & (not used) & assigns \tcode{r=d}. & constant \\ \rowsep \tcode{X::assign\-(s,n,c)} & \tcode{X::char_type*} & -for each \tcode{i} in \tcode{[0,n)}, performs +for each \tcode{i} in \range{0}{n}, performs \tcode{X::assign(s[i],c)}.\br \returns \tcode{s}. & linear \\ \rowsep @@ -237,10 +237,10 @@ \pnum \expects \tcode{state_type} meets the -\oldconcept{Destructible} (\tref{cpp17.destructible}), -\oldconcept{CopyAssignable} (\tref{cpp17.copyassignable}), -\oldconcept{CopyConstructible} (\tref{cpp17.copyconstructible}), and -\oldconcept{DefaultConstructible} (\tref{cpp17.defaultconstructible}) requirements. +\oldconceptref{Destructible} (\tref{cpp17.destructible}), +\oldconceptref{CopyAssignable} (\tref{cpp17.copyassignable}), +\oldconceptref{CopyConstructible} (\tref{cpp17.copyconstructible}), and +\oldconceptref{DefaultConstructible} (\tref{cpp17.defaultconstructible}) requirements. \end{itemdescr} \rSec2[char.traits.specializations]{\tcode{char_traits} specializations} @@ -925,7 +925,7 @@ \pnum A type that meets the requirements of a constant -\oldconcept{RandomAccessIterator}\iref{random.access.iterators}, +\oldconceptref{RandomAccessIterator}\iref{random.access.iterators}, 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}. @@ -5507,13 +5507,13 @@ are the same as the C standard library header \libheader{string.h}. \pnum -The functions \tcode{strerror} and \tcode{strtok} are not required to avoid data -races\iref{res.on.data.races}. +The functions \tcode{strerror} and \tcode{strtok} are not required to +\link{avoid data races}{res.on.data.races}. \pnum \indextext{signal-safe!\idxcode{memcpy}}% \indextext{signal-safe!\idxcode{memmove}}% -The functions \tcode{memcpy} and \tcode{memmove} are signal-safe\iref{support.signal}. +The functions \tcode{memcpy} and \tcode{memmove} are \deflinkx{signal-safe}{evaluation!signal-safe}{support.signal}. Both functions implicitly create objects\iref{intro.object} in the destination region of storage immediately prior to copying the sequence of characters to the destination. @@ -5523,7 +5523,7 @@ The functions \tcode{strchr}, \tcode{strpbrk}, \tcode{strrchr}, \tcode{strstr}, and \tcode{memchr}, have different signatures in this document, -but they have the same behavior as in the C standard library\iref{library.c}. +but they have the same behavior as in the \link{C standard library}{library.c}. \end{note} \xrefc{7.24} diff --git a/source/support.tex b/source/support.tex index 28c15ac913..aef627036a 100644 --- a/source/support.tex +++ b/source/support.tex @@ -43,22 +43,15 @@ \rSec2[cstddef.syn]{Header \tcode{} synopsis} -\indexlibraryglobal{NULL}% -\indexlibraryglobal{offsetof}% -\indexlibraryglobal{ptrdiff_t}% -\indexlibraryglobal{size_t}% -\indexlibraryglobal{max_align_t}% -\indexlibraryglobal{nullptr_t}% -\indexlibraryglobal{byte}% \begin{codeblock} // all freestanding namespace std { - using ptrdiff_t = @\seebelow@; - using size_t = @\seebelow@; - using max_align_t = @\seebelow@; - using nullptr_t = decltype(nullptr); + using @\libglobal{ptrdiff_t}@ = @\seebelow@; + using @\libglobal{size_t}@ = @\seebelow@; + using @\libglobal{max_align_t}@ = @\seebelow@; + using @\libglobal{nullptr_t}@ = decltype(nullptr); - enum class byte : unsigned char {}; + enum class @\libglobal{byte}@ : unsigned char {}; // \ref{support.types.byteops}, \tcode{byte} type operations template @@ -80,8 +73,8 @@ constexpr IntType to_integer(byte b) noexcept; } -#define NULL @\seebelow@ -#define offsetof(P, D) @\seebelow@ +#define @\libglobal{NULL}@ @\seebelow@ +#define @\libglobal{offsetof}@(P, D) @\seebelow@ \end{codeblock} \pnum @@ -99,11 +92,6 @@ \rSec2[cstdlib.syn]{Header \tcode{} synopsis} \indexheader{cstdlib}% -\indexlibraryglobal{EXIT_FAILURE}% -\indexlibraryglobal{EXIT_SUCCESS}% -\indexlibraryglobal{MB_CUR_MAX}% -\indexlibraryglobal{NULL}% -\indexlibraryglobal{RAND_MAX}% \indexlibraryglobal{_Exit}% \indexlibraryglobal{abort}% \indexlibraryglobal{abs}% @@ -120,7 +108,6 @@ \indexlibraryglobal{div_t}% \indexlibraryglobal{exit}% \indexlibraryglobal{free}% -\indexlibraryglobal{getenv}% \indexlibraryglobal{labs}% \indexlibraryglobal{ldiv}% \indexlibraryglobal{ldiv_t}% @@ -155,11 +142,11 @@ using lldiv_t = @\seebelow@; // freestanding } -#define NULL @\seebelow@ // freestanding -#define EXIT_FAILURE @\seebelow@ // freestanding -#define EXIT_SUCCESS @\seebelow@ // freestanding -#define RAND_MAX @\seebelow@ -#define MB_CUR_MAX @\seebelow@ +#define @\libglobal{NULL}@ @\seebelow@ // freestanding +#define @\libglobal{EXIT_FAILURE}@ @\seebelow@ // freestanding +#define @\libglobal{EXIT_SUCCESS}@ @\seebelow@ // freestanding +#define @\libglobal{RAND_MAX}@ @\seebelow@ +#define @\libglobal{MB_CUR_MAX}@ @\seebelow@ namespace std { // Exposition-only function type aliases @@ -178,7 +165,7 @@ [[noreturn]] void _Exit(int status) noexcept; // freestanding [[noreturn]] void quick_exit(int status) noexcept; // freestanding - char* getenv(const char* name); + char* @\libglobal{getenv}@(const char* name); int system(const char* string); // \ref{c.malloc}, C library memory allocation @@ -251,7 +238,7 @@ \ref{c.math.abs}. \begin{note} Several functions have additional overloads in this document, -but they have the same behavior as in the C standard library\iref{library.c}. +but they have the same behavior as in the \link{C standard library}{library.c}. \end{note} \xrefc{7.22} @@ -305,8 +292,8 @@ is overloaded for any of the types involved. \end{footnote} The expression \tcode{offsetof(\placeholder{type}, \placeholder{member-designator})} -is never type-dependent\iref{temp.dep.expr} and it is -value-dependent\iref{temp.dep.constexpr} if and only if \tcode{\placeholder{type}} is +is never \link{type-dependent}{temp.dep.expr} and it is +\link{value-dependent}{temp.dep.constexpr} if and only if \tcode{\placeholder{type}} is dependent. The result of applying the \tcode{offsetof} macro to a static data member or a function member is undefined. No operation invoked by the \tcode{offsetof} macro shall throw an exception and @@ -1011,7 +998,7 @@ \pnum Non-arithmetic standard types, such as -\tcode{complex}\iref{complex}, shall not have specializations. +\link{\tcode{complex}}{complex}, shall not have specializations. \rSec3[numeric.limits.members]{\tcode{numeric_limits} members} @@ -2047,7 +2034,7 @@ thread, or static storage duration and without calling functions passed to \tcode{atexit()}\iref{basic.start.term}. \indextext{signal-safe!\idxcode{_Exit}}% -The function \tcode{_Exit} is signal-safe\iref{support.signal}. +The function \tcode{_Exit} is \deflinkx{signal-safe}{evaluation!signal-safe}{support.signal}. \end{itemdescr} \indexlibraryglobal{abort}% @@ -2067,7 +2054,7 @@ duration and without calling functions passed to \tcode{atexit()}\iref{basic.start.term}. \indextext{signal-safe!\idxcode{abort}}% -The function \tcode{abort} is signal-safe\iref{support.signal}. +The function \tcode{abort} is \deflinkx{signal-safe}{evaluation!signal-safe}{support.signal}. \end{itemdescr} \indexlibraryglobal{atexit}% @@ -2084,7 +2071,8 @@ functions register the function pointed to by \tcode{f} to be called without arguments at normal program termination. It is unspecified whether a call to \tcode{atexit()} that does not -happen before\iref{intro.multithread} a call to \tcode{exit()} will succeed. +\deflinkx{happen before}{happens before}{intro.multithread} +a call to \tcode{exit()} will succeed. \begin{note} The \tcode{atexit()} functions do not introduce a data race\iref{res.on.data.races}. @@ -2178,7 +2166,8 @@ The \tcode{at_quick_exit()} functions register the function pointed to by \tcode{f} to be called without arguments when \tcode{quick_exit} is called. It is unspecified whether a call to \tcode{at_quick_exit()} that does not -happen before\iref{intro.multithread} all calls to \tcode{quick_exit} will succeed. +\deflinkx{happen before}{happens before}{intro.multithread} +all calls to \tcode{quick_exit} will succeed. \begin{note} The \tcode{at_quick_exit()} functions do not introduce a @@ -2230,7 +2219,7 @@ \pnum \remarks \indextext{signal-safe!\idxcode{quick_exit}}% -The function \tcode{quick_exit} is signal-safe\iref{support.signal} +The function \tcode{quick_exit} is \deflinkx{signal-safe}{evaluation!signal-safe}{support.signal} when the functions registered with \tcode{at_quick_exit} are. \end{itemdescr} @@ -2363,7 +2352,7 @@ \pnum \effects The -allocation functions\iref{basic.stc.dynamic.allocation} +\link{allocation functions}{basic.stc.dynamic.allocation} called by a \grammarterm{new-expression}\iref{expr.new} to allocate @@ -2386,7 +2375,6 @@ \pnum \default - \begin{itemize} \item Executes a loop: @@ -2403,7 +2391,7 @@ \tcode{bad_alloc}. \item Otherwise, the function calls the current -\tcode{new_handler} function\iref{new.handler}. +\link{\tcode{new_handler}}{new.handler} function. If the called function returns, the loop repeats. \item The loop terminates when an attempt to allocate the requested storage is @@ -2619,7 +2607,7 @@ \pnum \effects The -allocation functions\iref{basic.stc.dynamic.allocation} +\link{allocation functions}{basic.stc.dynamic.allocation} called by the array form of a \grammarterm{new-expression}\iref{expr.new} to allocate @@ -2854,7 +2842,6 @@ \pnum \begin{example} This can be useful for constructing an object at a known address: - \begin{codeblock} void* place = operator new(sizeof(Something)); Something* p = new (place) Something(); @@ -2927,8 +2914,8 @@ introduce a data race\iref{res.on.data.races}. Calls to these functions that allocate or deallocate a particular unit of storage shall occur in a single total order, and each such deallocation call -shall happen before\iref{intro.multithread} the next allocation (if any) in -this order. +shall \deflinkx{happen before}{happens before}{intro.multithread} +the next allocation (if any) in this order. \rSec2[alloc.errors]{Storage allocation errors} @@ -3082,8 +3069,8 @@ \pnum \expects \tcode{p} represents the address \placeholder{A} of a byte in memory. -An object \placeholder{X} that is within its lifetime\iref{basic.life} -and whose type is similar\iref{conv.qual} to \tcode{T} +An object \placeholder{X} that is within its \deflink{lifetime}{basic.life} +and whose type is \deflinkx{similar}{similar types}{conv.qual} to \tcode{T} is located at the address \placeholder{A}. All bytes of storage that would be reachable through\iref{basic.compound} the result @@ -3296,7 +3283,8 @@ \pnum \remarks -The message may be a null-terminated multibyte string\iref{multibyte.strings}, +The message may be a +\deflinkx{null-terminated multibyte string}{NTMBS@\ntmbs{}}{multibyte.strings}, suitable for conversion and display as a \tcode{wstring}\iref{string.classes,locale.codecvt}. \end{itemdescr} @@ -3574,11 +3562,11 @@ \pnum The type \tcode{source_location} meets the -\oldconcept{DefaultConstructible}, -\oldconcept{CopyConstructible}, -\oldconcept{Copy\-Assignable}, -\oldconcept{Swappable}, and -\oldconcept{Destructible} +\oldconceptref{DefaultConstructible}, +\oldconceptref{CopyConstructible}, +\oldconceptref{CopyAssignable}, +\oldconceptref{Swappable}, and +\oldconceptref{Destructible} requirements\iref{utility.arg.requirements,swappable.requirements}. All of the following conditions are \tcode{true}: \begin{itemize} @@ -3868,7 +3856,8 @@ \pnum \remarks -The message may be a null-terminated multibyte string\iref{multibyte.strings}, +The message may be a +\deflinkx{null-terminated multibyte string}{NTMBS@\ntmbs{}}{multibyte.strings}, suitable for conversion and display as a \tcode{wstring}\iref{string.classes,locale.codecvt}. The return value remains valid until the exception object from which @@ -4013,13 +4002,13 @@ \begin{itemdescr} \pnum \returns -The number of uncaught exceptions\iref{except.uncaught}. +The number of \link{uncaught exceptions}{except.uncaught}. \pnum \remarks When \tcode{uncaught_exceptions() > 0}, throwing an exception can result in a call of the function -\tcode{std::terminate}\iref{except.terminate}. +\link{\tcode{std::terminate}}{except.terminate}. \end{itemdescr} \rSec2[propagation]{Exception propagation} @@ -4035,7 +4024,7 @@ \pnum \tcode{exception_ptr} meets the requirements of -\oldconcept{NullablePointer} (\tref{cpp17.nullablepointer}). +\oldconceptref{NullablePointer} (\tref{cpp17.nullablepointer}). \pnum Two non-null values of type \tcode{exception_ptr} are equivalent and compare equal if and @@ -4078,8 +4067,9 @@ \begin{itemdescr} \pnum \returns -An \tcode{exception_ptr} object that refers to -the currently handled exception\iref{except.handle} or a copy of the currently +An \tcode{exception_ptr} object that refers to the +\deflinkx{currently handled exception}{exception handling!currently handled exception}{except.handle} +or a copy of the currently handled exception, or a null \tcode{exception_ptr} object if no exception is being handled. The referenced object shall remain valid at least as long as there is an \tcode{exception_ptr} object that refers to it. @@ -4231,7 +4221,7 @@ \pnum \expects -\tcode{U} meets the \oldconcept{CopyConstructible} requirements. +\tcode{U} meets the \oldconceptref{CopyConstructible} requirements. \pnum \throws @@ -4402,7 +4392,7 @@ \pnum The header \libheaderdef{compare} specifies types, objects, and functions for use primarily in connection with -the three-way comparison operator\iref{expr.spaceship}. +the \link{three-way comparison operator}{expr.spaceship}. \indexlibraryglobal{is_eq}% \indexlibraryglobal{is_neq}% @@ -4476,7 +4466,6 @@ Each is specified in terms of an exposition-only data member named \tcode{value} whose value typically corresponds to that of an enumerator from one of the following exposition-only enumerations: - \begin{codeblock} enum class @\placeholdernc{ord}@ { @\placeholdernc{equal}@ = 0, @\placeholdernc{equivalent}@ = @\placeholdernc{equal}@, @\placeholdernc{less}@ = -1, @\placeholdernc{greater}@ = 1 }; // \expos enum class @\placeholdernc{ncmp}@ { @\placeholdernc{unordered}@ = -127 }; // \expos @@ -5385,7 +5374,6 @@ denotes a type\iref{temp.deduct}, then \tcode{coroutine_traits} has the following publicly accessible member: - \begin{codeblock} using promise_type = typename R::promise_type; \end{codeblock} @@ -5942,7 +5930,7 @@ \end{note} \pnum -A call to the \tcode{setlocale} function\iref{c.locales} +A call to the \libglobalref{setlocale} function may introduce a data race with other calls to the \tcode{setlocale} function or with calls to functions that are affected by the current C locale. The implementation shall behave as if no @@ -5952,21 +5940,16 @@ \rSec2[cstdarg.syn]{Header \tcode{} synopsis} \indexheader{cstdarg}% -\indexlibraryglobal{va_list}% -\indexlibraryglobal{va_start}% -\indexlibraryglobal{va_copy}% -\indexlibraryglobal{va_end}% -\indexlibraryglobal{va_arg}% \begin{codeblock} // all freestanding namespace std { - using va_list = @\seebelow@; + using @\libglobal{va_list}@ = @\seebelow@; } -#define va_arg(V, P) @\seebelow@ -#define va_copy(VDST, VSRC) @\seebelow@ -#define va_end(V) @\seebelow@ -#define va_start(V, P) @\seebelow@ +#define @\libglobal{va_arg}@(V, P) @\seebelow@ +#define @\libglobal{va_copy}@(VDST, VSRC) @\seebelow@ +#define @\libglobal{va_end}@(V) @\seebelow@ +#define @\libglobal{va_start}@(V, P) @\seebelow@ \end{codeblock} \pnum diff --git a/source/templates.tex b/source/templates.tex index b2e9e1770e..feff65dee9 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -219,7 +219,6 @@ The syntax for \grammarterm{template-parameter}{s} is: - \begin{bnf} \nontermdef{template-parameter}\br type-parameter\br @@ -589,7 +588,7 @@ optional \grammarterm{identifier} or is a \grammarterm{parameter-declaration} that declares a pack\iref{dcl.fct}, then the \grammarterm{template-parameter} -is a template parameter pack\iref{temp.variadic}. +is a \deflink{template parameter pack}{temp.variadic}. A template parameter pack that is a \grammarterm{parameter-declaration} whose type contains one or more unexpanded packs is a pack expansion. Similarly, a template parameter pack that is a \grammarterm{type-parameter} with a @@ -621,7 +620,7 @@ \rSec1[temp.names]{Names of template specializations} \pnum -A template specialization\iref{temp.spec} can be referred to by a +A \link{template specialization}{temp.spec} can be referred to by a \grammarterm{template-id}: \begin{bnf} @@ -918,8 +917,8 @@ shall match the type and form specified for the corresponding parameter declared by the template in its \grammarterm{template-parameter-list}. -When the parameter declared by the template is a template -parameter pack\iref{temp.variadic}, it will correspond to zero or more +When the parameter declared by the template is a +\deflink{template parameter pack}{temp.variadic}, it will correspond to zero or more \grammarterm{template-argument}{s}. \begin{example} \begin{codeblock} @@ -1082,7 +1081,7 @@ \pnum When a \grammarterm{simple-template-id} does not name a function, a default \grammarterm{template-argument} is -implicitly instantiated\iref{temp.inst} +\link{implicitly instantiated}{temp.inst} when the value of that default argument is needed. \begin{example} \begin{codeblock} @@ -1094,7 +1093,7 @@ \pnum A \grammarterm{template-argument} followed by an ellipsis is -a pack expansion\iref{temp.variadic}. +a \deflink{pack expansion}{temp.variadic}. \rSec2[temp.arg.type]{Template type arguments} @@ -1431,12 +1430,11 @@ the function template corresponding to \tcode{P} is at least as specialized as the function template corresponding to \tcode{A} -according to the partial ordering rules -for function templates\iref{temp.func.order}. +according to the \link{partial ordering rules +for function templates}{temp.func.order}. Given an invented class template \tcode{X} with the \grammarterm{template-head} of \tcode{A} (including default arguments and \grammarterm{requires-clause}, if any): - \begin{itemize} \item Each of the two function templates has the same template parameters @@ -1490,7 +1488,7 @@ \pnum In order for a constrained template to be instantiated\iref{temp.spec}, -its associated constraints\iref{temp.constr.decl} +its \deflink{associated constraints}{temp.constr.decl} shall be satisfied as described in the following subclauses. \begin{note} Forming the name of a specialization of @@ -1498,7 +1496,7 @@ a variable template, or an alias template\iref{temp.names} requires the satisfaction of its constraints. -Overload resolution\iref{over.match.viable} +\link{Overload resolution}{over.match.viable} requires the satisfaction of constraints on functions and function templates. \end{note} @@ -1555,7 +1553,7 @@ f('a'); // OK, calls \tcode{f(int)} \end{codeblock} -In the satisfaction of the associated constraints\iref{temp.constr.decl} +In the satisfaction of the \deflink{associated constraints}{temp.constr.decl} of \tcode{f}, the constraint \tcode{sizeof(char) > 1} is not satisfied; the second operand is not checked for satisfaction. \end{example} @@ -1613,9 +1611,9 @@ unsubstituted template parameters of the constrained entity), called the \defn{parameter mapping}\iref{temp.constr.decl}. \begin{note} -Atomic constraints are formed by constraint normalization\iref{temp.constr.normal}. -\tcode{E} is never a logical \logop{and} expression\iref{expr.log.and} -nor a logical \logop{or} expression\iref{expr.log.or}. +Atomic constraints are formed by \deflinkx{constraint normalization}{constraint!normalization}{temp.constr.normal}. +\tcode{E} is never a \link{logical \logop{and} expression}{expr.log.and} +nor a \link{logical \logop{or} expression}{expr.log.or}. \end{note} \pnum @@ -1692,7 +1690,7 @@ If substitution results in an invalid type or expression in the immediate context of the atomic constraint\iref{temp.deduct.general}, the constraint is not satisfied. -Otherwise, the lvalue-to-rvalue conversion\iref{conv.lval} +Otherwise, the \link{lvalue-to-rvalue conversion}{conv.lval} is performed if necessary, and \tcode{E} shall be a constant expression of type \tcode{bool}. The constraint is satisfied if and only if evaluation of \tcode{E} @@ -1769,7 +1767,6 @@ can be constrained by the use of a \grammarterm{requires-clause}. This allows the specification of constraints for that declaration as an expression: - \begin{bnf} \nontermdef{constraint-expression}\br logical-or-expression @@ -1785,17 +1782,16 @@ \pnum \indextext{constraint!associated|see{associated constraints}}% A declaration's \defn{associated constraints} are defined as follows: - \begin{itemize} \item If there are no introduced \grammarterm{constraint-expression}{s}, the declaration has no associated constraints. \item Otherwise, if there is a single introduced \grammarterm{constraint-expression}, -the associated constraints are the normal form\iref{temp.constr.normal} +the associated constraints are the \deflinkx{normal form}{normal form!constraint}{temp.constr.normal} of that expression. -\item Otherwise, the associated constraints are the normal form of a logical -\logop{and} expression\iref{expr.log.and} whose operands are in the +\item Otherwise, the associated constraints are the normal form of a \link{logical +\logop{and} expression}{expr.log.and} whose operands are in the following order: \begin{itemize} \item @@ -1888,11 +1884,10 @@ \end{example} \rSec2[temp.constr.normal]{Constraint normalization} -\indextext{constraint!normalization|(}% \pnum The \defnx{normal form}{normal form!constraint} of an \grammarterm{expression} \tcode{E} is -a constraint\iref{temp.constr.constr} that is defined as follows: +a \deflink{constraint}{temp.constr.constr} that is defined as follows: % \begin{itemize} \item @@ -1901,7 +1896,7 @@ \item The normal form of an expression \tcode{E1 || E2} is -the disjunction\iref{temp.constr.op} of +the \deflink{disjunction}{temp.constr.op} of the normal forms of \tcode{E1} and \tcode{E2}. \item @@ -1978,10 +1973,11 @@ \end{itemize} \pnum +\indextext{normalization|see{constraint, normalization}}% The process of obtaining the normal form of a \grammarterm{constraint-expression} is called -\defnx{normalization}{normalization!constraint|see{constraint, normalization}}. +\defnx{normalization}{constraint!normalization}. \begin{note} Normalization of \grammarterm{constraint-expression}{s} is performed @@ -2011,7 +2007,6 @@ The associated constraints of \#3 are \tcode{requires (T x) \{ ++x; \}} (with mapping $\tcode{T} \mapsto \tcode{U}$). \end{example} -\indextext{constraint!normalization|)} \rSec2[temp.constr.order]{Partial ordering by constraints} @@ -2061,7 +2056,7 @@ \end{itemize} % \begin{example} -Let $A$ and $B$ be atomic constraints\iref{temp.constr.atomic}. +Let $A$ and $B$ be \deflinkx{atomic constraints}{constraint!atomic}{temp.constr.atomic}. % The constraint $A \land B$ subsumes $A$, but $A$ does not subsume $A \land B$. % @@ -2237,7 +2232,7 @@ \end{example} \pnum -If an expression $e$ is type-dependent\iref{temp.dep.expr}, +If an expression $e$ is \link{type-dependent}{temp.dep.expr}, \tcode{decltype($e$)} denotes a unique dependent type. Two such \grammarterm{decltype-specifier}{s} refer to the same type only if their \grammarterm{expression}{s} are @@ -2307,8 +2302,8 @@ \grammarterm{requires-clause}{s}, or \grammarterm{noexcept-specifier}{s}. -For the purpose of instantiation, the substatements of a constexpr if -statement\iref{stmt.if} are considered definitions. +For the purpose of instantiation, the substatements of a +\deflink{constexpr if}{stmt.if} statement are considered definitions. \pnum Because an \grammarterm{alias-declaration} cannot declare a @@ -2440,7 +2435,6 @@ declares three member functions of a class template. The subscript function can be defined like this: - \begin{codeblock} template T& Array::operator[](int i) { if (i<0 || sz<=i) error("Array: range error"); @@ -2663,7 +2657,7 @@ \pnum A local class of non-closure type shall not have member templates. -Access control rules\iref{class.access} +\link{Access control rules}{class.access} apply to member template names. A destructor shall not be a member template. @@ -2814,7 +2808,6 @@ The form of the pattern depends on the context in which the expansion occurs. Pack expansions can occur in the following contexts: - \begin{itemize} \item In a function parameter pack\iref{dcl.fct}; the pattern is the \grammarterm{parameter-declaration} without the ellipsis. @@ -2859,7 +2852,7 @@ \item In a \grammarterm{capture-list}\iref{expr.prim.lambda.capture}; the pattern is the \grammarterm{capture} without the ellipsis. -\item In a \tcode{sizeof...} expression\iref{expr.sizeof}; the pattern is an +\item In a \link{\tcode{sizeof...} expression}{expr.sizeof}; the pattern is an \grammarterm{identifier}. \item In a \grammarterm{pack-index-expression}; @@ -3398,7 +3391,6 @@ \pnum Within the argument list of a partial specialization, the following restrictions apply: - \begin{itemize} \item The type of a template parameter corresponding to a specialized non-type argument @@ -3412,7 +3404,6 @@ int array[5]; template< int X > class A { }; // error \end{codeblock} - \end{example} \item The partial specialization shall be more specialized than the primary @@ -3472,9 +3463,9 @@ \pnum A partial specialization matches a given actual template argument list if the template arguments of the partial specialization can be -deduced from the actual template argument list\iref{temp.deduct}, -and the deduced template arguments satisfy the associated constraints -of the partial specialization, if any\iref{temp.constr.decl}. +\link{deduced}{temp.deduct} from the actual template argument list, +and the deduced template arguments satisfy the \deflink{associated constraints}{temp.constr.decl} +of the partial specialization, if any. \begin{example} \begin{codeblock} template class A { }; // \#1 @@ -3536,14 +3527,13 @@ For two partial specializations, the first is \defn{more specialized} than the second if, given the following rewrite to two function templates, the first function template is more -specialized than the second according to the ordering rules for function -templates\iref{temp.func.order}: - +specialized than the second according to the \link{ordering rules for function +templates}{temp.func.order}: \begin{itemize} \item Each of the two function templates has the same template parameters -and associated constraints\iref{temp.constr.decl} +and \deflink{associated constraints}{temp.constr.decl} as the corresponding partial specialization. \item Each function template @@ -3690,7 +3680,6 @@ A function template defines an unbounded set of related functions. \begin{example} A family of sort functions can be declared like this: - \begin{codeblock} template class Array { }; template void sort(Array&); @@ -3745,12 +3734,11 @@ } \end{codeblock} \end{minipage} - \end{example} \pnum -Such specializations are distinct functions and do not violate the one-definition -rule\iref{basic.def.odr}. +Such specializations are distinct functions and do not violate the +\link{one-definition rule}{basic.def.odr}. \pnum The signature of a function template @@ -3801,7 +3789,7 @@ Two expressions involving template parameters are considered \defnx{equivalent}{equivalent!expressions} if two function definitions containing the expressions would satisfy -the one-definition rule\iref{basic.def.odr}, except that the tokens used +the \link{one-definition rule}{basic.def.odr}, except that the tokens used to name the template parameters may differ as long as a token used to name a template parameter in one expression is replaced by another token that names the same template parameter in the other expression. @@ -3931,7 +3919,6 @@ as distinct. For example, the last two declarations are functionally equivalent and would cause a program to be ill-formed: - \begin{codeblock} // guaranteed to be the same template void f(A, A); @@ -3971,8 +3958,8 @@ specialization is selected to match a placement operator new\iref{basic.stc.dynamic.deallocation,expr.new}; \item -when a friend function declaration\iref{temp.friend}, an -explicit instantiation\iref{temp.explicit} or an explicit specialization\iref{temp.expl.spec} refers to +when a \link{friend function declaration}{temp.friend}, an +\link{explicit instantiation}{temp.explicit} or an \link{explicit specialization}{temp.expl.spec} refers to a function template specialization. \end{itemize} @@ -3990,7 +3977,8 @@ \pnum To produce the transformed template, for each type, non-type, or template -template parameter (including template parameter packs\iref{temp.variadic} +template parameter (including +\deflinkx{template parameter packs}{template parameter pack}{temp.variadic} thereof) synthesize a unique type, value, or class template respectively and substitute it for each occurrence of that parameter in the function type of the template. @@ -4010,7 +3998,6 @@ is reversed. For a function template $M$ with cv-qualifiers \cv{} that is a member of a class $A$: - \begin{itemize} \item The type $X(M)$ is ``rvalue reference to \cv{}~$A$'' @@ -4255,7 +4242,6 @@ void g(TT>); g(v); // OK, \tcode{TT} = \tcode{vector} \end{codeblock} - \end{example} \pnum @@ -4340,7 +4326,7 @@ shall inhabit a namespace scope\iref{basic.scope.namespace}. \pnum -A concept shall not have associated constraints\iref{temp.constr.decl}. +A concept shall not have \deflink{associated constraints}{temp.constr.decl}. \pnum A concept is not instantiated\iref{temp.spec}. @@ -4650,7 +4636,7 @@ \item an instantiation uses a default argument or default template argument that had not been defined at the point at which the template was defined, or -\item constant expression evaluation\iref{expr.const} within the template +\item \link{constant expression evaluation}{expr.const} within the template instantiation uses \begin{itemize} \item the value of a const object of integral or unscoped enumeration type or @@ -4903,7 +4889,7 @@ or \grammarterm{braced-init-list}{s} in the \grammarterm{expression-list} -is type-dependent\iref{temp.dep.expr}, or +is \link{type-dependent}{temp.dep.expr}, or \item the \grammarterm{unqualified-id} is a \grammarterm{template-id} in which any of the template arguments depends @@ -4963,7 +4949,7 @@ \item in the definition of a class template, a nested class of a class template, a member of a class template, or a member of a nested class of a class template, -the injected-class-name\iref{class.pre} of the class template or nested class, +the \deflink{injected-class-name}{class.pre} of the class template or nested class, \item in the definition of a primary class template or a member of a primary class template, the name of the @@ -5103,7 +5089,6 @@ \pnum A qualified name\iref{basic.lookup.qual} is dependent if - \begin{itemize} \item it is a \grammarterm{conversion-function-id} @@ -5242,7 +5227,7 @@ \end{footnote} \item a \grammarterm{pack-index-specifier}, or \item denoted by \tcode{decltype(}\grammarterm{expression}{}\tcode{)}, -where \grammarterm{expression} is type-dependent\iref{temp.dep.expr}. +where \grammarterm{expression} is \link{type-dependent}{temp.dep.expr}. \end{itemize} \pnum @@ -5315,7 +5300,6 @@ or \grammarterm{new-type-id} is dependent, even if any subexpression is type-dependent: - \begin{ncsimplebnf} simple-type-specifier \terminal{(} \opt{expression-list} \terminal{)}\br simple-type-specifier braced-init-list\br @@ -5333,7 +5317,6 @@ \pnum Expressions of the following forms are never type-dependent (because the type of the expression cannot be dependent): - \begin{ncsimplebnf} literal\br \keyword{sizeof} unary-expression\br @@ -5355,7 +5338,7 @@ \end{note} \pnum -A class member access expression\iref{expr.ref} is +A \link{class member access expression}{expr.ref} is type-dependent if the terminal name of its \grammarterm{id-expression}, if any, is dependent or the expression refers to a member of the current instantiation and @@ -5426,7 +5409,6 @@ is type-dependent or the \grammarterm{type-id} is dependent: - \begin{ncsimplebnf} \keyword{sizeof} unary-expression\br \keyword{sizeof} \terminal{(} type-id \terminal{)}\br @@ -5451,7 +5433,6 @@ or \grammarterm{cast-expression} is value-dependent: - \begin{ncsimplebnf} simple-type-specifier \terminal{(} \opt{expression-list} \terminal{)}\br \keyword{static_cast} \terminal{<} type-id \terminal{>} \terminal{(} expression \terminal{)}\br @@ -5462,7 +5443,6 @@ \pnum Expressions of the following form are value-dependent: - \begin{ncsimplebnf} \keyword{sizeof} \terminal{...} \terminal{(} identifier \terminal{)}\br fold-expression @@ -5474,7 +5454,7 @@ instantiation is value-dependent. An expression of the form \tcode{\&}\grammarterm{cast-expression} is also value-dependent if evaluating \grammarterm{cast-expression} -as a core constant expression\iref{expr.const} succeeds and +as a \deflinkx{core constant expression}{expression!core constant}{expr.const} succeeds and the result of the evaluation refers to a templated entity that is an object with static or thread storage duration or a member function. @@ -5594,7 +5574,7 @@ A specialization for any template may have points of instantiation in multiple translation units. If two different points of instantiation give a template specialization -different meanings according to the one-definition rule\iref{basic.def.odr}, +different meanings according to the \link{one-definition rule}{basic.def.odr}, the program is ill-formed, no diagnostic required. \rSec3[temp.dep.candidate]{Candidate functions} @@ -5899,7 +5879,7 @@ \pnum If a function declaration acquired its function type through -a dependent type\iref{temp.dep.type} without using the syntactic form of +a \link{dependent type}{temp.dep.type} without using the syntactic form of a function declarator, the program is ill-formed. \begin{example} \begin{codeblock} @@ -5980,7 +5960,7 @@ \end{example} \begin{note} Within a template declaration, -a local class\iref{class.local} or enumeration and the members of +a \link{local class}{class.local} or enumeration and the members of a local class are never considered to be entities that can be separately instantiated (this includes their default arguments, \grammarterm{noexcept-specifier}{s}, and non-static data member @@ -6158,7 +6138,7 @@ \end{example} \pnum -If the function selected by overload resolution\iref{over.match} +If the function selected by \link{overload resolution}{over.match} can be determined without instantiating a class template definition, it is unspecified whether that instantiation actually takes place. \begin{example} @@ -6346,7 +6326,6 @@ \pnum The syntax for explicit instantiation is: - \begin{bnf} \nontermdef{explicit-instantiation}\br \opt{\keyword{extern}} \keyword{template} declaration @@ -6493,7 +6472,7 @@ and an explicit instantiation definition in the same translation unit, the definition shall follow the declaration. An entity that is the subject of an explicit instantiation declaration and that is also used -in a way that would otherwise cause an implicit instantiation\iref{temp.inst} +in a way that would otherwise cause an \link{implicit instantiation}{temp.inst} in the translation unit shall be the subject of an explicit instantiation definition somewhere in the program; otherwise the program is ill-formed, no diagnostic required. @@ -6820,7 +6799,6 @@ The definition of a static data member of a template for which default-initialization is desired can use functional cast notation\iref{expr.type.conv}: - \begin{codeblock} template<> X Q::x; // declaration template<> X Q::x (); // error: declares a function @@ -7079,7 +7057,6 @@ use refers to a specialization of a function template even when a non-template function\iref{dcl.fct} is visible that would otherwise be used. For example: - \begin{codeblock} template int f(T); // \#1 int f(int); // \#2 @@ -7552,7 +7529,7 @@ In the following example, assuming a \tcode{signed char} cannot represent the value 1000, -a narrowing conversion\iref{dcl.init.list} +a \deflinkx{narrowing conversion}{conversion!narrowing}{dcl.init.list} would be required to convert the \grammarterm{template-argument} of type \tcode{int} to \tcode{signed char}, @@ -7656,13 +7633,12 @@ If \tcode{P} is not a reference type: - \begin{itemize} \item If \tcode{A} -is an array type, the pointer type produced by the array-to-pointer -standard conversion\iref{conv.array} is used in place of +is an array type, the pointer type produced by the \link{array-to-pointer +standard conversion}{conv.array} is used in place of \tcode{A} for type deduction; otherwise, @@ -7670,7 +7646,7 @@ If \tcode{A} is a function type, the pointer type produced by the -function-to-pointer standard conversion\iref{conv.func} is used in place +\link{function-to-pointer standard conversion}{conv.func} is used in place of \tcode{A} for type @@ -7751,7 +7727,6 @@ is transformed as described above). However, there are three cases that allow a difference: - \begin{itemize} \item If the original @@ -7766,8 +7741,8 @@ can be another pointer or pointer-to-member type that can be converted to the deduced \tcode{A} -via a function pointer conversion\iref{conv.fctptr} and/or -qualification conversion\iref{conv.qual}. +via a \link{function pointer conversion}{conv.fctptr} and/or +\link{qualification conversion}{conv.qual}. \item If @@ -7883,7 +7858,7 @@ \pnum Template arguments can be deduced from the type specified when taking -the address of an overload set\iref{over.over}. +the address of an \link{overload set}{over.over}. If there is a target, the function template's function type and the target type are used as the types of @@ -7924,13 +7899,12 @@ If \tcode{A} is not a reference type: - \begin{itemize} \item If \tcode{P} is an array type, the pointer type produced by the -array-to-pointer standard conversion\iref{conv.array} is used in place of +\link{array-to-pointer standard conversion}{conv.array} is used in place of \tcode{P} for type deduction; otherwise, @@ -7938,7 +7912,7 @@ If \tcode{P} is a function type, the pointer type produced by the -function-to-pointer standard conversion\iref{conv.func} is used in place of +\link{function-to-pointer standard conversion}{conv.func} is used in place of \tcode{P} for type deduction; otherwise, @@ -7970,7 +7944,6 @@ identical to \tcode{A}. However, certain attributes of \tcode{A} may be ignored: - \begin{itemize} \item If the original \tcode{A} is a reference type, @@ -8015,7 +7988,6 @@ \pnum The types used to determine the ordering depend on the context in which the partial ordering is done: - \begin{itemize} \item In the context of a function call, the types used are those function parameter types @@ -8029,7 +8001,7 @@ In the context of a call to a conversion function, the return types of the conversion function templates are used. \item -In other contexts\iref{temp.func.order} the function template's function +In \link{other contexts}{temp.func.order} the function template's function type is used. \end{itemize} @@ -8043,7 +8015,6 @@ \pnum Before the partial ordering is done, certain transformations are performed on the types used for partial ordering: - \begin{itemize} \item If @@ -8249,7 +8220,6 @@ \tcode{P} can be composed from a number of other types, templates, and non-type values: - \begin{itemize} \item A function type includes the types of each of the function parameters, @@ -8291,7 +8261,6 @@ \pnum The non-deduced contexts are: - \indextext{context!non-deduced}% \begin{itemize} \item @@ -8376,7 +8345,6 @@ \begin{example} Here is an example in which different parameter/argument pairs produce inconsistent template argument deductions: - \begin{codeblock} template void f(T x, T y) { @\commentellip@ } struct A { @\commentellip@ }; @@ -8393,7 +8361,6 @@ single function parameter/argument pair. This can lead to conflicts that cause type deduction to fail: - \begin{codeblock} template void f(T (*)(T, U, U)); @@ -8410,7 +8377,6 @@ Here is an example where the exception specification of a function type is deduced: - \begin{codeblock} template void f1(void (*)() noexcept(E)); template struct A { }; @@ -8429,7 +8395,6 @@ Here is an example where a qualification conversion applies between the argument type on the function call and the deduced template argument type: - \begin{codeblock} template void f(const T*) { } int* p; @@ -8440,7 +8405,6 @@ Here is an example where the template argument is used to instantiate a derived class type of the corresponding function parameter type: - \begin{codeblock} template struct B { }; template struct D : public B {}; @@ -8538,7 +8502,7 @@ template argument list of \tcode{A}. Each comparison deduces template arguments for subsequent positions in the template parameter packs expanded by $\texttt{P}_i$. -During partial ordering\iref{temp.deduct.partial}, if $\texttt{A}_i$ was +During \link{partial ordering}{temp.deduct.partial}, if $\texttt{A}_i$ was originally a pack expansion: \begin{itemize} \item if \tcode{P} does not contain a template argument corresponding to @@ -8601,7 +8565,7 @@ of \tcode{A}. Each comparison deduces template arguments for subsequent positions in the template parameter packs expanded by the function parameter pack. -During partial ordering\iref{temp.deduct.partial}, if $\texttt{A}_i$ was +During \link{partial ordering}{temp.deduct.partial}, if $\texttt{A}_i$ was originally a function parameter pack: \begin{itemize} \item if \tcode{P} does not contain a function parameter type corresponding to @@ -8898,8 +8862,8 @@ In a declaration whose \grammarterm{declarator-id} refers to a specialization of a function template, template argument deduction is performed to identify the specialization to which the declaration refers. Specifically, this is done -for explicit instantiations\iref{temp.explicit}, explicit specializations\iref{temp.expl.spec}, -and certain friend declarations\iref{temp.friend}. This is also done to +for \link{explicit instantiations}{temp.explicit}, \link{explicit specializations}{temp.expl.spec}, +and certain \link{friend declarations}{temp.friend}. This is also done to determine whether a deallocation function template specialization matches a placement \tcode{operator new}\iref{basic.stc.dynamic.deallocation,expr.new}. In all these cases, \tcode{P} is the type of the function template being considered diff --git a/source/threads.tex b/source/threads.tex index 7bab867c50..e9bac1915e 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -5,7 +5,7 @@ \pnum The following subclauses describe components to create and manage -threads\iref{intro.multithread}, perform mutual exclusion, and communicate conditions +\deflinkx{threads}{thread}{intro.multithread}, perform mutual exclusion, and communicate conditions and values between threads, as summarized in \tref{thread.summary}. @@ -41,7 +41,7 @@ \tcode{false} otherwise. If a template parameter is named \tcode{Clock}, the corresponding template argument shall be a type \tcode{C} -that meets the \oldconcept{Clock} requirements\iref{time.clock.req}; +that meets the \oldconceptref{Clock} requirements\iref{time.clock.req}; the program is ill-formed if \tcode{is_clock_v} is \tcode{false}. \rSec2[thread.req.exception]{Exceptions} @@ -156,7 +156,7 @@ \pnum Implementation-provided clocks that are used for these functions meet the -\oldconcept{TrivialClock} requirements\iref{time.clock.req}. +\oldconceptref{TrivialClock} requirements\iref{time.clock.req}. \pnum A function that takes an argument which specifies a timeout will throw if, @@ -195,10 +195,10 @@ \tcode{lock_guard}\iref{thread.lock.guard}, \tcode{lock}, \tcode{try_lock}\iref{thread.lock.algorithm}, and \tcode{condition_variable_any}\iref{thread.condition.condvarany} all operate on user-supplied -lockable objects. The \oldconcept{BasicLockable} requirements, the \oldconcept{Lockable} requirements, -the \oldconcept{TimedLockable} requirements, -the \oldconcept{SharedLockable} requirements, and -the \oldconcept{SharedTimedLock\-able} requirements +lockable objects. The \oldconceptref{BasicLockable} requirements, the \oldconceptref{Lockable} requirements, +the \oldconceptref{TimedLockable} requirements, +the \oldconceptref{SharedLockable} requirements, and +the \oldconceptref{SharedTimedLockable} requirements list the requirements imposed by these library types in order to acquire or release ownership of a \tcode{lock} by a given execution agent. \begin{note} @@ -266,7 +266,7 @@ \rSec3[thread.req.lockable.req]{\oldconcept{Lockable} requirements} \pnum -A type \tcode{L} meets the \defnoldconcept{Lockable} requirements if it meets the \oldconcept{BasicLockable} +A type \tcode{L} meets the \defnoldconcept{Lockable} requirements if it meets the \oldconceptref{BasicLockable} requirements and the following expressions are well-formed and have the specified semantics (\tcode{m} denotes a value of type \tcode{L}). @@ -291,11 +291,11 @@ \rSec3[thread.req.lockable.timed]{\oldconcept{TimedLockable} requirements} \pnum -A type \tcode{L} meets the \defnoldconcept{TimedLockable} requirements if it meets the \oldconcept{Lockable} +A type \tcode{L} meets the \defnoldconcept{TimedLockable} requirements if it meets the \oldconceptref{Lockable} requirements and the following expressions are well-formed and have the specified semantics (\tcode{m} denotes a value of type \tcode{L}, \tcode{rel_time} denotes a value of an -instantiation of \tcode{duration}\iref{time.duration}, and \tcode{abs_time} denotes a value -of an instantiation of \tcode{time_point}\iref{time.point}). +instantiation of \link{\tcode{duration}}{time.duration}, and \tcode{abs_time} denotes a value +of an instantiation of \link{\tcode{time_point}}{time.point}). \begin{itemdecl} m.try_lock_for(rel_time) @@ -397,7 +397,7 @@ \pnum A type \tcode{L} meets the \defnoldconcept{SharedTimedLockable} requirements if -it meets the \oldconcept{SharedLockable} requirements, and +it meets the \oldconceptref{SharedLockable} requirements, and the following expressions are well-formed, have type \tcode{bool}, and have the specified semantics (\tcode{m} denotes a value of type \tcode{L}, @@ -4049,7 +4049,7 @@ \indexlibraryglobal{atomic}% \pnum The template argument for \tcode{T} shall meet the -\oldconcept{CopyConstructible} and \oldconcept{CopyAssignable} requirements. +\oldconceptref{CopyConstructible} and \oldconceptref{CopyAssignable} requirements. The program is ill-formed if any of \begin{itemize} \item \tcode{is_trivially_copyable_v}, @@ -6509,7 +6509,7 @@ \pnum A mutex object facilitates protection against data races and allows safe synchronization of -data between execution agents\iref{thread.req.lockable}. +data between \deflinkx{execution agents}{execution agent}{thread.req.lockable}. An execution agent \term{owns} a mutex from the time it successfully calls one of the lock functions until it calls unlock. Mutexes can be either recursive or non-recursive, and can grant simultaneous ownership to one or many execution agents. Both @@ -6526,11 +6526,11 @@ They meet the requirements set out in \ref{thread.mutex.requirements.mutex}. In this description, \tcode{m} denotes an object of a mutex type. \begin{note} -The mutex types meet the \oldconcept{Lockable} requirements\iref{thread.req.lockable.req}. +The mutex types meet the \oldconceptref{Lockable} requirements\iref{thread.req.lockable.req}. \end{note} \pnum -The mutex types meet \oldconcept{DefaultConstructible} and \oldconcept{Destructible}. +The mutex types meet \oldconceptref{DefaultConstructible} and \oldconceptref{Destructible}. If initialization of an object of a mutex type fails, an exception of type \tcode{system_error} is thrown. The mutex types are neither copyable nor movable. @@ -6553,7 +6553,7 @@ a single mutex appears to occur in a single total order. \begin{note} This -can be viewed as the modification order\iref{intro.multithread} of the +can be viewed as the \deflink{modification order}{intro.multithread} of the mutex. \end{note} \begin{note} @@ -6565,7 +6565,6 @@ \pnum The expression \tcode{m.lock()} is well-formed and has the following semantics: - \begin{itemdescr} \pnum \expects @@ -6608,7 +6607,6 @@ \pnum The expression \tcode{m.try_lock()} is well-formed and has the following semantics: - \begin{itemdescr} \pnum \expects @@ -6633,7 +6631,7 @@ \pnum \sync If \tcode{try_lock()} returns \tcode{true}, prior \tcode{unlock()} operations -on the same object \term{synchronize with}\iref{intro.multithread} this operation. +on the same object \deflink{synchronize with}{intro.multithread} this operation. \begin{note} Since \tcode{lock()} does not synchronize with a failed subsequent \tcode{try_lock()}, the visibility rules are weak enough that little would be @@ -6654,7 +6652,6 @@ \pnum The expression \tcode{m.unlock()} is well-formed and has the following semantics: - \begin{itemdescr} \pnum \expects @@ -6669,7 +6666,7 @@ \pnum \sync -This operation synchronizes with\iref{intro.multithread} subsequent +This operation \deflinkx{synchronizes with}{synchronize with}{intro.multithread} subsequent lock operations that obtain ownership on the same object. \pnum @@ -6798,18 +6795,17 @@ meet the requirements set out below. In this description, \tcode{m} denotes an object of a mutex type, \tcode{rel_time} denotes an object of an -instantiation of \tcode{duration}\iref{time.duration}, and \tcode{abs_time} denotes an +instantiation of \link{\tcode{duration}}{time.duration}, and \tcode{abs_time} denotes an object of an -instantiation of \tcode{time_point}\iref{time.point}. +instantiation of \link{\tcode{time_point}}{time.point}. \begin{note} -The timed mutex types meet the \oldconcept{TimedLockable} +The timed mutex types meet the \oldconceptref{TimedLockable} requirements\iref{thread.req.lockable.timed}. \end{note} \pnum The expression \tcode{m.try_lock_for(rel_time)} is well-formed and has the following semantics: - \begin{itemdescr} \pnum \expects @@ -6851,7 +6847,6 @@ \pnum The expression \tcode{m.try_lock_until(abs_time)} is well-formed and has the following semantics: - \begin{itemdescr} \pnum \expects @@ -7016,7 +7011,7 @@ meet the requirements set out below. In this description, \tcode{m} denotes an object of a shared mutex type. \begin{note} -The shared mutex types meet the \oldconcept{SharedLockable} +The shared mutex types meet the \oldconceptref{SharedLockable} requirements\iref{thread.req.lockable.shared}. \end{note} @@ -7038,7 +7033,6 @@ \pnum The expression \tcode{m.lock_shared()} is well-formed and has the following semantics: - \begin{itemdescr} \pnum \expects @@ -7075,7 +7069,6 @@ \pnum The expression \tcode{m.unlock_shared()} is well-formed and has the following semantics: - \begin{itemdescr} \pnum \expects @@ -7090,7 +7083,7 @@ \pnum \sync -This operation synchronizes with\iref{intro.multithread} subsequent +This operation \deflinkx{synchronizes with}{synchronize with}{intro.multithread} subsequent \tcode{lock()} operations that obtain ownership on the same object. \pnum @@ -7100,7 +7093,6 @@ \pnum The expression \tcode{m.try_lock_shared()} is well-formed and has the following semantics: - \begin{itemdescr} \pnum \expects @@ -7194,16 +7186,15 @@ \tcode{rel_time} denotes an object of an instantiation of \tcode{duration}\iref{time.duration}, and \tcode{abs_time} denotes an object of an instantiation of -\tcode{time_point}\iref{time.point}. +\link{\tcode{time_point}}{time.point}. \begin{note} -The shared timed mutex types meet the \oldconcept{SharedTimedLockable} +The shared timed mutex types meet the \oldconceptref{SharedTimedLockable} requirements\iref{thread.req.lockable.shared.timed}. \end{note} \pnum The expression \tcode{m.try_lock_shared_for(rel_time)} is well-formed and has the following semantics: - \begin{itemdescr} \pnum \expects @@ -7248,7 +7239,6 @@ \pnum The expression \tcode{m.try_lock_shared_until(abs_time)} is well-formed and has the following semantics: - \begin{itemdescr} \pnum \expects @@ -7405,10 +7395,10 @@ \pnum An object of type \tcode{lock_guard} controls the ownership of a lockable object within a scope. A \tcode{lock_guard} object maintains ownership of a lockable -object throughout the \tcode{lock_guard} object's lifetime\iref{basic.life}. +object throughout the \tcode{lock_guard} object's \deflink{lifetime}{basic.life}. The behavior of a program is undefined if the lockable object referenced by \tcode{pm} does not exist for the entire lifetime of the \tcode{lock_guard} -object. The supplied \tcode{Mutex} type shall meet the \oldconcept{BasicLockable} +object. The supplied \tcode{Mutex} type shall meet the \oldconceptref{BasicLockable} requirements\iref{thread.req.lockable.basic}. \indexlibraryctor{lock_guard}% @@ -7478,7 +7468,7 @@ \pnum An object of type \tcode{scoped_lock} controls the ownership of lockable objects within a scope. A \tcode{scoped_lock} object maintains ownership of lockable -objects throughout the \tcode{scoped_lock} object's lifetime\iref{basic.life}. +objects throughout the \tcode{scoped_lock} object's \deflink{lifetime}{basic.life}. The behavior of a program is undefined if the lockable objects referenced by \tcode{pm} do not exist for the entire lifetime of the \tcode{scoped_lock} object. @@ -7487,12 +7477,12 @@ If \tcode{sizeof...(MutexTypes)} is one, let \tcode{Mutex} denote the sole type constituting the pack \tcode{MutexTypes}. \tcode{Mutex} -shall meet the \oldconcept{BasicLockable} requirements\iref{thread.req.lockable.basic}. +shall meet the \oldconceptref{BasicLockable} requirements\iref{thread.req.lockable.basic}. The member \grammarterm{typedef-name} \tcode{mutex_type} denotes the same type as \tcode{Mutex}. \item Otherwise, all types in the template parameter pack \tcode{MutexTypes} -shall meet the \oldconcept{Lockable} requirements\iref{thread.req.lockable.req} +shall meet the \oldconceptref{Lockable} requirements\iref{thread.req.lockable.req} and there is no member \tcode{mutex_type}. \end{itemize} @@ -7607,17 +7597,17 @@ \tcode{pm} is not null and the lockable object pointed to by \tcode{pm} does not exist for the entire remaining lifetime\iref{basic.life} of the \tcode{unique_lock} object. The supplied -\tcode{Mutex} type shall meet the \oldconcept{BasicLockable} +\tcode{Mutex} type shall meet the \oldconceptref{BasicLockable} requirements\iref{thread.req.lockable.basic}. \pnum \begin{note} -\tcode{unique_lock} meets the \oldconcept{BasicLockable} requirements. If \tcode{Mutex} -meets the \oldconcept{Lockable} requirements\iref{thread.req.lockable.req}, -\tcode{unique_lock} also meets the \oldconcept{Lockable} requirements; +\tcode{unique_lock} meets the \oldconceptref{BasicLockable} requirements. If \tcode{Mutex} +meets the \oldconceptref{Lockable} requirements\iref{thread.req.lockable.req}, +\tcode{unique_lock} also meets the \oldconceptref{Lockable} requirements; if \tcode{Mutex} -meets the \oldconcept{TimedLockable} requirements\iref{thread.req.lockable.timed}, -\tcode{unique_lock} also meets the \oldconcept{TimedLockable} requirements. +meets the \oldconceptref{TimedLockable} requirements\iref{thread.req.lockable.timed}, +\tcode{unique_lock} also meets the \oldconceptref{TimedLockable} requirements. \end{note} \rSec4[thread.lock.unique.cons]{Constructors, destructor, and assignment} @@ -7667,7 +7657,7 @@ \begin{itemdescr} \pnum \expects -The supplied \tcode{Mutex} type meets the \oldconcept{Lockable} +The supplied \tcode{Mutex} type meets the \oldconceptref{Lockable} requirements\iref{thread.req.lockable.req}. \pnum @@ -7709,7 +7699,7 @@ \pnum \expects The supplied \tcode{Mutex} type meets the -\oldconcept{TimedLockable} requirements\iref{thread.req.lockable.timed}. +\oldconceptref{TimedLockable} requirements\iref{thread.req.lockable.timed}. \pnum \effects @@ -7731,7 +7721,7 @@ \begin{itemdescr} \pnum \expects -The supplied \tcode{Mutex} type meets the \oldconcept{TimedLockable} requirements\iref{thread.req.lockable.timed}. +The supplied \tcode{Mutex} type meets the \oldconceptref{TimedLockable} requirements\iref{thread.req.lockable.timed}. \pnum \effects @@ -7827,7 +7817,7 @@ \begin{itemdescr} \pnum \expects -The supplied \tcode{Mutex} meets the \oldconcept{Lockable} +The supplied \tcode{Mutex} meets the \oldconceptref{Lockable} requirements\iref{thread.req.lockable.req}. \pnum @@ -7866,7 +7856,7 @@ \begin{itemdescr} \pnum \expects -The supplied \tcode{Mutex} type meets the \oldconcept{TimedLockable} +The supplied \tcode{Mutex} type meets the \oldconceptref{TimedLockable} requirements\iref{thread.req.lockable.timed}. \pnum @@ -7905,7 +7895,7 @@ \begin{itemdescr} \pnum \expects -The supplied \tcode{Mutex} type meets the \oldconcept{TimedLockable} requirements\iref{thread.req.lockable.timed}. +The supplied \tcode{Mutex} type meets the \oldconceptref{TimedLockable} requirements\iref{thread.req.lockable.timed}. \pnum \effects @@ -8098,16 +8088,16 @@ is undefined if the contained pointer \tcode{pm} is not null and the lockable object pointed to by \tcode{pm} does not exist for the entire remaining lifetime\iref{basic.life} of the \tcode{shared_lock} object. The supplied -\tcode{Mutex} type shall meet the \oldconcept{SharedLockable} +\tcode{Mutex} type shall meet the \oldconceptref{SharedLockable} requirements\iref{thread.req.lockable.shared}. \pnum \begin{note} -\tcode{shared_lock} meets the \oldconcept{Lockable} +\tcode{shared_lock} meets the \oldconceptref{Lockable} requirements\iref{thread.req.lockable.req}. -If \tcode{Mutex} meets the \oldconcept{Shared\-TimedLockable} +If \tcode{Mutex} meets the \oldconceptref{SharedTimedLockable} requirements\iref{thread.req.lockable.shared.timed}, -\tcode{shared_lock} also meets the \oldconcept{TimedLockable} +\tcode{shared_lock} also meets the \oldconceptref{TimedLockable} requirements\iref{thread.req.lockable.timed}. \end{note} @@ -8192,7 +8182,7 @@ \begin{itemdescr} \pnum \expects -\tcode{Mutex} meets the \oldconcept{SharedTimedLockable} +\tcode{Mutex} meets the \oldconceptref{SharedTimedLockable} requirements\iref{thread.req.lockable.shared.timed}. \pnum @@ -8216,7 +8206,7 @@ \begin{itemdescr} \pnum \expects -\tcode{Mutex} meets the \oldconcept{SharedTimedLockable} +\tcode{Mutex} meets the \oldconceptref{SharedTimedLockable} requirements\iref{thread.req.lockable.shared.timed}. \pnum @@ -8343,7 +8333,7 @@ \begin{itemdescr} \pnum \expects -\tcode{Mutex} meets the \oldconcept{SharedTimedLockable} +\tcode{Mutex} meets the \oldconceptref{SharedTimedLockable} requirements\iref{thread.req.lockable.shared.timed}. \pnum @@ -8383,7 +8373,7 @@ \begin{itemdescr} \pnum \expects -\tcode{Mutex} meets the \oldconcept{SharedTimedLockable} +\tcode{Mutex} meets the \oldconceptref{SharedTimedLockable} requirements\iref{thread.req.lockable.shared.timed}. \pnum @@ -8522,7 +8512,7 @@ \begin{itemdescr} \pnum \expects -Each template parameter type meets the \oldconcept{Lockable} requirements. +Each template parameter type meets the \oldconceptref{Lockable} requirements. \begin{note} The \tcode{unique_lock} class template meets these requirements when suitably instantiated. @@ -8551,7 +8541,7 @@ \begin{itemdescr} \pnum \expects -Each template parameter type meets the \oldconcept{Lockable} requirements. +Each template parameter type meets the \oldconceptref{Lockable} requirements. \begin{note} The \tcode{unique_lock} class template meets these requirements when suitably instantiated. @@ -8646,7 +8636,7 @@ \pnum \sync For any given \tcode{once_flag}: all active executions occur in a total -order; completion of an active execution synchronizes with\iref{intro.multithread} +order; completion of an active execution \deflinkx{synchronizes with}{synchronize with}{intro.multithread} the start of the next one in this total order; and the returning execution synchronizes with the return from all passive executions. @@ -9217,7 +9207,7 @@ \pnum In \ref{thread.condition.condvarany}, template arguments for template parameters named \tcode{Lock} -shall meet the \oldconcept{Basic\-Lockable} +shall meet the \oldconceptref{BasicLockable} requirements\iref{thread.req.lockable.basic}. \begin{note} All of the standard @@ -9397,7 +9387,6 @@ \begin{itemdescr} \pnum \effects - \begin{itemize} \item \indextext{block (execution)}% @@ -10156,24 +10145,24 @@ \pnum \tcode{CompletionFunction} shall meet the -\oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) and -\oldconcept{Destructible} (\tref{cpp17.destructible}) requirements. +\oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) and +\oldconceptref{Destructible} (\tref{cpp17.destructible}) requirements. \tcode{is_nothrow_invocable_v} shall be \tcode{true}. \pnum The default value of the \tcode{CompletionFunction} template parameter is an unspecified type, such that, in addition to satisfying the requirements of \tcode{CompletionFunction}, -it meets the \oldconcept{DefaultConstructible} +it meets the \oldconceptref{DefaultConstructible} requirements (\tref{cpp17.defaultconstructible}) and \tcode{completion()} has no effects. \pnum \tcode{barrier::arrival_token} is an unspecified type, such that it meets the -\oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}), -\oldconcept{MoveAssignable} (\tref{cpp17.moveassignable}), and -\oldconcept{Destructible} (\tref{cpp17.destructible}) requirements. +\oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}), +\oldconceptref{MoveAssignable} (\tref{cpp17.moveassignable}), and +\oldconceptref{Destructible} (\tref{cpp17.destructible}) requirements. \indexlibrarymember{max}{barrier}% \begin{itemdecl} @@ -10612,22 +10601,21 @@ \pnum Calls to functions that successfully set the stored result of a shared -state synchronize -with\iref{intro.multithread} calls to functions +state \deflink{synchronize with}{intro.multithread} calls to functions successfully detecting the ready state resulting from that setting. The storage of the result (whether normal or exceptional) into the shared state -synchronizes with\iref{intro.multithread} +\deflinkx{synchronizes with}{synchronize with}{intro.multithread} the successful return from a call to a waiting function on the shared state. \pnum Some functions (e.g., \tcode{promise::set_value_at_thread_exit}) delay making the shared state ready until the calling thread exits. The destruction of -each of that thread's objects with thread storage duration\iref{basic.stc.thread} +each of that thread's objects with \link{thread storage duration}{basic.stc.thread} is sequenced before making that shared state ready. \pnum -Access to the result of the same shared state may conflict\iref{intro.multithread}. +Access to the result of the same shared state may \deflink{conflict}{intro.multithread}. \begin{note} This explicitly specifies that the result of the shared state is visible in the objects that reference this state in the sense of data race @@ -10675,7 +10663,7 @@ \pnum For the primary template, \tcode{R} shall be an object type that -meets the \oldconcept{Destructible} requirements. +meets the \oldconceptref{Destructible} requirements. \pnum The implementation provides the template \tcode{promise} and two specializations, @@ -10700,7 +10688,7 @@ \pnum \expects \tcode{Alloc} meets -the \oldconcept{Allocator} requirements\iref{allocator.requirements.general}. +the \oldconceptref{Allocator} requirements\iref{allocator.requirements.general}. \end{itemdescr} \indexlibraryctor{promise}% @@ -10809,7 +10797,6 @@ \pnum \errors - \begin{itemize} \item \tcode{future_already_retrieved} if \tcode{get_future} has already been called on a \tcode{promise} with the same shared state as \tcode{*this}. @@ -10872,7 +10859,6 @@ \pnum \errors - \begin{itemize} \item \tcode{promise_already_satisfied} if its shared state already has a stored value or exception. @@ -10963,8 +10949,8 @@ do not share their shared state with other asynchronous return objects. A default-constructed \tcode{future} object has no shared state. A \tcode{future} object with shared state can be created by -functions on asynchronous providers\iref{futures.state} or by the move constructor -and shares its shared state with +functions on \deflinkx{asynchronous providers}{asynchronous provider}{futures.state} +or by the move constructor and shares its shared state with the original asynchronous provider. The result (value or exception) of a \tcode{future} object can be @@ -11023,7 +11009,7 @@ \pnum For the primary template, \tcode{R} shall be an object type that -meets the \oldconcept{Destructible} requirements. +meets the \oldconceptref{Destructible} requirements. \pnum The implementation provides the template \tcode{future} and two specializations, @@ -11212,7 +11198,6 @@ \pnum \returns - \begin{itemize} \item \tcode{future_status::deferred} if the shared state contains a deferred function. @@ -11274,7 +11259,7 @@ shared state can be created by conversion from a \tcode{future} object and shares its shared state with the -original asynchronous provider\iref{futures.state} of the shared state. +original \deflink{asynchronous provider}{futures.state} of the shared state. The result (value or exception) of a \tcode{shared_future} object can be set by calling a respective function on an @@ -11330,7 +11315,7 @@ \pnum For the primary template, \tcode{R} shall be an object type that -meets the \oldconcept{Destructible} requirements. +meets the \oldconceptref{Destructible} requirements. \pnum The implementation provides the template \tcode{shared_future} and two @@ -11556,7 +11541,6 @@ \pnum \returns - \begin{itemize} \item \tcode{future_status::deferred} if the shared state contains a deferred function. @@ -11591,7 +11575,6 @@ \pnum \returns - \begin{itemize} \item \tcode{future_status::deferred} if the shared state contains a deferred function. @@ -11647,11 +11630,10 @@ of the second function depends on the \tcode{policy} argument as follows (if more than one of these conditions applies, the implementation may choose any of the corresponding policies): - \begin{itemize} \item If \tcode{launch::async} is set in \tcode{policy}, calls -\tcode{invoke(auto(std::forward(f)), auto(std::for\-ward(args))...)}\iref{func.invoke,thread.thread.constr} +\tcode{invoke(auto(std::forward(f)), auto(std::forward(args))...)}\iref{func.invoke,thread.thread.constr} as if in a new thread of execution represented by a \tcode{thread} object with the values produced by \tcode{auto} being materialized\iref{conv.rval} in the thread that called \tcode{async}. @@ -11669,7 +11651,7 @@ \item If \tcode{launch::deferred} is set in \tcode{policy}, stores \tcode{auto(std::forward(f))} and -\tcode{auto(std::for\-ward(args))...} +\tcode{auto(std::forward(args))...} in the shared state. These copies of \tcode{f} and \tcode{args} constitute a \defnadj{deferred}{function}. Invocation of the deferred function evaluates \tcode{invoke(std::move(g), std::move(xyz))} where \tcode{g} is the stored value of @@ -11723,7 +11705,7 @@ out\iref{thread.thread.member}; \item the associated thread completion -synchronizes with\iref{intro.multithread} +\deflinkx{synchronizes with}{synchronize with}{intro.multithread} the return from the first function that successfully detects the ready status of the shared state or @@ -12244,7 +12226,7 @@ \pnum \tcode{D} shall meet the requirements for -\oldconcept{DefaultConstructible} and \oldconcept{MoveAssignable}. +\oldconceptref{DefaultConstructible} and \oldconceptref{MoveAssignable}. \pnum If \tcode{D} is trivially copyable, @@ -12302,7 +12284,7 @@ \pnum This class meets the requirements of -\oldconcept{Lockable}\iref{thread.req.lockable.req} and +\oldconceptref{Lockable}\iref{thread.req.lockable.req} and provides regions of RCU protection. \begin{example} \begin{codeblock} @@ -12450,8 +12432,8 @@ \pnum \expects -\tcode{D} meets the \oldconcept{MoveConstructible} and -\oldconcept{Destructible} requirements. +\tcode{D} meets the \oldconceptref{MoveConstructible} and +\oldconceptref{Destructible} requirements. \pnum \effects @@ -12643,7 +12625,7 @@ \pnum \tcode{D} shall meet the requirements for -\oldconcept{DefaultConstructible} and \oldconcept{MoveAssignable}. +\oldconceptref{DefaultConstructible} and \oldconceptref{MoveAssignable}. \pnum \tcode{T} may be an incomplete type. diff --git a/source/time.tex b/source/time.tex index dfa1601013..7dff009597 100644 --- a/source/time.tex +++ b/source/time.tex @@ -1039,13 +1039,13 @@ A type \tcode{TC} meets the \defnoldconcept{TrivialClock} requirements if \begin{itemize} \item -\tcode{TC} meets the \oldconcept{Clock} requirements, +\tcode{TC} meets the \oldconceptref{Clock} requirements, \item the types \tcode{TC::rep}, \tcode{TC::duration}, and \tcode{TC::time_point} -meet the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) and -\oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) -and \oldconcept{Swappable}\iref{swappable.requirements} +meet the \oldconceptref{EqualityComparable} (\tref{cpp17.equalitycomparable}) and +\oldconceptref{LessThanComparable} (\tref{cpp17.lessthancomparable}) +and \oldconceptref{Swappable}\iref{swappable.requirements} requirements and the requirements of numeric types\iref{numeric.requirements}, \begin{note} @@ -1203,15 +1203,15 @@ \end{itemdecl} \pnum -\tcode{is_clock} is a \oldconcept{UnaryTypeTrait}\iref{meta.rqmts} +\tcode{is_clock} is a \oldconceptref{UnaryTypeTrait}\iref{meta.rqmts} with a base characteristic of \tcode{true_type} -if \tcode{T} meets the \oldconcept{Clock} requirements\iref{time.clock.req}, +if \tcode{T} meets the \oldconceptref{Clock} requirements\iref{time.clock.req}, otherwise \tcode{false_type}. For the purposes of the specification of this trait, the extent to which an implementation determines -that a type cannot meet the \oldconcept{Clock} requirements is unspecified, +that a type cannot meet the \oldconceptref{Clock} requirements is unspecified, except that as a minimum -a type \tcode{T} shall not qualify as a \oldconcept{Clock} +a type \tcode{T} shall not qualify as a \oldconceptref{Clock} unless it meets all of the following conditions: \begin{itemize} \item the \grammarterm{qualified-id}s @@ -1222,7 +1222,7 @@ are valid and each denotes a type\iref{temp.deduct}, \item the expression \tcode{T::is_steady} -is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}, +is well-formed when treated as an \deflink{unevaluated operand}{expr.context}, \item the expression \tcode{T::now()} is well-formed when treated as an unevaluated operand. @@ -2074,7 +2074,6 @@ \end{codeblock} where \tcode{\placeholder{units-suffix}} depends on the type \tcode{Period::type} as follows: - \begin{itemize} \item If \tcode{Period::type} is \tcode{atto}, @@ -2200,7 +2199,7 @@ \tcode{is.setstate(ios_base::failbit)} is called and \tcode{d} is not modified. If \tcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. -If \tcode{\%z} (or a modified variant) is used and successfully parsed, +If \noncxxtcode{\%z} (or a modified variant) is used and successfully parsed, that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum @@ -2633,7 +2632,7 @@ \pnum The types defined in \ref{time.clock} meet the -\oldconcept{TrivialClock} +\oldconceptref{TrivialClock} requirements\iref{time.clock.req} unless otherwise specified. @@ -2792,9 +2791,9 @@ If the parse fails to decode a valid date, \tcode{is.setstate(ios_base::failbit)} is called and \tcode{tp} is not modified. -If \tcode{\%Z} is used and successfully parsed, +If \noncxxtcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. -If \tcode{\%z} (or a modified variant) is used and successfully parsed, +If \noncxxtcode{\%z} (or a modified variant) is used and successfully parsed, that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. Additionally, the parsed offset will be subtracted from the successfully parsed timestamp @@ -2851,7 +2850,7 @@ \end{example} \pnum -\tcode{utc_clock} is not a \oldconcept{TrivialClock} +\tcode{utc_clock} is not a \oldconceptref{TrivialClock} unless the implementation can guarantee that \tcode{utc_clock::now()} does not propagate an exception. \begin{note} @@ -2952,7 +2951,6 @@ \end{codeblock} Produces this output: - \begin{outputblock} 2015-06-30 23:59:59.500 UTC 2015-06-30 23:59:59.750 UTC @@ -2985,9 +2983,9 @@ If the parse fails to decode a valid date, \tcode{is.setstate(ios_base::failbit)} is called and \tcode{tp} is not modified. -If \tcode{\%Z} is used and successfully parsed, +If \noncxxtcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. -If \tcode{\%z} (or a modified variant) is used and successfully parsed, +If \noncxxtcode{\%z} (or a modified variant) is used and successfully parsed, that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. Additionally, the parsed offset will be subtracted from the successfully parsed timestamp @@ -3071,7 +3069,7 @@ (22s plus the initial 10s offset). \pnum -\tcode{tai_clock} is not a \oldconcept{TrivialClock} +\tcode{tai_clock} is not a \oldconceptref{TrivialClock} unless the implementation can guarantee that \tcode{tai_clock::now()} does not propagate an exception. \begin{note} @@ -3158,7 +3156,6 @@ \end{codeblock} Produces this output: - \begin{outputblock} 2000-01-01 00:00:00 UTC == 2000-01-01 00:00:32 TAI \end{outputblock} @@ -3184,9 +3181,9 @@ If the parse fails to decode a valid date, \tcode{is.setstate(ios_base::failbit)} is called and \tcode{tp} is not modified. -If \tcode{\%Z} is used and successfully parsed, +If \noncxxtcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. -If \tcode{\%z} (or a modified variant) is used and successfully parsed, +If \noncxxtcode{\%z} (or a modified variant) is used and successfully parsed, that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. Additionally, the parsed offset will be subtracted from the successfully parsed timestamp prior to assigning that difference to \tcode{tp}. @@ -3234,7 +3231,7 @@ and the additional 9 leap seconds inserted between 1970 and 1980. \pnum -\tcode{gps_clock} is not a \oldconcept{TrivialClock} +\tcode{gps_clock} is not a \oldconceptref{TrivialClock} unless the implementation can guarantee that \tcode{gps_clock::now()} does not propagate an exception. \begin{note} @@ -3321,7 +3318,6 @@ \end{codeblock} Produces this output: - \begin{outputblock} 2000-01-01 00:00:00 UTC == 2000-01-01 00:00:13 GPS \end{outputblock} @@ -3347,9 +3343,9 @@ If the parse fails to decode a valid date, \tcode{is.setstate(ios_base::failbit)} is called and \tcode{tp} is not modified. -If \tcode{\%Z} is used and successfully parsed, +If \noncxxtcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. -If \tcode{\%z} (or a modified variant) is used and successfully parsed, +If \noncxxtcode{\%z} (or a modified variant) is used and successfully parsed, that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. Additionally, the parsed offset will be subtracted from the successfully parsed timestamp prior to assigning that difference to \tcode{tp}. @@ -3372,7 +3368,7 @@ \pnum \tcode{file_clock} is an alias for a type -meeting the \oldconcept{TrivialClock} requirements\iref{time.clock.req}, and +meeting the \oldconceptref{TrivialClock} requirements\iref{time.clock.req}, and using a signed arithmetic type for \tcode{file_clock::rep}. \tcode{file_clock} is used to create the \tcode{time_point} system used for \tcode{file_time_type}\iref{filesystems}. @@ -3390,7 +3386,6 @@ \pnum The type denoted by \tcode{file_clock} provides precisely one of the following two sets of static member functions: - \begin{codeblock} template static sys_time<@\seebelow@> @@ -3399,9 +3394,7 @@ static file_time<@\seebelow@> from_sys(const sys_time&); \end{codeblock} - or: - \begin{codeblock} template static utc_time<@\seebelow@> @@ -3454,9 +3447,9 @@ If the parse fails to decode a valid date, \tcode{is.setstate(ios_base::failbit)} is called and \tcode{tp} is not modified. -If \tcode{\%Z} is used and successfully parsed, +If \noncxxtcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. -If \tcode{\%z} (or a modified variant) is used and successfully parsed, +If \noncxxtcode{\%z} (or a modified variant) is used and successfully parsed, that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. Additionally, the parsed offset will be subtracted from the successfully parsed timestamp prior to assigning that difference to \tcode{tp}. @@ -3565,9 +3558,9 @@ If the parse fails to decode a valid date, \tcode{is.setstate(ios_base::failbit)} is called and \tcode{tp} is not modified. -If \tcode{\%Z} is used and successfully parsed, +If \noncxxtcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. -If \tcode{\%z} (or a modified variant) is used and successfully parsed, +If \noncxxtcode{\%z} (or a modified variant) is used and successfully parsed, that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum @@ -3870,7 +3863,6 @@ \constraints At least one of the following clock time conversion expressions is well-formed: - \begin{itemize} \item \begin{codeblock} @@ -3979,8 +3971,8 @@ but may hold non-negative values outside this range. It can be constructed with any \tcode{unsigned} value, which will be subsequently truncated to fit into \tcode{day}'s unspecified internal storage. -\tcode{day} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) -and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements, +\tcode{day} meets the \oldconceptref{EqualityComparable} (\tref{cpp17.equalitycomparable}) +and \oldconceptref{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements, and participates in basic arithmetic with \tcode{days} objects, which represent a difference between two \tcode{day} objects. @@ -4218,9 +4210,9 @@ If the parse fails to decode a valid day, \tcode{is.setstate(ios_base::failbit)} is called and \tcode{d} is not modified. -If \tcode{\%Z} is used and successfully parsed, +If \noncxxtcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. -If \tcode{\%z} (or a modified variant) is used and successfully parsed, +If \noncxxtcode{\%z} (or a modified variant) is used and successfully parsed, that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum @@ -4272,8 +4264,8 @@ but may hold non-negative values outside this range. It can be constructed with any \tcode{unsigned} value, which will be subsequently truncated to fit into \tcode{month}'s unspecified internal storage. -\tcode{month} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) -and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements, +\tcode{month} meets the \oldconceptref{EqualityComparable} (\tref{cpp17.equalitycomparable}) +and \oldconceptref{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements, and participates in basic arithmetic with \tcode{months} objects, which represent a difference between two \tcode{month} objects. @@ -4532,9 +4524,9 @@ If the parse fails to decode a valid month, \tcode{is.setstate(ios_base::failbit)} is called and \tcode{m} is not modified. -If \tcode{\%Z} is used and successfully parsed, +If \noncxxtcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. -If \tcode{\%z} (or a modified variant) is used and successfully parsed, +If \noncxxtcode{\%z} (or a modified variant) is used and successfully parsed, that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum @@ -4582,8 +4574,8 @@ It can represent values in the range \crange{min()}{max()}. It can be constructed with any \tcode{int} value, which will be subsequently truncated to fit into \tcode{year}'s unspecified internal storage. -\tcode{year} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) -and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements, +\tcode{year} meets the \oldconceptref{EqualityComparable} (\tref{cpp17.equalitycomparable}) +and \oldconceptref{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements, and participates in basic arithmetic with \tcode{years} objects, which represent a difference between two \tcode{year} objects. @@ -4876,9 +4868,9 @@ If the parse fails to decode a valid year, \tcode{is.setstate(ios_base::failbit)} is called and \tcode{y} is not modified. -If \tcode{\%Z} is used and successfully parsed, +If \noncxxtcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. -If \tcode{\%z} (or a modified variant) is used and successfully parsed, +If \noncxxtcode{\%z} (or a modified variant) is used and successfully parsed, that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum @@ -4937,10 +4929,10 @@ it may hold non-negative values outside this range. It can be constructed with any \tcode{unsigned} value, which will be subsequently truncated to fit into \tcode{weekday}'s unspecified internal storage. -\tcode{weekday} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) requirements. +\tcode{weekday} meets the \oldconceptref{EqualityComparable} (\tref{cpp17.equalitycomparable}) requirements. \begin{note} \tcode{weekday} is not -\oldconcept{LessThanComparable} +\oldconceptref{LessThanComparable} because there is no universal consensus on which day is the first day of the week. \tcode{weekday}'s arithmetic operations treat the days of the week as a circular range, with no beginning and no end. @@ -5259,9 +5251,9 @@ If the parse fails to decode a valid weekday, \tcode{is.setstate(ios_base::failbit)} is called and \tcode{wd} is not modified. -If \tcode{\%Z} is used and successfully parsed, +If \noncxxtcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. -If \tcode{\%z} (or a modified variant) is used and successfully parsed, +If \noncxxtcode{\%z} (or a modified variant) is used and successfully parsed, that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum @@ -5520,8 +5512,8 @@ \pnum \tcode{month_day} represents a specific day of a specific month, but with an unspecified year. -\tcode{month_day} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) -and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements. +\tcode{month_day} meets the \oldconceptref{EqualityComparable} (\tref{cpp17.equalitycomparable}) +and \oldconceptref{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements. \pnum \tcode{month_day} is a trivially copyable and standard-layout class type. @@ -5642,9 +5634,9 @@ If the parse fails to decode a valid \tcode{month_day}, \tcode{is.setstate(ios_base::failbit)} is called and \tcode{md} is not modified. -If \tcode{\%Z} is used and successfully parsed, +If \noncxxtcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. -If \tcode{\%z} (or a modified variant) is used and successfully parsed, +If \noncxxtcode{\%z} (or a modified variant) is used and successfully parsed, that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum @@ -6021,8 +6013,8 @@ \tcode{year_month} represents a specific month of a specific year, but with an unspecified day. \tcode{year_month} is a field-based time point with a resolution of \tcode{months}. -\tcode{year_month} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) -and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements. +\tcode{year_month} meets the \oldconceptref{EqualityComparable} (\tref{cpp17.equalitycomparable}) +and \oldconceptref{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements. \pnum \tcode{year_month} is a trivially copyable and standard-layout class type. @@ -6322,9 +6314,9 @@ If the parse fails to decode a valid \tcode{year_month}, \tcode{is.setstate(ios_base::failbit)} is called and \tcode{ym} is not modified. -If \tcode{\%Z} is used and successfully parsed, +If \noncxxtcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. -If \tcode{\%z} (or a modified variant) is used and successfully parsed, +If \noncxxtcode{\%z} (or a modified variant) is used and successfully parsed, that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum @@ -6377,8 +6369,8 @@ For the latter, there is a conversion to \tcode{sys_days}, which efficiently supports \tcode{days}-oriented arithmetic. \end{note} -\tcode{year_month_day} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) -and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements. +\tcode{year_month_day} meets the \oldconceptref{EqualityComparable} (\tref{cpp17.equalitycomparable}) +and \oldconceptref{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements. \pnum \tcode{year_month_day} is a trivially copyable and standard-layout class type. @@ -6786,9 +6778,9 @@ If the parse fails to decode a valid \tcode{year_month_day}, \tcode{is.setstate(ios_base::failbit)} is called and \tcode{ymd} is not modified. -If \tcode{\%Z} is used and successfully parsed, +If \noncxxtcode{\%Z} is used and successfully parsed, that value will be assigned to \tcode{*abbrev} if \tcode{abbrev} is non-null. -If \tcode{\%z} (or a modified variant) is used and successfully parsed, +If \noncxxtcode{\%z} (or a modified variant) is used and successfully parsed, that value will be assigned to \tcode{*offset} if \tcode{offset} is non-null. \pnum @@ -6838,8 +6830,8 @@ For the latter, there is a conversion to \tcode{sys_days}, which efficiently supports \tcode{days}-oriented arithmetic. \end{note} -\tcode{year_month_day_last} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) -and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements. +\tcode{year_month_day_last} meets the \oldconceptref{EqualityComparable} (\tref{cpp17.equalitycomparable}) +and \oldconceptref{LessThanComparable} (\tref{cpp17.lessthancomparable}) requirements. \pnum \tcode{year_month_day_last} is a trivially copyable and standard-layout class type. @@ -7209,7 +7201,7 @@ For the latter, there is a conversion to \tcode{sys_days}, which efficiently supports \tcode{days}-oriented arithmetic. \end{note} -\tcode{year_month_weekday} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) requirements. +\tcode{year_month_weekday} meets the \oldconceptref{EqualityComparable} (\tref{cpp17.equalitycomparable}) requirements. \pnum \tcode{year_month_weekday} is a trivially copyable and standard-layout class type. @@ -7602,7 +7594,7 @@ For the latter, there is a conversion to \tcode{sys_days}, which efficiently supports \tcode{days}-oriented arithmetic. \end{note} -\tcode{year_month_weekday_last} meets the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) requirements. +\tcode{year_month_weekday_last} meets the \oldconceptref{EqualityComparable} (\tref{cpp17.equalitycomparable}) requirements. \pnum \tcode{year_month_weekday_last} is a trivially copyable and standard-layout class type. @@ -7916,7 +7908,6 @@ \pnum \begin{note} The year, month, and day are accepted in any of the following 3 orders: - \begin{codeblock} @\tcode{\placeholder{year}}@/@\tcode{\placeholder{month}}@/@\tcode{\placeholder{day}}@ @\tcode{\placeholder{month}}@/@\tcode{\placeholder{day}}@/@\tcode{\placeholder{year}}@ @@ -7924,7 +7915,6 @@ \end{codeblock} Anywhere a \tcode{\placeholder{day}} is needed, any of the following can also be specified: - \begin{codeblock} last @\tcode{\placeholder{weekday}}@[@\tcode{\placeholder{i}}@] @@ -7937,7 +7927,6 @@ Partial-date types such as \tcode{year_month} and \tcode{month_day} can be created by not applying the second division operator for any of the three orders. For example: - \begin{codeblock} year_month ym = 2015y/April; month_day md1 = April/4; @@ -8855,7 +8844,7 @@ \pnum \tcode{tzdb_list::const_iterator} is a constant iterator -which meets the \oldconcept{ForwardIterator} requirements +which meets the \oldconceptref{ForwardIterator} requirements and has a value type of \tcode{tzdb}. \indexlibrarymember{front}{tzdb_list}% @@ -9126,7 +9115,6 @@ Initializes the base class with a sequence of \tcode{char} equivalent to that produced by \tcode{os.str()} initialized as shown below: - \begin{codeblock} ostringstream os; os << tp << " is in a gap between\n" @@ -9156,7 +9144,6 @@ \end{codeblock} Produces the output: - \begin{outputblock} 2016-03-13 02:30:00 is in a gap between 2016-03-13 02:00:00 EST and @@ -9201,7 +9188,6 @@ Initializes the base class with a sequence of \tcode{char} equivalent to that produced by \tcode{os.str()} initialized as shown below: - \begin{codeblock} ostringstream os; os << tp << " is ambiguous. It could be\n" @@ -9229,7 +9215,6 @@ \end{codeblock} Produces the output: - \begin{outputblock} 2016-11-06 01:30:00 is ambiguous. It could be 2016-11-06 01:30:00 EDT == 2016-11-06 05:30:00 UTC or @@ -9283,7 +9268,6 @@ the UTC offset in effect for the associated \tcode{time_zone} and \tcode{time_point}. The relationship between \tcode{local_time} and \tcode{sys_time} is: - \begin{codeblock} offset = local_time - sys_time \end{codeblock} @@ -9588,7 +9572,6 @@ for the \tcode{zoned_time} default constructor, and constructors taking \tcode{string_view}. A specialization for \tcode{const time_zone*} is provided by the implementation: - \begin{codeblock} namespace std::chrono { template<> struct zoned_traits { @@ -10164,7 +10147,6 @@ \end{codeblock} Produces the output: - \begin{outputblock} 1972-07-01 00:00:00: 1s 1973-01-01 00:00:00: 1s @@ -10463,7 +10445,6 @@ interpret the format specification as a \fmtgrammarterm{chrono-format-spec} according to the following syntax: - \begin{ncbnf} \fmtnontermdef{chrono-format-spec}\br \opt{fill-and-align} \opt{width} \opt{precision} \opt{\terminal{L}} \opt{chrono-specs} @@ -10478,23 +10459,23 @@ \begin{ncbnf} \fmtnontermdef{literal-char}\br - \textnormal{any character other than \tcode{\{}, \tcode{\}}, or \tcode{\%}} + \textnormal{any character other than \noncxxtcode{\{}, \noncxxtcode{\}}, or \noncxxtcode{\%}} \end{ncbnf} \begin{ncbnf} \fmtnontermdef{conversion-spec}\br - \terminal{\%} \opt{modifier} type + \noncxxterminal{\%} \opt{modifier} type \end{ncbnf} \begin{ncbnf} \fmtnontermdef{modifier} \textnormal{one of}\br - \terminal{E O} + \noncxxterminal{E O} \end{ncbnf} \begin{ncbnf} \fmtnontermdef{type} \textnormal{one of}\br - \terminal{a A b B c C d D e F g G h H I j m M n}\br - \terminal{p q Q r R S t T u U V w W x X y Y z Z \%} + \noncxxterminal{a A b B c C d D e F g G h H I j m M n}\br + \noncxxterminal{p q Q r R S t T u U V w W x X y Y z Z \%} \end{ncbnf} The productions @@ -10567,11 +10548,11 @@ does not contain time zone abbreviation and time zone offset information. If the information is available, -the conversion specifiers \tcode{\%Z} and \tcode{\%z} +the conversion specifiers \noncxxtcode{\%Z} and \noncxxtcode{\%z} will format this information (respectively). \begin{note} If the information is not available and -a \tcode{\%Z} or \tcode{\%z} +a \noncxxtcode{\%Z} or \noncxxtcode{\%z} conversion specifier appears in the \fmtgrammarterm{chrono-format-spec}, an exception of type \tcode{format_error} is thrown, @@ -10587,7 +10568,7 @@ to format as a \tcode{weekday}. \end{example} However, if a flag refers to a ``time of day'' -(e.g., \tcode{\%H}, \tcode{\%I}, \tcode{\%p}, etc.), +(e.g., \noncxxtcode{\%H}, \noncxxtcode{\%I}, \noncxxtcode{\%p}, etc.), then a specialization of \tcode{duration} is interpreted as the time of day elapsed since midnight. @@ -10599,57 +10580,57 @@ \hline \lhdr{Specifier} & \rhdr{Replacement} \\ \capsep \endhead -\tcode{\%a} & +\noncxxtcode{\%a} & The locale's abbreviated weekday name. If the value does not contain a valid weekday, an exception of type \tcode{format_error} is thrown. \\ \rowsep -\tcode{\%A} & +\noncxxtcode{\%A} & The locale's full weekday name. If the value does not contain a valid weekday, an exception of type \tcode{format_error} is thrown. \\ \rowsep -\tcode{\%b} & +\noncxxtcode{\%b} & The locale's abbreviated month name. If the value does not contain a valid month, an exception of type \tcode{format_error} is thrown. \\ \rowsep -\tcode{\%B} & +\noncxxtcode{\%B} & The locale's full month name. If the value does not contain a valid month, an exception of type \tcode{format_error} is thrown. \\ \rowsep -\tcode{\%c} & +\noncxxtcode{\%c} & The locale's date and time representation. -The modified command \tcode{\%Ec} produces +The modified command \noncxxtcode{\%Ec} produces the locale's alternate date and time representation. \\ \rowsep -\tcode{\%C} & +\noncxxtcode{\%C} & The year divided by 100 using floored division. If the result is a single decimal digit, -it is prefixed with \tcode{0}. -The modified command \tcode{\%EC} produces +it is prefixed with \noncxxtcode{0}. +The modified command \noncxxtcode{\%EC} produces the locale's alternative representation of the century. \\ \rowsep -\tcode{\%d} & +\noncxxtcode{\%d} & The day of month as a decimal number. If the result is a single decimal digit, -it is prefixed with \tcode{0}. -The modified command \tcode{\%Od} produces +it is prefixed with \noncxxtcode{0}. +The modified command \noncxxtcode{\%Od} produces the locale's alternative representation. \\ \rowsep -\tcode{\%D} & -Equivalent to \tcode{\%m/\%d/\%y}. +\noncxxtcode{\%D} & +Equivalent to \noncxxtcode{\%m/\%d/\%y}. \\ \rowsep -\tcode{\%e} & +\noncxxtcode{\%e} & The day of month as a decimal number. If the result is a single decimal digit, it is prefixed with a space. -The modified command \tcode{\%Oe} produces +The modified command \noncxxtcode{\%Oe} produces the locale's alternative representation. \\ \rowsep -\tcode{\%F} & -Equivalent to \tcode{\%Y-\%m-\%d}. +\noncxxtcode{\%F} & +Equivalent to \noncxxtcode{\%Y-\%m-\%d}. \\ \rowsep \tcode{\%g} & The last two decimal digits of the calendar year @@ -10660,158 +10641,158 @@ The calendar year as a decimal number, as specified in ISO 8601-1:2019 for the week calendar. If the result is less than four digits -it is left-padded with \tcode{0} to four digits. +it is left-padded with \noncxxtcode{0} to four digits. \\ \rowsep -\tcode{\%h} & -Equivalent to \tcode{\%b}. +\noncxxtcode{\%h} & +Equivalent to \noncxxtcode{\%b}. \\ \rowsep -\tcode{\%H} & +\noncxxtcode{\%H} & The hour (24-hour clock) as a decimal number. If the result is a single digit, -it is prefixed with \tcode{0}. -The modified command \tcode{\%OH} produces +it is prefixed with \noncxxtcode{0}. +The modified command \noncxxtcode{\%OH} produces the locale's alternative representation. \\ \rowsep -\tcode{\%I} & +\noncxxtcode{\%I} & The hour (12-hour clock) as a decimal number. If the result is a single digit, -it is prefixed with \tcode{0}. -The modified command \tcode{\%OI} produces +it is prefixed with \noncxxtcode{0}. +The modified command \noncxxtcode{\%OI} produces the locale's alternative representation. \\ \rowsep -\tcode{\%j} & +\noncxxtcode{\%j} & If the type being formatted is a specialization of \tcode{duration}, the decimal number of \tcode{days} without padding. Otherwise, the day of the year as a decimal number. -January 1 is \tcode{001}. +January 1 is \noncxxtcode{001}. If the result is less than three digits, -it is left-padded with \tcode{0} to three digits. +it is left-padded with \noncxxtcode{0} to three digits. \\ \rowsep -\tcode{\%m} & +\noncxxtcode{\%m} & The month as a decimal number. -Jan is \tcode{01}. -If the result is a single digit, it is prefixed with \tcode{0}. -The modified command \tcode{\%Om} produces +Jan is \noncxxtcode{01}. +If the result is a single digit, it is prefixed with \noncxxtcode{0}. +The modified command \noncxxtcode{\%Om} produces the locale's alternative representation. \\ \rowsep -\tcode{\%M} & +\noncxxtcode{\%M} & The minute as a decimal number. -If the result is a single digit, it is prefixed with \tcode{0}. -The modified command \tcode{\%OM} produces +If the result is a single digit, it is prefixed with \noncxxtcode{0}. +The modified command \noncxxtcode{\%OM} produces the locale's alternative representation. \\ \rowsep -\tcode{\%n} & +\noncxxtcode{\%n} & A new-line character. \\ \rowsep -\tcode{\%p} & +\noncxxtcode{\%p} & The locale's equivalent of the AM/PM designations associated with a 12-hour clock. \\ \rowsep -\tcode{\%q} & +\noncxxtcode{\%q} & The duration's unit suffix as specified in \ref{time.duration.io}. \\ \rowsep -\tcode{\%Q} & +\noncxxtcode{\%Q} & The duration's numeric value (as if extracted via \tcode{.count()}). \\ \rowsep -\tcode{\%r} & +\noncxxtcode{\%r} & The locale's 12-hour clock time. \\ \rowsep -\tcode{\%R} & -Equivalent to \tcode{\%H:\%M}. +\noncxxtcode{\%R} & +Equivalent to \noncxxtcode{\%H:\%M}. \\ \rowsep -\tcode{\%S} & +\noncxxtcode{\%S} & Seconds as a decimal number. -If the number of seconds is less than \tcode{10}, the result is prefixed with \tcode{0}. +If the number of seconds is less than \noncxxtcode{10}, the result is prefixed with \noncxxtcode{0}. If the precision of the input cannot be exactly represented with seconds, then the format is a decimal floating-point number with a fixed format and a precision matching that of the precision of the input (or to a microseconds precision if the conversion to floating-point decimal seconds cannot be made within 18 fractional digits). The character for the decimal point is localized according to the locale. -The modified command \tcode{\%OS} produces +The modified command \noncxxtcode{\%OS} produces the locale's alternative representation. \\ \rowsep -\tcode{\%t} & +\noncxxtcode{\%t} & A horizontal-tab character. \\ \rowsep -\tcode{\%T} & -Equivalent to \tcode{\%H:\%M:\%S}. +\noncxxtcode{\%T} & +Equivalent to \noncxxtcode{\%H:\%M:\%S}. \\ \rowsep -\tcode{\%u} & -The calendar day of week as a decimal number (\tcode{1}-\tcode{7}), +\noncxxtcode{\%u} & +The calendar day of week as a decimal number (\noncxxtcode{1}-\noncxxtcode{7}), as specified in ISO 8601-1:2019, -where Monday is \tcode{1}. -The modified command \tcode{\%Ou} produces +where Monday is \noncxxtcode{1}. +The modified command \noncxxtcode{\%Ou} produces the locale's alternative representation. \\ \rowsep -\tcode{\%U} & +\noncxxtcode{\%U} & The week number of the year as a decimal number. -The first Sunday of the year is the first day of week \tcode{01}. -Days of the same year prior to that are in week \tcode{00}. -If the result is a single digit, it is prefixed with \tcode{0}. -The modified command \tcode{\%OU} produces +The first Sunday of the year is the first day of week \noncxxtcode{01}. +Days of the same year prior to that are in week \noncxxtcode{00}. +If the result is a single digit, it is prefixed with \noncxxtcode{0}. +The modified command \noncxxtcode{\%OU} produces the locale's alternative representation. \\ \rowsep -\tcode{\%V} & +\noncxxtcode{\%V} & The calendar week of year as a decimal number, as specified in ISO 8601-1:2019 for the week calendar. -If the result is a single digit, it is prefixed with \tcode{0}. -The modified command \tcode{\%OV} produces +If the result is a single digit, it is prefixed with \noncxxtcode{0}. +The modified command \noncxxtcode{\%OV} produces the locale's alternative representation. \\ \rowsep -\tcode{\%w} & -The weekday as a decimal number (\tcode{0}-\tcode{6}), where Sunday is \tcode{0}. -The modified command \tcode{\%Ow} produces +\noncxxtcode{\%w} & +The weekday as a decimal number (\noncxxtcode{0}-\noncxxtcode{6}), where Sunday is \noncxxtcode{0}. +The modified command \noncxxtcode{\%Ow} produces the locale's alternative representation. \\ \rowsep -\tcode{\%W} & +\noncxxtcode{\%W} & The week number of the year as a decimal number. -The first Monday of the year is the first day of week \tcode{01}. -Days of the same year prior to that are in week \tcode{00}. -If the result is a single digit, it is prefixed with \tcode{0}. -The modified command \tcode{\%OW} produces +The first Monday of the year is the first day of week \noncxxtcode{01}. +Days of the same year prior to that are in week \noncxxtcode{00}. +If the result is a single digit, it is prefixed with \noncxxtcode{0}. +The modified command \noncxxtcode{\%OW} produces the locale's alternative representation. \\ \rowsep -\tcode{\%x} & +\noncxxtcode{\%x} & The locale's date representation. -The modified command \tcode{\%Ex} produces +The modified command \noncxxtcode{\%Ex} produces the locale's alternate date representation. \\ \rowsep -\tcode{\%X} & +\noncxxtcode{\%X} & The locale's time representation. -The modified command \tcode{\%EX} produces +The modified command \noncxxtcode{\%EX} produces the locale's alternate time representation. \\ \rowsep -\tcode{\%y} & +\noncxxtcode{\%y} & The last two decimal digits of the year. -If the result is a single digit it is prefixed by \tcode{0}. -The modified command \tcode{\%Oy} produces the locale's alternative representation. -The modified command \tcode{\%Ey} produces the locale's alternative representation -of offset from \tcode{\%EC} (year only). +If the result is a single digit it is prefixed by \noncxxtcode{0}. +The modified command \noncxxtcode{\%Oy} produces the locale's alternative representation. +The modified command \noncxxtcode{\%Ey} produces the locale's alternative representation +of offset from \noncxxtcode{\%EC} (year only). \\ \rowsep -\tcode{\%Y} & +\noncxxtcode{\%Y} & The year as a decimal number. If the result is less than four digits -it is left-padded with \tcode{0} to four digits. -The modified command \tcode{\%EY} produces +it is left-padded with \noncxxtcode{0} to four digits. +The modified command \noncxxtcode{\%EY} produces the locale's alternative full year representation. \\ \rowsep \tcode{\%z} & The offset from UTC as specified in ISO 8601-1:2019, 5.3.4.1. -For example \tcode{-0430} refers to 4 hours 30 minutes behind UTC\@. -If the offset is zero, \tcode{+0000} is used. -The modified commands \tcode{\%Ez} and \tcode{\%Oz} -insert a \tcode{:} between the hours and minutes: \tcode{-04:30}. +For example \noncxxtcode{-0430} refers to 4 hours 30 minutes behind UTC\@. +If the offset is zero, \noncxxtcode{+0000} is used. +The modified commands \noncxxtcode{\%Ez} and \noncxxtcode{\%Oz} +insert a \noncxxtcode{:} between the hours and minutes: \noncxxtcode{-04:30}. If the offset information is not available, an exception of type \tcode{format_error} is thrown. \\ \rowsep -\tcode{\%Z} & +\noncxxtcode{\%Z} & The time zone abbreviation. If the time zone abbreviation is not available, an exception of type \tcode{format_error} is thrown. \\ \rowsep -\tcode{\%\%} & -A \tcode{\%} character. +\noncxxtcode{\%\%} & +A \noncxxtcode{\%} character. \\ \end{LongTable} @@ -10858,9 +10839,9 @@ \begin{itemdescr} \pnum \remarks -If \tcode{\%Z} is used, +If \noncxxtcode{\%Z} is used, it is replaced with \tcode{\exposid{STATICALLY-WIDEN}("UTC")}. -If \tcode{\%z} (or a modified variant of \tcode{\%z}) is used, +If \noncxxtcode{\%z} (or a modified variant of \noncxxtcode{\%z}) is used, an offset of \tcode{0min} is formatted. \end{itemdescr} @@ -10873,9 +10854,9 @@ \begin{itemdescr} \pnum \remarks -If \tcode{\%Z} is used, +If \noncxxtcode{\%Z} is used, it is replaced with \tcode{\exposid{STATICALLY-WIDEN}("UTC")}. -If \tcode{\%z} (or a modified variant of \tcode{\%z}) is used, +If \noncxxtcode{\%z} (or a modified variant of \noncxxtcode{\%z}) is used, an offset of \tcode{0min} is formatted. If the argument represents a time during a positive leap second insertion, and if a seconds field is formatted, @@ -10892,9 +10873,9 @@ \begin{itemdescr} \pnum \remarks -If \tcode{\%Z} is used, +If \noncxxtcode{\%Z} is used, it is replaced with \tcode{\exposid{STATICALLY-WIDEN}("TAI")}. -If \tcode{\%z} (or a modified variant of \tcode{\%z}) is used, +If \noncxxtcode{\%z} (or a modified variant of \noncxxtcode{\%z}) is used, an offset of \tcode{0min} is formatted. The date and time formatted are equivalent to those formatted by a \tcode{sys_time} initialized with @@ -10913,9 +10894,9 @@ \begin{itemdescr} \pnum \remarks -If \tcode{\%Z} is used, +If \noncxxtcode{\%Z} is used, it is replaced with \tcode{\exposid{STATICALLY-WIDEN}("GPS")}. -If \tcode{\%z} (or a modified variant of \tcode{\%z}) is used, +If \noncxxtcode{\%z} (or a modified variant of \noncxxtcode{\%z}) is used, an offset of \tcode{0min} is formatted. The date and time formatted are equivalent to those formatted by a \tcode{sys_time} initialized with @@ -10934,9 +10915,9 @@ \begin{itemdescr} \pnum \remarks -If \tcode{\%Z} is used, +If \noncxxtcode{\%Z} is used, it is replaced with \tcode{\exposid{STATICALLY-WIDEN}("UTC")}. -If \tcode{\%z} (or a modified variant of \tcode{\%z}) is used, +If \noncxxtcode{\%z} (or a modified variant of \noncxxtcode{\%z}) is used, an offset of \tcode{0min} is formatted. The date and time formatted are equivalent to those formatted @@ -10954,7 +10935,7 @@ \begin{itemdescr} \pnum \remarks -If \tcode{\%Z}, \tcode{\%z}, or a modified version of \tcode{\%z} is used, +If \noncxxtcode{\%Z}, \noncxxtcode{\%z}, or a modified version of \noncxxtcode{\%z} is used, an exception of type \tcode{format_error} is thrown. \end{itemdescr} @@ -10994,16 +10975,16 @@ \pnum \remarks -If \tcode{\%Z} is used, +If \noncxxtcode{\%Z} is used, it is replaced with \tcode{*f.abbrev} if \tcode{f.abbrev} is not a null pointer value. -If \tcode{\%Z} is used +If \noncxxtcode{\%Z} is used and \tcode{f.abbrev} is a null pointer value, an exception of type \tcode{format_error} is thrown. -If \tcode{\%z} (or a modified variant of \tcode{\%z}) is used, +If \noncxxtcode{\%z} (or a modified variant of \noncxxtcode{\%z}) is used, it is formatted with the value of \tcode{*f.offset_sec} if \tcode{f.offset_sec} is not a null pointer value. -If \tcode{\%z} (or a modified variant of \tcode{\%z}) is used +If \noncxxtcode{\%z} (or a modified variant of \noncxxtcode{\%z}) is used and \tcode{f.offset_sec} is a null pointer value, then an exception of type \tcode{format_error} is thrown. \end{itemdescr} @@ -11080,7 +11061,7 @@ \begin{codeblock} from_stream(declval&>(), @$F$@, tp) \end{codeblock} -is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}. +is well-formed when treated as an \deflink{unevaluated operand}{expr.context}. \pnum \returns @@ -11113,7 +11094,7 @@ \begin{codeblock} from_stream(declval&>(), @$F$@, tp, addressof(abbrev)) \end{codeblock} -is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}. +is well-formed when treated as an \deflink{unevaluated operand}{expr.context}. \pnum \returns @@ -11150,7 +11131,7 @@ declval*>(), &offset) \end{codeblock} -is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}. +is well-formed when treated as an \deflink{unevaluated operand}{expr.context}. \pnum \returns @@ -11190,7 +11171,7 @@ from_stream(declval&>(), @$F$@, tp, addressof(abbrev), &offset) \end{codeblock} -is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}. +is well-formed when treated as an \deflink{unevaluated operand}{expr.context}. \pnum \returns @@ -11207,8 +11188,8 @@ on the value returned by subsequent calls to \tcode{basic_istream<>::gcount()}. Each overload takes a format string containing ordinary characters and flags which have special meaning. -Each flag begins with a \tcode{\%}. -Some flags can be modified by \tcode{E} or \tcode{O}. +Each flag begins with a \noncxxtcode{\%}. +Some flags can be modified by \noncxxtcode{E} or \noncxxtcode{O}. During parsing each flag interprets characters as parts of date and time types according to~\tref{time.parse.spec}. Some flags can be modified by a width parameter @@ -11226,7 +11207,7 @@ A \tcode{duration} cannot represent a \tcode{weekday}. \end{example} However, if a flag refers to a ``time of day'' -(e.g., \tcode{\%H}, \tcode{\%I}, \tcode{\%p}, etc.), +(e.g., \noncxxtcode{\%H}, \noncxxtcode{\%I}, \noncxxtcode{\%p}, etc.), then a specialization of \tcode{duration} is parsed as the time of day elapsed since midnight. @@ -11246,251 +11227,251 @@ \hline \lhdr{Flag} & \rhdr{Parsed value} \\ \capsep \endhead -\tcode{\%a} & +\noncxxtcode{\%a} & The locale's full or abbreviated case-insensitive weekday name. \\ \rowsep -\tcode{\%A} & -Equivalent to \tcode{\%a}. +\noncxxtcode{\%A} & +Equivalent to \noncxxtcode{\%a}. \\ \rowsep -\tcode{\%b} & +\noncxxtcode{\%b} & The locale's full or abbreviated case-insensitive month name. \\ \rowsep -\tcode{\%B} & -Equivalent to \tcode{\%b}. +\noncxxtcode{\%B} & +Equivalent to \noncxxtcode{\%b}. \\ \rowsep -\tcode{\%c} & +\noncxxtcode{\%c} & The locale's date and time representation. -The modified command \tcode{\%Ec} interprets +The modified command \noncxxtcode{\%Ec} interprets the locale's alternate date and time representation. \\ \rowsep -\tcode{\%C} & +\noncxxtcode{\%C} & The century as a decimal number. -The modified command \tcode{\%\placeholder{N}C} specifies +The modified command \noncxxtcode{\%\placeholder{N}C} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, the default is 2. +If \noncxxtcode{\placeholder{N}} is not specified, the default is 2. Leading zeroes are permitted but not required. -The modified command \tcode{\%EC} interprets +The modified command \noncxxtcode{\%EC} interprets the locale's alternative representation of the century. \\ \rowsep -\tcode{\%d} & +\noncxxtcode{\%d} & The day of the month as a decimal number. -The modified command \tcode{\%\placeholder{N}d} specifies +The modified command \noncxxtcode{\%\placeholder{N}d} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, the default is 2. +If \noncxxtcode{\placeholder{N}} is not specified, the default is 2. Leading zeroes are permitted but not required. -The modified command \tcode{\%Od} interprets +The modified command \noncxxtcode{\%Od} interprets the locale's alternative representation of the day of the month. \\ \rowsep -\tcode{\%D} & -Equivalent to \tcode{\%m/\%d/\%y}. +\noncxxtcode{\%D} & +Equivalent to \noncxxtcode{\%m/\%d/\%y}. \\ \rowsep -\tcode{\%e} & -Equivalent to \tcode{\%d} and can be modified like \tcode{\%d}. +\noncxxtcode{\%e} & +Equivalent to \noncxxtcode{\%d} and can be modified like \noncxxtcode{\%d}. \\ \rowsep -\tcode{\%F} & -Equivalent to \tcode{\%Y-\%m-\%d}. -If modified with a width \tcode{\placeholder{N}}, -the width is applied to only \tcode{\%Y}. +\noncxxtcode{\%F} & +Equivalent to \noncxxtcode{\%Y-\%m-\%d}. +If modified with a width \noncxxtcode{\placeholder{N}}, +the width is applied to only \noncxxtcode{\%Y}. \\ \rowsep -\tcode{\%g} & +\noncxxtcode{\%g} & The last two decimal digits of the calendar year, as specified in ISO 8601-1:2019 for the week calendar. -The modified command \tcode{\%\placeholder{N}g} specifies +The modified command \noncxxtcode{\%\placeholder{N}g} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, the default is 2. +If \noncxxtcode{\placeholder{N}} is not specified, the default is 2. Leading zeroes are permitted but not required. \\ \rowsep -\tcode{\%G} & +\noncxxtcode{\%G} & The calendar year as a decimal number, as specified in ISO 8601-1:2019 for the week calendar. -The modified command \tcode{\%\placeholder{N}G} specifies +The modified command \noncxxtcode{\%\placeholder{N}G} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, the default is 4. +If \noncxxtcode{\placeholder{N}} is not specified, the default is 4. Leading zeroes are permitted but not required. \\ \rowsep -\tcode{\%h} & -Equivalent to \tcode{\%b}. +\noncxxtcode{\%h} & +Equivalent to \noncxxtcode{\%b}. \\ \rowsep -\tcode{\%H} & +\noncxxtcode{\%H} & The hour (24-hour clock) as a decimal number. -The modified command \tcode{\%\placeholder{N}H} specifies +The modified command \noncxxtcode{\%\placeholder{N}H} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, the default is 2. +If \noncxxtcode{\placeholder{N}} is not specified, the default is 2. Leading zeroes are permitted but not required. -The modified command \tcode{\%OH} interprets +The modified command \noncxxtcode{\%OH} interprets the locale's alternative representation. \\ \rowsep -\tcode{\%I} & +\noncxxtcode{\%I} & The hour (12-hour clock) as a decimal number. -The modified command \tcode{\%\placeholder{N}I} specifies +The modified command \noncxxtcode{\%\placeholder{N}I} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, the default is 2. +If \noncxxtcode{\placeholder{N}} is not specified, the default is 2. Leading zeroes are permitted but not required. -The modified command \tcode{\%OI} +The modified command \noncxxtcode{\%OI} interprets the locale's alternative representation. \\ \rowsep -\tcode{\%j} & +\noncxxtcode{\%j} & If the type being parsed is a specialization of \tcode{duration}, a decimal number of \tcode{days}. Otherwise, the day of the year as a decimal number. -January 1 is \tcode{1}. +January 1 is \noncxxtcode{1}. In either case, -the modified command \tcode{\%\placeholder{N}j} specifies +the modified command \noncxxtcode{\%\placeholder{N}j} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, the default is 3. +If \noncxxtcode{\placeholder{N}} is not specified, the default is 3. Leading zeroes are permitted but not required. \\ \rowsep -\tcode{\%m} & +\noncxxtcode{\%m} & The month as a decimal number. -January is \tcode{1}. -The modified command \tcode{\%\placeholder{N}m} specifies +January is \noncxxtcode{1}. +The modified command \noncxxtcode{\%\placeholder{N}m} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, the default is 2. +If \noncxxtcode{\placeholder{N}} is not specified, the default is 2. Leading zeroes are permitted but not required. -The modified command \tcode{\%Om} interprets +The modified command \noncxxtcode{\%Om} interprets the locale's alternative representation. \\ \rowsep -\tcode{\%M} & +\noncxxtcode{\%M} & The minutes as a decimal number. -The modified command \tcode{\%\placeholder{N}M} specifies +The modified command \noncxxtcode{\%\placeholder{N}M} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, the default is 2. +If \noncxxtcode{\placeholder{N}} is not specified, the default is 2. Leading zeroes are permitted but not required. -The modified command \tcode{\%OM} interprets +The modified command \noncxxtcode{\%OM} interprets the locale's alternative representation. \\ \rowsep -\tcode{\%n} & +\noncxxtcode{\%n} & Matches one whitespace character. \begin{tailnote} -\tcode{\%n}, \tcode{\%t}, and a space +\noncxxtcode{\%n}, \noncxxtcode{\%t}, and a space can be combined to match a wide range of whitespace patterns. For example, \tcode{"\%n "} matches one or more whitespace characters, and \tcode{"\%n\%t\%t"} matches one to three whitespace characters. \end{tailnote} \\ \rowsep -\tcode{\%p} & +\noncxxtcode{\%p} & The locale's equivalent of the AM/PM designations associated with a 12-hour clock. \\ \rowsep -\tcode{\%r} & +\noncxxtcode{\%r} & The locale's 12-hour clock time. \\ \rowsep -\tcode{\%R} & -Equivalent to \tcode{\%H:\%M}. +\noncxxtcode{\%R} & +Equivalent to \noncxxtcode{\%H:\%M}. \\ \rowsep -\tcode{\%S} & +\noncxxtcode{\%S} & The seconds as a decimal number. -The modified command \tcode{\%\placeholder{N}S} specifies +The modified command \noncxxtcode{\%\placeholder{N}S} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, +If \noncxxtcode{\placeholder{N}} is not specified, the default is 2 if the input time has a precision convertible to seconds. Otherwise the default width is determined by the decimal precision of the input and the field is interpreted as a \tcode{long double} in a fixed format. If encountered, the locale determines the decimal point character. Leading zeroes are permitted but not required. -The modified command \tcode{\%OS} interprets +The modified command \noncxxtcode{\%OS} interprets the locale's alternative representation. \\ \rowsep -\tcode{\%t} & +\noncxxtcode{\%t} & Matches zero or one whitespace characters. \\ \rowsep -\tcode{\%T} & -Equivalent to \tcode{\%H:\%M:\%S}. +\noncxxtcode{\%T} & +Equivalent to \noncxxtcode{\%H:\%M:\%S}. \\ \rowsep -\tcode{\%u} & -The calendar day of week as a decimal number (\tcode{1}-\tcode{7}), +\noncxxtcode{\%u} & +The calendar day of week as a decimal number (\noncxxtcode{1}-\noncxxtcode{7}), as specified in ISO 8601-1:2019, -where Monday is \tcode{1}. -The modified command \tcode{\%\placeholder{N}u} specifies +where Monday is \noncxxtcode{1}. +The modified command \noncxxtcode{\%\placeholder{N}u} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, the default is \tcode{1}. +If \noncxxtcode{\placeholder{N}} is not specified, the default is \noncxxtcode{1}. Leading zeroes are permitted but not required. \\ \rowsep -\tcode{\%U} & +\noncxxtcode{\%U} & The week number of the year as a decimal number. -The first Sunday of the year is the first day of week \tcode{01}. -Days of the same year prior to that are in week \tcode{00}. -The modified command \tcode{\%\placeholder{N}U} specifies +The first Sunday of the year is the first day of week \noncxxtcode{01}. +Days of the same year prior to that are in week \noncxxtcode{00}. +The modified command \noncxxtcode{\%\placeholder{N}U} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, the default is 2. +If \noncxxtcode{\placeholder{N}} is not specified, the default is 2. Leading zeroes are permitted but not required. -The modified command \tcode{\%OU} interprets +The modified command \noncxxtcode{\%OU} interprets the locale's alternative representation. \\ \rowsep -\tcode{\%V} & +\noncxxtcode{\%V} & The calendar week of year as a decimal number, as specified in ISO 8601-1:2019 for the week calendar. -The modified command \tcode{\%\placeholder{N}V} specifies +The modified command \noncxxtcode{\%\placeholder{N}V} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, the default is 2. +If \noncxxtcode{\placeholder{N}} is not specified, the default is 2. Leading zeroes are permitted but not required. \\ \rowsep -\tcode{\%w} & -The weekday as a decimal number (\tcode{0}-\tcode{6}), where Sunday is \tcode{0}. -The modified command \tcode{\%\placeholder{N}w} specifies +\noncxxtcode{\%w} & +The weekday as a decimal number (\noncxxtcode{0}-\noncxxtcode{6}), where Sunday is \noncxxtcode{0}. +The modified command \noncxxtcode{\%\placeholder{N}w} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, the default is \tcode{1}. +If \noncxxtcode{\placeholder{N}} is not specified, the default is \noncxxtcode{1}. Leading zeroes are permitted but not required. -The modified command \tcode{\%Ow} interprets +The modified command \noncxxtcode{\%Ow} interprets the locale's alternative representation. \\ \rowsep -\tcode{\%W} & +\noncxxtcode{\%W} & The week number of the year as a decimal number. -The first Monday of the year is the first day of week \tcode{01}. -Days of the same year prior to that are in week \tcode{00}. -The modified command \tcode{\%\placeholder{N}W} specifies +The first Monday of the year is the first day of week \noncxxtcode{01}. +Days of the same year prior to that are in week \noncxxtcode{00}. +The modified command \noncxxtcode{\%\placeholder{N}W} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, the default is 2. +If \noncxxtcode{\placeholder{N}} is not specified, the default is 2. Leading zeroes are permitted but not required. -The modified command \tcode{\%OW} interprets +The modified command \noncxxtcode{\%OW} interprets the locale's alternative representation. \\ \rowsep -\tcode{\%x} & +\noncxxtcode{\%x} & The locale's date representation. -The modified command \tcode{\%Ex} interprets the locale's alternate date representation. +The modified command \noncxxtcode{\%Ex} interprets the locale's alternate date representation. \\ \rowsep -\tcode{\%X} & +\noncxxtcode{\%X} & The locale's time representation. -The modified command \tcode{\%EX} interprets the locale's alternate time representation. +The modified command \noncxxtcode{\%EX} interprets the locale's alternate time representation. \\ \rowsep -\tcode{\%y} & +\noncxxtcode{\%y} & The last two decimal digits of the year. If the century is not otherwise specified -(e.g., with \tcode{\%C}), +(e.g., with \noncxxtcode{\%C}), values in the range \crange{69}{99} are presumed to refer to the years 1969 to 1999, and values in the range \crange{00}{68} are presumed to refer to the years 2000 to 2068. -The modified command \tcode{\%\placeholder{N}y} specifies +The modified command \noncxxtcode{\%\placeholder{N}y} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, the default is 2. +If \noncxxtcode{\placeholder{N}} is not specified, the default is 2. Leading zeroes are permitted but not required. -The modified commands \tcode{\%Ey} and \tcode{\%Oy} interpret +The modified commands \noncxxtcode{\%Ey} and \noncxxtcode{\%Oy} interpret the locale's alternative representation. \\ \rowsep -\tcode{\%Y} & +\noncxxtcode{\%Y} & The year as a decimal number. -The modified command \tcode{\%\placeholder{N}Y} specifies +The modified command \noncxxtcode{\%\placeholder{N}Y} specifies the maximum number of characters to read. -If \tcode{\placeholder{N}} is not specified, the default is 4. +If \noncxxtcode{\placeholder{N}} is not specified, the default is 4. Leading zeroes are permitted but not required. -The modified command \tcode{\%EY} interprets +The modified command \noncxxtcode{\%EY} interprets the locale's alternative representation. \\ \rowsep -\tcode{\%z} & -The offset from UTC in the format \tcode{[+|-]hh[mm]}. -For example \tcode{-0430} refers to 4 hours 30 minutes behind UTC, -and \tcode{04} refers to 4 hours ahead of UTC\@. -The modified commands \tcode{\%Ez} and \tcode{\%Oz} -parse a \tcode{:} between the hours and minutes +\noncxxtcode{\%z} & +The offset from UTC in the format \noncxxtcode{[+|-]hh[mm]}. +For example \noncxxtcode{-0430} refers to 4 hours 30 minutes behind UTC, +and \noncxxtcode{04} refers to 4 hours ahead of UTC\@. +The modified commands \noncxxtcode{\%Ez} and \noncxxtcode{\%Oz} +parse a \noncxxtcode{:} between the hours and minutes and render leading zeroes on the hour field optional: -\tcode{[+|-]h[h][:mm]}. -For example \tcode{-04:30} refers to 4 hours 30 minutes behind UTC, -and \tcode{4} refers to 4 hours ahead of UTC. +\noncxxtcode{[+|-]h[h][:mm]}. +For example \noncxxtcode{-04:30} refers to 4 hours 30 minutes behind UTC, +and \noncxxtcode{4} refers to 4 hours ahead of UTC. \\ \rowsep -\tcode{\%Z} & +\noncxxtcode{\%Z} & The time zone abbreviation or name. A single word is parsed. This word can only contain characters @@ -11498,8 +11479,8 @@ that are alphanumeric, or one of \tcode{'_'}, \tcode{'/'}, \tcode{'-'}, or \tcode{'+'}. \\ \rowsep -\tcode{\%\%} & -A \tcode{\%} character is extracted. +\noncxxtcode{\%\%} & +A \noncxxtcode{\%} character is extracted. \\ \end{LongTable} @@ -11570,7 +11551,7 @@ The specializations are enabled\iref{unord.hash}. \begin{note} All the \tcode{hash} specializations listed above meet the -\oldconcept{Hash} requirements, even when called on objects \tcode{k} +\oldconceptref{Hash} requirements, even when called on objects \tcode{k} of type \tcode{Key} such that \tcode{k.ok()} is \tcode{false}. \end{note} \end{itemdescr} diff --git a/source/uax31.tex b/source/uax31.tex index ee0bb9c2a1..320ed00a1f 100644 --- a/source/uax31.tex +++ b/source/uax31.tex @@ -23,22 +23,22 @@ \UAX{31} specifies a default syntax for identifiers based on properties from the Unicode Character Database, \UAX{44}. The general syntax is -\begin{codeblock} +\begin{outputblock} := * ( +)* -\end{codeblock} +\end{outputblock} where \tcode{} has the XID_Start property, \tcode{} has the XID_Continue property, and \tcode{} is a list of characters permitted between continue characters. For \Cpp{} we add the character \unicode{005f}{low line}, or \tcode{_}, to the set of permitted \tcode{} characters, -the \tcode{} set is empty, and -the \tcode{} characters are unmodified. +the \noncxxtcode{} set is empty, and +the \noncxxtcode{} characters are unmodified. In the grammar used in \UAX{31}, this is -\begin{codeblock} +\begin{outputblock} := * := XID_Start + @\textrm{\ucode{005f}}@ := + XID_Continue -\end{codeblock} +\end{outputblock} \pnum This is described in the \Cpp{} grammar in \ref{lex.name}, diff --git a/source/utilities.tex b/source/utilities.tex index 7f1cbeffad..9402c2ac1d 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -103,15 +103,15 @@ template struct integer_sequence; template - using index_sequence = integer_sequence; + using @\libglobal{index_sequence}@ = integer_sequence; template using make_integer_sequence = integer_sequence; template - using make_index_sequence = make_integer_sequence; + using @\libglobal{make_index_sequence}@ = make_integer_sequence; template - using index_sequence_for = make_index_sequence; + using @\libglobal{index_sequence_for}@ = make_index_sequence; // \ref{pairs}, class template \tcode{pair} template @@ -242,9 +242,9 @@ Type \tcode{T} meets the -\oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) +\oldconceptref{MoveConstructible} (\tref{cpp17.moveconstructible}) and -\oldconcept{MoveAssignable} (\tref{cpp17.moveassignable}) +\oldconceptref{MoveAssignable} (\tref{cpp17.moveassignable}) requirements. \pnum @@ -254,7 +254,6 @@ \pnum \remarks The exception specification is equivalent to: - \begin{codeblock} is_nothrow_move_constructible_v && is_nothrow_move_assignable_v \end{codeblock} @@ -317,7 +316,7 @@ \indextext{signal-safe!\idxcode{forward}}% \indextext{signal-safe!\idxcode{move}}% \indextext{signal-safe!\idxcode{move_if_noexcept}}% -All functions specified in this subclause are signal-safe\iref{support.signal}. +All functions specified in this subclause are \deflinkx{signal-safe}{evaluation!signal-safe}{support.signal}. \indexlibraryglobal{forward}% \indextext{\idxcode{forward}}% @@ -492,7 +491,7 @@ \pnum The library provides the function template \tcode{declval} to simplify the definition of -expressions which occur as unevaluated operands\iref{term.unevaluated.operand}. +expressions which occur as \deflinkx{unevaluated operands}{unevaluated operand}{expr.context}. \indexlibraryglobal{declval}% \begin{itemdecl} @@ -1472,7 +1471,7 @@ The \keyword{struct} \tcode{piecewise_construct_t} is an empty class type used as a unique type to disambiguate constructor and function overloading. Specifically, \tcode{pair} has a constructor with \tcode{piecewise_construct_t} as the -first argument, immediately followed by two \tcode{tuple}\iref{tuple} arguments used +first argument, immediately followed by two \link{\tcode{tuple}}{tuple} arguments used for piecewise construction of the elements of the \tcode{pair} object. \rSec1[tuple]{Tuples} @@ -2035,7 +2034,7 @@ \item \tcode{(is_constructible_v(std::forward(u)))> \&\& ...)} -is\linebreak{} % Overfull +is \tcode{true}, and \item @@ -2112,12 +2111,12 @@ \pnum \expects \tcode{Alloc} meets -the \oldconcept{Allocator} requirements\iref{allocator.requirements.general}. +the \oldconceptref{Allocator} requirements\iref{allocator.requirements.general}. \pnum \effects Equivalent to the preceding constructors except that each element is constructed with -uses-allocator construction\iref{allocator.uses.construction}. +\deflink{uses-allocator construction}{allocator.uses.construction}. \end{itemdescr} \rSec3[tuple.assign]{Assignment} @@ -2193,7 +2192,6 @@ \remarks The exception specification is equivalent to the logical \logop{and} of the following expressions: - \begin{codeblock} is_nothrow_move_assignable_v<@$\mathtt{T}_i$@> \end{codeblock} @@ -2743,7 +2741,7 @@ \pnum Except where specified otherwise, all specializations of \tcode{tuple_size} meet the -\oldconcept{UnaryTypeTrait} requirements\iref{meta.rqmts} with a +\oldconceptref{UnaryTypeTrait} requirements\iref{meta.rqmts} with a base characteristic of \tcode{integral_constant} for some \tcode{N}. \end{itemdescr} @@ -2783,8 +2781,8 @@ \pnum Let \tcode{TS} denote \tcode{tuple_size} of the cv-unqualified type \tcode{T}. If the expression \tcode{TS::value} is well-formed -when treated as an unevaluated operand\iref{term.unevaluated.operand}, then -each specialization of the template meets the \oldconcept{Unary\-Type\-Trait} requirements\iref{meta.rqmts} +when treated as an \deflink{unevaluated operand}{expr.context}, then +each specialization of the template meets the \oldconceptref{UnaryTypeTrait} requirements\iref{meta.rqmts} with a base characteristic of \begin{codeblock} integral_constant @@ -2821,7 +2819,7 @@ \begin{itemdescr} \pnum Let \tcode{TE} denote \tcode{tuple_element_t} of the cv-unqualified type \tcode{T}. Then -each specialization of the template meets the \oldconcept{TransformationTrait} requirements\iref{meta.rqmts} +each specialization of the template meets the \oldconceptref{TransformationTrait} requirements\iref{meta.rqmts} with a member typedef \tcode{type} that names the type \tcode{add_const_t}. \pnum @@ -3057,7 +3055,7 @@ denotes a type. \end{itemize} The member \grammarterm{typedef-name} \tcode{type} denotes the type -\tcode{tuple, \linebreak{}UQual>...>}. +\tcode{tuple, UQual>...>}. \end{itemdescr} \indexlibrarymember{common_type}{tuple}% @@ -3100,7 +3098,7 @@ \pnum \expects \tcode{Alloc} meets -the \oldconcept{Allocator} requirements\iref{allocator.requirements.general}. +the \oldconceptref{Allocator} requirements\iref{allocator.requirements.general}. \pnum \begin{note} @@ -3139,7 +3137,6 @@ \pnum \remarks The exception specification is equivalent to: - \begin{codeblock} noexcept(x.swap(y)) \end{codeblock} @@ -3355,7 +3352,7 @@ \pnum \tcode{T} shall be a type other than \cv{} \tcode{in_place_t} or \cv{} \tcode{nullopt_t} -that meets the \oldconcept{Destructible} requirements (\tref{cpp17.destructible}). +that meets the \oldconceptref{Destructible} requirements (\tref{cpp17.destructible}). \rSec3[optional.ctor]{Constructors} @@ -3975,7 +3972,7 @@ \pnum \expects -\tcode{T} meets the \oldconcept{Swappable} requirements\iref{swappable.requirements}. +\tcode{T} meets the \oldconceptref{Swappable} requirements\iref{swappable.requirements}. \pnum \effects @@ -4032,7 +4029,7 @@ \pnum These types model \libconcept{contiguous_iterator}\iref{iterator.concept.contiguous}, -meet the \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators}, and +meet the \oldconceptref{RandomAccessIterator} requirements\iref{random.access.iterators}, and meet the requirements for constexpr iterators\iref{iterator.requirements.general}, with value type \tcode{remove_cv_t}. The reference type is \tcode{T\&} for \tcode{iterator} and @@ -4040,7 +4037,7 @@ \pnum All requirements on container iterators\iref{container.reqmts} apply to -\tcode{optional::iterator} and \tcode{optional::\linebreak{}const_iterator} as well. +\tcode{optional::iterator} and \tcode{optional::const_iterator} as well. \pnum Any operation that initializes or destroys the contained value of an optional object invalidates all iterators into that object. @@ -4472,7 +4469,7 @@ The expression \tcode{*x == *y} is well-formed and its result is convertible to \tcode{bool}. \begin{note} -\tcode{T} need not be \oldconcept{EqualityComparable}. +\tcode{T} need not be \oldconceptref{EqualityComparable}. \end{note} \pnum @@ -4662,7 +4659,7 @@ The expression \tcode{*x == v} is well-formed and its result is convertible to \tcode{bool}. \begin{note} -\tcode{T} need not be \oldconcept{EqualityComparable}. +\tcode{T} need not be \oldconceptref{EqualityComparable}. \end{note} \pnum @@ -5139,7 +5136,7 @@ \pnum All types in \tcode{Types} shall meet -the \oldconcept{Destructible} requirements (\tref{cpp17.destructible}). +the \oldconceptref{Destructible} requirements (\tref{cpp17.destructible}). \pnum A program that instantiates the definition of \tcode{variant} with @@ -5819,7 +5816,7 @@ \pnum \expects -Each $\tcode{T}_i$ meets the \oldconcept{Swappable} requirements\iref{swappable.requirements}. +Each $\tcode{T}_i$ meets the \oldconceptref{Swappable} requirements\iref{swappable.requirements}. \pnum \effects @@ -5864,7 +5861,7 @@ \begin{itemdescr} \pnum All specializations of \tcode{variant_size} meet the -\oldconcept{UnaryTypeTrait} requirements\iref{meta.rqmts} +\oldconceptref{UnaryTypeTrait} requirements\iref{meta.rqmts} with a base characteristic of \tcode{integral_constant} for some \tcode{N}. \end{itemdescr} @@ -5877,7 +5874,7 @@ \pnum Let \tcode{VS} denote \tcode{variant_size} of the cv-unqualified type \tcode{T}. Then each specialization of the template meets the -\oldconcept{UnaryTypeTrait} requirements\iref{meta.rqmts} with a +\oldconceptref{UnaryTypeTrait} requirements\iref{meta.rqmts} with a base characteristic of \tcode{integral_constant}. \end{itemdescr} @@ -5897,7 +5894,7 @@ \pnum Let \tcode{VA} denote \tcode{variant_alternative} of the cv-unqualified type \tcode{T}. Then each specialization of the template -meets the \oldconcept{TransformationTrait} requirements\iref{meta.rqmts} with a +meets the \oldconceptref{TransformationTrait} requirements\iref{meta.rqmts} with a member typedef \tcode{type} that names the type \tcode{add_const_t}. \end{itemdescr} @@ -6315,6 +6312,7 @@ \rSec2[variant.monostate]{Class \tcode{monostate}}% \indexlibraryglobal{monostate}% +\indexlibrary{\idxcode{monostate}}% \begin{itemdecl} struct monostate{}; \end{itemdecl} @@ -6481,7 +6479,8 @@ \end{codeblock} \pnum -Objects of type \tcode{bad_any_cast} are thrown by a failed \tcode{any_cast}\iref{any.nonmembers}. +Objects of type \tcode{bad_any_cast} are thrown by a failed +\libglobalref{any_cast}. \indexlibrarymember{what}{bad_any_cast}% \begin{itemdecl} @@ -6621,7 +6620,7 @@ \pnum \expects -\tcode{VT} meets the \oldconcept{CopyConstructible} requirements. +\tcode{VT} meets the \oldconceptref{CopyConstructible} requirements. \pnum \effects @@ -6649,7 +6648,7 @@ \pnum \expects -\tcode{VT} meets the \oldconcept{CopyConstructible} requirements. +\tcode{VT} meets the \oldconceptref{CopyConstructible} requirements. \pnum \effects @@ -6682,7 +6681,7 @@ \pnum \expects -\tcode{VT} meets the \oldconcept{CopyConstructible} requirements. +\tcode{VT} meets the \oldconceptref{CopyConstructible} requirements. \pnum \effects @@ -6767,7 +6766,7 @@ \pnum \expects -\tcode{VT} meets the \oldconcept{CopyConstructible} requirements. +\tcode{VT} meets the \oldconceptref{CopyConstructible} requirements. \pnum \effects @@ -6802,13 +6801,13 @@ \pnum \expects -\tcode{VT} meets the \oldconcept{CopyConstructible} requirements. +\tcode{VT} meets the \oldconceptref{CopyConstructible} requirements. \pnum \effects Calls \tcode{reset()}. Then direct-non-list-initializes the contained value of type \tcode{VT} -with \tcode{std::for\-ward(args)...}. +with \tcode{std::forward(args)...}. \pnum \ensures @@ -6846,7 +6845,7 @@ \pnum \expects -\tcode{VT} meets the \oldconcept{CopyConstructible} requirements. +\tcode{VT} meets the \oldconceptref{CopyConstructible} requirements. \pnum \effects @@ -7550,9 +7549,9 @@ \pnum When \tcode{T} is not \cv{} \tcode{void}, it shall meet -the \oldconcept{Destructible} requirements (\tref{cpp17.destructible}). +the \oldconceptref{Destructible} requirements (\tref{cpp17.destructible}). \tcode{E} shall meet -the \oldconcept{Destructible} requirements. +the \oldconceptref{Destructible} requirements. \rSec3[expected.object.cons]{Constructors} @@ -8376,7 +8375,7 @@ \pnum \mandates \tcode{is_copy_constructible_v} is \tcode{true} and -\tcode{is_constructible_v} is \tcode{true}. +\tcode{is_constructible_v} is \tcode{true}. \pnum \returns @@ -8789,7 +8788,7 @@ The expression \tcode{*x == v} is well-formed and its result is convertible to \tcode{bool}. \begin{note} -\tcode{T} need not be \oldconcept{EqualityComparable}. +\tcode{T} need not be \oldconceptref{EqualityComparable}. \end{note} \pnum @@ -8927,7 +8926,7 @@ \pnum \tcode{E} shall meet the requirements of -\oldconcept{Destructible} (\tref{cpp17.destructible}). +\oldconceptref{Destructible} (\tref{cpp17.destructible}). \rSec3[expected.void.cons]{Constructors} @@ -9685,7 +9684,7 @@ If \tcode{has_value()} is \tcode{true}, \tcode{expected()}; otherwise, an \tcode{expected} object whose \exposid{has_val} member is \tcode{false} and \exposid{unex} member is direct-non-list-initialized with -\tcode{invoke(std::for\-ward(f), error())}. +\tcode{invoke(std::forward(f), error())}. \end{itemdescr} \indexlibrarymember{transform_error}{expected}% @@ -9713,7 +9712,7 @@ If \tcode{has_value()} is \tcode{true}, \tcode{expected()}; otherwise, an \tcode{expected} object whose \exposid{has_val} member is \tcode{false} and \exposid{unex} member is direct-non-list-initialized with -\tcode{invoke(std::for\-ward(f), std::move(error()))}. +\tcode{invoke(std::forward(f), std::move(error()))}. \end{itemdescr} \rSec3[expected.void.eq]{Equality operators} @@ -10099,7 +10098,6 @@ Replaces each bit at position \tcode{I} in \tcode{*this} with a value determined as follows: - \begin{itemize} \item If \tcode{I < pos}, the new value is zero; @@ -10124,7 +10122,6 @@ Replaces each bit at position \tcode{I} in \tcode{*this} with a value determined as follows: - \begin{itemize} \item If \tcode{pos >= N - I}, the new value is zero; @@ -10852,7 +10849,6 @@ If a \Cpp{} program wants to have a by-element addition of two vectors \tcode{a} and \tcode{b} containing \tcode{double} and put the result into \tcode{a}, it can do: - \begin{codeblock} transform(a.begin(), a.end(), b.begin(), a.begin(), plus()); \end{codeblock} @@ -10959,8 +10955,8 @@ \indextext{call wrapper}% \indextext{call wrapper!simple}% \indextext{call wrapper!forwarding}% -Every call wrapper\iref{func.def} meets the \oldconcept{MoveConstructible} -and \oldconcept{Destructible} requirements. +Every call wrapper\iref{func.def} meets the \oldconceptref{MoveConstructible} +and \oldconceptref{Destructible} requirements. An \defn{argument forwarding call wrapper} is a call wrapper that can be called with an arbitrary argument list and delivers the arguments to the target object as references. @@ -11000,7 +10996,7 @@ \pnum \label{term.simple.call.wrapper}% A \defn{simple call wrapper} is a perfect forwarding call wrapper that meets -the \oldconcept{CopyConstructible} and \oldconcept{CopyAssignable} requirements +the \oldconceptref{CopyConstructible} and \oldconceptref{CopyAssignable} requirements and whose copy constructor, move constructor, and assignment operators are constexpr functions that do not throw exceptions. @@ -11103,7 +11099,7 @@ \end{codeblock} \pnum -\tcode{reference_wrapper} is a \oldconcept{CopyConstructible} and \oldconcept{CopyAssignable} wrapper +\tcode{reference_wrapper} is a \oldconceptref{CopyConstructible} and \oldconceptref{CopyAssignable} wrapper around a reference to an object or function of type \tcode{T}. \pnum @@ -12557,7 +12553,7 @@ \pnum \expects -\tcode{FD} meets the \oldconcept{MoveConstructible} requirements. +\tcode{FD} meets the \oldconceptref{MoveConstructible} requirements. \pnum \returns @@ -12643,10 +12639,10 @@ \pnum \expects -\tcode{FD} meets the \oldconcept{MoveConstructible} requirements. +\tcode{FD} meets the \oldconceptref{MoveConstructible} requirements. For each $\tcode{T}_i$ in \tcode{BoundArgs}, if $\tcode{T}_i$ is an object type, -$\tcode{T}_i$ meets the \oldconcept{MoveConstructible} requirements. +$\tcode{T}_i$ meets the \oldconceptref{MoveConstructible} requirements. \pnum \returns @@ -12712,7 +12708,7 @@ \pnum \expects For each $\tcode{T}_i$ in \tcode{BoundArgs}, -$\tcode{T}_i$ meets the \oldconcept{MoveConstructible} requirements. +$\tcode{T}_i$ meets the \oldconceptref{MoveConstructible} requirements. \pnum \returns @@ -12757,7 +12753,7 @@ \pnum Specializations of the \tcode{is_bind_expression} template shall meet -the \oldconcept{UnaryTypeTrait} requirements\iref{meta.rqmts}. The implementation +the \oldconceptref{UnaryTypeTrait} requirements\iref{meta.rqmts}. The implementation provides a definition that has a base characteristic of \tcode{true_type} if \tcode{T} is a type returned from \tcode{bind}, otherwise it has a base characteristic of \tcode{false_type}. @@ -12793,7 +12789,7 @@ \pnum Specializations of the \tcode{is_placeholder} template shall meet -the \oldconcept{UnaryTypeTrait} requirements\iref{meta.rqmts}. The implementation +the \oldconceptref{UnaryTypeTrait} requirements\iref{meta.rqmts}. The implementation provides a definition that has the base characteristic of \tcode{integral_constant} if \tcode{T} is the type of \tcode{std::placeholders::_\placeholder{J}}, otherwise it has a @@ -12843,7 +12839,7 @@ \pnum \expects \tcode{FD} and each $\tcode{TD}_i$ meet -the \oldconcept{MoveConstructible} and \oldconcept{Destructible} requirements. +the \oldconceptref{MoveConstructible} and \oldconceptref{Destructible} requirements. \tcode{\placeholdernc{INVOKE}(fd, $\tcode{w}_1$, $\tcode{w}_2$, $\dotsc$, $\tcode{w}_N$)}\iref{func.require} is a valid expression for some values $\tcode{w}_1$, $\tcode{w}_2$, $\dotsc{}$, $\tcode{w}_N$, where @@ -12879,8 +12875,8 @@ \pnum \begin{note} If all of \tcode{FD} and $\tcode{TD}_i$ meet -the requirements of \oldconcept{CopyConstructible}, then -the return type meets the requirements of \oldconcept{CopyConstructible}. +the requirements of \oldconceptref{CopyConstructible}, then +the return type meets the requirements of \oldconceptref{CopyConstructible}. \end{note} \end{itemdescr} @@ -12951,13 +12947,13 @@ \impldef{number of placeholders for bind expressions}. \pnum -All placeholder types meet the \oldconcept{DefaultConstructible} and -\oldconcept{CopyConstructible} requirements, and +All placeholder types meet the \oldconceptref{DefaultConstructible} and +\oldconceptref{CopyConstructible} requirements, and their default constructors and copy/move constructors are constexpr functions that do not throw exceptions. It is \impldef{assignability of placeholder objects} whether -placeholder types meet the \oldconcept{CopyAssignable} requirements, +placeholder types meet the \oldconceptref{CopyAssignable} requirements, but if so, their copy assignment operators are constexpr functions that do not throw exceptions. @@ -13238,7 +13234,7 @@ \pnum \expects -\tcode{FD} meets the \oldconcept{CopyConstructible} requirements. +\tcode{FD} meets the \oldconceptref{CopyConstructible} requirements. \pnum \ensures @@ -13664,9 +13660,9 @@ \pnum \expects -\tcode{VT} meets the \oldconcept{Destructible} requirements, and +\tcode{VT} meets the \oldconceptref{Destructible} requirements, and if \tcode{is_move_constructible_v} is \tcode{true}, -\tcode{VT} meets the \oldconcept{MoveConstructible} requirements. +\tcode{VT} meets the \oldconceptref{MoveConstructible} requirements. \pnum \ensures @@ -13716,9 +13712,9 @@ \pnum \expects -\tcode{VT} meets the \oldconcept{Destructible} requirements, and +\tcode{VT} meets the \oldconceptref{Destructible} requirements, and if \tcode{is_move_constructible_v} is \tcode{true}, -\tcode{VT} meets the \oldconcept{MoveConstructible} requirements. +\tcode{VT} meets the \oldconceptref{MoveConstructible} requirements. \pnum \ensures @@ -13758,15 +13754,15 @@ \pnum \expects -\tcode{VT} meets the \oldconcept{Destructible} requirements, and +\tcode{VT} meets the \oldconceptref{Destructible} requirements, and if \tcode{is_move_constructible_v} is \tcode{true}, -\tcode{VT} meets the \oldconcept{MoveConstructible} requirements. +\tcode{VT} meets the \oldconceptref{MoveConstructible} requirements. \pnum \ensures \tcode{*this} has a target object of type \tcode{VT} direct-non-list-initialized with -\tcode{ilist, std::for\-ward(args)...}. +\tcode{ilist, std::forward(args)...}. \pnum \throws @@ -14082,8 +14078,8 @@ \pnum \expects -\tcode{VT} meets the \oldconcept{Destructible} and -\oldconcept{CopyConstructible} requirements. +\tcode{VT} meets the \oldconceptref{Destructible} and +\oldconceptref{CopyConstructible} requirements. \pnum \ensures @@ -14138,8 +14134,8 @@ \pnum \expects -\tcode{VT} meets the \oldconcept{Destructible} and -\oldconcept{CopyConstructible} requirements. +\tcode{VT} meets the \oldconceptref{Destructible} and +\oldconceptref{CopyConstructible} requirements. \pnum \ensures @@ -14184,14 +14180,14 @@ \pnum \expects -\tcode{VT} meets the \oldconcept{Destructible} and -\oldconcept{CopyConstructible} requirements. +\tcode{VT} meets the \oldconceptref{Destructible} and +\oldconceptref{CopyConstructible} requirements. \pnum \ensures \tcode{*this} has a target object of type \tcode{VT} direct-non-list-initialized with -\tcode{ilist, std::for\-ward(args)...}. +\tcode{ilist, std::forward(args)...}. \pnum \throws @@ -14347,7 +14343,6 @@ The header provides partial specializations of \tcode{function_ref} for each combination of the possible replacements of the placeholders \cv{} and \placeholder{noex} where: - \begin{itemize} \item \cv{} is either const or empty, and \item \placeholder{noex} is either \tcode{true} or \tcode{false}. @@ -14413,7 +14408,7 @@ \pnum Within \ref{func.wrap.ref}, \tcode{\placeholder{call-args}} is an argument pack with elements such that -\tcode{decltype((\placeholder{call-args}\linebreak{}))...} denote +\tcode{decltype((\placeholder{call-args}))...} denote \tcode{Args\&\&...} respectively. \rSec4[func.wrap.ref.ctor]{Constructors and assignment operators} @@ -14701,7 +14696,7 @@ \pnum Each specialization of a class template specified in \ref{func.search} -shall meet the \oldconcept{CopyConst\-ruct\-ible} and \oldconcept{CopyAssignable} requirements. +shall meet the \oldconceptref{CopyConstructible} and \oldconceptref{CopyAssignable} requirements. Template parameters named \begin{itemize} \item \tcode{ForwardIterator}, @@ -14715,7 +14710,7 @@ of templates specified in \ref{func.search} shall meet the same requirements and semantics as specified in \ref{algorithms.general}. -Template parameters named \tcode{Hash} shall meet the \oldconcept{Hash} +Template parameters named \tcode{Hash} shall meet the \oldconceptref{Hash} requirements (\tref{cpp17.hash}). \pnum @@ -14824,9 +14819,9 @@ \pnum \expects The value type of \tcode{RandomAccessIterator1} meets -the \oldconcept{DefaultConstructible}, -\oldconcept{CopyConstructible}, and -\oldconcept{CopyAssignable} requirements. +the \oldconceptref{DefaultConstructible}, +\oldconceptref{CopyConstructible}, and +\oldconceptref{CopyAssignable} requirements. \pnum Let \tcode{V} be \tcode{iterator_traits::val\-ue_type}. @@ -14925,8 +14920,8 @@ \begin{itemdescr} \pnum \expects -The value type of \tcode{RandomAccessIterator1} meets the \oldconcept{DefaultConstructible}, -\oldconcept{Copy\-Constructible}, and \oldconcept{CopyAssignable} requirements. +The value type of \tcode{RandomAccessIterator1} meets the \oldconceptref{DefaultConstructible}, +\oldconceptref{CopyConstructible}, and \oldconceptref{CopyAssignable} requirements. \pnum Let \tcode{V} be \tcode{iterator_traits::val\-ue_type}. @@ -14999,7 +14994,7 @@ Each specialization of \tcode{hash} is either enabled or disabled, as described below. \begin{note} -Enabled specializations meet the \oldconcept{Hash} requirements, and +Enabled specializations meet the \oldconceptref{Hash} requirements, and disabled specializations do not. \end{note} Each header that declares the template \tcode{hash} @@ -15026,17 +15021,17 @@ are not function object types\iref{function.objects}. \begin{note} This means that the specialization of \tcode{hash} exists, but -any attempts to use it as a \oldconcept{Hash} will be ill-formed. +any attempts to use it as a \oldconceptref{Hash} will be ill-formed. \end{note} \pnum An enabled specialization \tcode{hash} will: \begin{itemize} -\item meet the \oldconcept{Hash} requirements (\tref{cpp17.hash}), +\item meet the \oldconceptref{Hash} requirements (\tref{cpp17.hash}), with \tcode{Key} as the function -call argument type, the \oldconcept{Default\-Constructible} requirements (\tref{cpp17.defaultconstructible}), -the \oldconcept{CopyAssignable} requirements (\tref{cpp17.copyassignable}), -the \oldconcept{Swappable} requirements\iref{swappable.requirements}, +call argument type, the \oldconceptref{DefaultConstructible} requirements (\tref{cpp17.defaultconstructible}), +the \oldconceptref{CopyAssignable} requirements (\tref{cpp17.copyassignable}), +the \oldconceptref{Swappable} requirements\iref{swappable.requirements}, \item meet the requirement that if \tcode{k1 == k2} is \tcode{true}, \tcode{h(k1) == h(k2)} is also \tcode{true}, where \tcode{h} is an object of type \tcode{hash} and \tcode{k1} and \tcode{k2} are objects of type \tcode{Key};