From 36f27f4cfef10c559abcfc4cc15533dea19d44e9 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Wed, 27 May 2026 22:17:43 +0800 Subject: [PATCH] [numarray] Move [valarray.range] to suitable place and level For the sake of consistency with the synopsis of `valarray` (after the modifications from P3016R6), [valarray.cassign] should be placed between [valarray.cassign] and [valarray.members]. Moreover, it should be in level `\rSec3` now. --- source/numerics.tex | 92 ++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index ae6be4760a..621dd20dd1 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -7930,6 +7930,52 @@ invalidate references or pointers to the elements of the array. \end{itemdescr} +\rSec3[valarray.range]{Range access} + +\pnum +The \tcode{iterator} type +is a type that meets the requirements of a mutable +\oldconcept{RandomAccessIterator}\iref{random.access.iterators} +and models \libconcept{contiguous_iterator}\iref{iterator.concept.contiguous}. +Its \tcode{value_type} is the template +parameter \tcode{T} and its \tcode{reference} type is \tcode{T\&}. +The \tcode{const_iterator} type meets the requirements of a constant +\oldconcept{RandomAccessIterator} +and models \libconcept{contiguous_iterator}. +Its \tcode{value_type} is the template +parameter \tcode{T} and its \tcode{reference} type is \tcode{const T\&}. + +\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 +array or until the lifetime of that array ends, whichever happens +first. + +\indexlibrarymember{begin}{valarray}% +\begin{itemdecl} +iterator begin(); +const_iterator begin() const; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\returns +An iterator referencing the first value in the array. +\end{itemdescr} + +\indexlibrarymember{end}{valarray}% +\begin{itemdecl} +iterator end(); +const_iterator end() const; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\returns +An iterator referencing one past the last value in the array. +\end{itemdescr} + \rSec3[valarray.members]{Member functions} \indexlibrarymember{swap}{valarray}% @@ -9155,52 +9201,6 @@ object refers. \end{itemdescr} -\rSec2[valarray.range]{Range access} - -\pnum -The \tcode{iterator} type -is a type that meets the requirements of a mutable -\oldconcept{RandomAccessIterator}\iref{random.access.iterators} -and models \libconcept{contiguous_iterator}\iref{iterator.concept.contiguous}. -Its \tcode{value_type} is the template -parameter \tcode{T} and its \tcode{reference} type is \tcode{T\&}. -The \tcode{const_iterator} type meets the requirements of a constant -\oldconcept{RandomAccessIterator} -and models \libconcept{contiguous_iterator}. -Its \tcode{value_type} is the template -parameter \tcode{T} and its \tcode{reference} type is \tcode{const T\&}. - -\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 -array or until the lifetime of that array ends, whichever happens -first. - -\indexlibrarymember{begin}{valarray}% -\begin{itemdecl} -iterator begin(); -const_iterator begin() const; -\end{itemdecl} - -\begin{itemdescr} -\pnum -\returns -An iterator referencing the first value in the array. -\end{itemdescr} - -\indexlibrarymember{end}{valarray}% -\begin{itemdecl} -iterator end(); -const_iterator end() const; -\end{itemdecl} - -\begin{itemdescr} -\pnum -\returns -An iterator referencing one past the last value in the array. -\end{itemdescr} - \rSec1[c.math]{Mathematical functions for floating-point types} \rSec2[cmath.syn]{Header \tcode{} synopsis}