diff --git a/source/algorithms.tex b/source/algorithms.tex index 0e214877e3..6efb5503fe 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -3939,17 +3939,24 @@ \pnum \complexity -If the types of \tcode{first1}, \tcode{last1}, \tcode{first2}, and \tcode{last2}: +If \begin{itemize} \item + the types of \tcode{first1}, \tcode{last1}, \tcode{first2}, and \tcode{last2} meet the \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} + and \tcode{last1 - first1 != last2 - first2} for the overloads in namespace \tcode{std}; \item - pairwise model \libconcept{sized_sentinel_for}\iref{iterator.concept.sizedsentinel} - for the overloads in namespace \tcode{ranges}, + the types of \tcode{first1}, \tcode{last1}, \tcode{first2}, and \tcode{last2} + pairwise model \libconcept{sized_sentinel_for}\iref{iterator.concept.sizedsentinel} + and \tcode{last1 - first1 != last2 - first2} + for the first overload in namespace \tcode{ranges}, +\item + \tcode{R1} and \tcode{R2} each model \libconcept{sized_range} and + \tcode{ranges::distance(r1) != ranges::distance(r2)} + for the second overload in namespace \tcode{ranges}, \end{itemize} -and \tcode{last1 - first1 != last2 - first2}, then no applications of the corresponding predicate and each projection; otherwise, \begin{itemize} @@ -4054,9 +4061,17 @@ \complexity No applications of the corresponding predicate and projections if: \begin{itemize} +\item +for the first overload, +\begin{itemize} \item \tcode{S1} and \tcode{I1} model \tcode{\libconcept{sized_sentinel_for}}, \item \tcode{S2} and \tcode{I2} model \tcode{\libconcept{sized_sentinel_for}}, and -\item \tcode{last1 - first1 != last2 - first2}. +\item \tcode{last1 - first1 != last2 - first2}; +\end{itemize} +\item +for the second overload, +\tcode{R1} and \tcode{R2} each model \libconcept{sized_range}, and +\tcode{ranges::distance(r1) != ranges::distance(r2)}. \end{itemize} Otherwise, exactly \tcode{last1 - first1} applications of the corresponding predicate and projections diff --git a/source/compatibility.tex b/source/compatibility.tex index 80b7776a5d..d4472f8f5d 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -1773,6 +1773,16 @@ binary representation of the required template specializations of \tcode{std::complex} may not be compatible with this revision of \Cpp{}. +\rSec2[diff.cpp03.locale]{\ref{localization}: localization library} + +\diffref{facet.num.get.virtuals} +\change +The \tcode{num_get} facet recognizes hexadecimal floating point values. +\rationale +Required by new feature. +\effect +Valid \CppIII{} code may have different behavior in this revision of \Cpp{}. + \rSec2[diff.cpp03.input.output]{\ref{input.output}: input/output library} \diffref{istream.sentry,ostream.sentry,iostate.flags} diff --git a/source/concepts.tex b/source/concepts.tex index 5e54b6205c..1359fb4608 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -346,8 +346,8 @@ template concept @\deflibconcept{convertible_to}@ = is_convertible_v && - requires(add_rvalue_reference_t (&f)()) { - static_cast(f()); + requires { + static_cast(declval()); }; \end{itemdecl} diff --git a/source/iostreams.tex b/source/iostreams.tex index 07c873dfca..46b3ebbc4a 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -6892,7 +6892,10 @@ Then, if \tcode{os.rdbuf()} is a \tcode{basic_syncbuf*}, called \tcode{buf} for the purpose of exposition, -calls \tcode{buf->emit()}. +behaves as an unformatted output function\iref{ostream.unformatted} +of \tcode{os}. +After constructing a \tcode{sentry} object, calls \tcode{buf->emit()}. +If that call returns \tcode{false}, calls \tcode{os.setstate(ios_base::badbit)}. \pnum \returns @@ -11913,7 +11916,7 @@ \indexlibrarymember{operator=}{basic_syncbuf}% \begin{itemdecl} -basic_syncbuf& operator=(basic_syncbuf&& rhs) noexcept; +basic_syncbuf& operator=(basic_syncbuf&& rhs); \end{itemdecl} \begin{itemdescr} @@ -11951,7 +11954,7 @@ \indexlibrarymember{swap}{basic_syncbuf}% \begin{itemdecl} -void swap(basic_syncbuf& other) noexcept; +void swap(basic_syncbuf& other); \end{itemdecl} \begin{itemdescr} @@ -12079,7 +12082,7 @@ \begin{itemdecl} template void swap(basic_syncbuf& a, - basic_syncbuf& b) noexcept; + basic_syncbuf& b); \end{itemdecl} \begin{itemdescr} @@ -12215,7 +12218,8 @@ \begin{itemdescr} \pnum \effects -Calls \tcode{sb.emit()}. +Behaves as an unformatted output function\iref{ostream.unformatted}. +After constructing a sentry object, calls \tcode{sb.emit()}. If that call returns \tcode{false}, calls \tcode{setstate(ios_base::badbit)}. @@ -12468,14 +12472,14 @@ // \ref{fs.dir.itr.nonmembers}, range access for directory iterators directory_iterator begin(directory_iterator iter) noexcept; - directory_iterator end(const directory_iterator&) noexcept; + directory_iterator end(directory_iterator) noexcept; // \ref{fs.class.rec.dir.itr}, recursive directory iterators class recursive_directory_iterator; // \ref{fs.rec.dir.itr.nonmembers}, range access for recursive directory iterators recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept; - recursive_directory_iterator end(const recursive_directory_iterator&) noexcept; + recursive_directory_iterator end(recursive_directory_iterator) noexcept; // \ref{fs.class.file.status}, file status class file_status; @@ -12645,6 +12649,18 @@ path weakly_canonical(const path& p); path weakly_canonical(const path& p, error_code& ec); } + +namespace std::ranges { + template<> + inline constexpr bool enable_borrowed_range = true; + template<> + inline constexpr bool enable_borrowed_range = true; + + template<> + inline constexpr bool enable_view = true; + template<> + inline constexpr bool enable_view = true; +} \end{codeblock} \pnum @@ -15774,7 +15790,7 @@ \indexlibrarymember{end}{directory_iterator}% \begin{itemdecl} -directory_iterator end(const directory_iterator&) noexcept; +directory_iterator end(directory_iterator) noexcept; \end{itemdecl} \begin{itemdescr} @@ -16145,7 +16161,7 @@ \indexlibrarymember{end}{recursive_directory_iterator}% \begin{itemdecl} -recursive_directory_iterator end(const recursive_directory_iterator&) noexcept; +recursive_directory_iterator end(recursive_directory_iterator) noexcept; \end{itemdecl} \begin{itemdescr} diff --git a/source/iterators.tex b/source/iterators.tex index 13690873f9..8b3bc34ee2 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -243,7 +243,10 @@ // \ref{range.iter.op.distance}, \tcode{ranges::distance} template<@\libconcept{input_or_output_iterator}@ I, @\libconcept{sentinel_for}@ S> + requires (!@\libconcept{sized_sentinel_for}@) constexpr iter_difference_t distance(I first, S last); + template<@\libconcept{input_or_output_iterator}@ I, @\libconcept{sized_sentinel_for}@ S> + constexpr iter_difference_t distance(const I& first, const S& last); template<@\libconcept{range}@ R> constexpr range_difference_t distance(R&& r); @@ -2935,24 +2938,31 @@ \indexlibraryglobal{distance}% \begin{itemdecl} template<@\libconcept{input_or_output_iterator}@ I, @\libconcept{sentinel_for}@ S> + requires (!@\libconcept{sized_sentinel_for}@) constexpr iter_difference_t ranges::distance(I first, S last); \end{itemdecl} \begin{itemdescr} \pnum \expects -\range{first}{last} denotes a range, or -\range{last}{first} denotes a range and -\tcode{S} and \tcode{I} model -\tcode{\libconcept{same_as} \&\& \libconcept{sized_sentinel_for}}. +\range{first}{last} denotes a range. \pnum \effects -If \tcode{S} and \tcode{I} model \tcode{\libconcept{sized_sentinel_for}}, -returns \tcode{(last - first)}; -otherwise, increments -\tcode{first} until \tcode{last} is reached and returns -the number of increments. +Increments \tcode{first} until \tcode{last} is reached and +returns the number of increments. +\end{itemdescr} + +\indexlibraryglobal{distance}% +\begin{itemdecl} +template<@\libconcept{input_or_output_iterator}@ I, @\libconcept{sized_sentinel_for}@ S> + constexpr iter_difference_t ranges::distance(const I& first, const S& last); +\end{itemdecl} + +\begin{itemdescr} +\pnum +\effects +Equivalent to: \tcode{return last - first;} \end{itemdescr} \indexlibraryglobal{distance}% @@ -4100,7 +4110,7 @@ template constexpr move_iterator(const move_iterator& u); template constexpr move_iterator& operator=(const move_iterator& u); - constexpr const iterator_type& base() const &; + constexpr const iterator_type& base() const & noexcept; constexpr iterator_type base() &&; constexpr reference operator*() const; @@ -4234,7 +4244,7 @@ \indexlibrarymember{base}{move_iterator}% \begin{itemdecl} -constexpr const Iterator& base() const &; +constexpr const Iterator& base() const & noexcept; \end{itemdecl} \begin{itemdescr} @@ -4532,7 +4542,7 @@ \begin{itemdescr} \pnum \constraints -\tcode{x + n} is well-formed and has type \tcode{Iterator}. +\tcode{x.base() + n} is well-formed and has type \tcode{Iterator}. \pnum \returns @@ -4736,36 +4746,36 @@ template requires @\libconcept{convertible_to}@ && @\libconcept{convertible_to}@ && @\libconcept{assignable_from}@ && @\libconcept{assignable_from}@ - common_iterator& operator=(const common_iterator& x); + constexpr common_iterator& operator=(const common_iterator& x); - decltype(auto) operator*(); - decltype(auto) operator*() const + constexpr decltype(auto) operator*(); + constexpr decltype(auto) operator*() const requires @\exposconcept{dereferenceable}@; - decltype(auto) operator->() const + constexpr decltype(auto) operator->() const requires @\seebelow@; - common_iterator& operator++(); - decltype(auto) operator++(int); + constexpr common_iterator& operator++(); + constexpr decltype(auto) operator++(int); template S2> requires @\libconcept{sentinel_for}@ - friend bool operator==( + friend constexpr bool operator==( const common_iterator& x, const common_iterator& y); template S2> requires @\libconcept{sentinel_for}@ && @\libconcept{equality_comparable_with}@ - friend bool operator==( + friend constexpr bool operator==( const common_iterator& x, const common_iterator& y); template<@\libconcept{sized_sentinel_for}@ I2, @\libconcept{sized_sentinel_for}@ S2> requires @\libconcept{sized_sentinel_for}@ - friend iter_difference_t operator-( + friend constexpr iter_difference_t operator-( const common_iterator& x, const common_iterator& y); - friend iter_rvalue_reference_t iter_move(const common_iterator& i) + friend constexpr iter_rvalue_reference_t iter_move(const common_iterator& i) noexcept(noexcept(ranges::iter_move(declval()))) requires @\libconcept{input_iterator}@; template<@\libconcept{indirectly_swappable}@ I2, class S2> - friend void iter_swap(const common_iterator& x, const common_iterator& y) + friend constexpr void iter_swap(const common_iterator& x, const common_iterator& y) noexcept(noexcept(ranges::iter_swap(declval(), declval()))); private: @@ -4864,7 +4874,7 @@ template requires @\libconcept{convertible_to}@ && @\libconcept{convertible_to}@ && @\libconcept{assignable_from}@ && @\libconcept{assignable_from}@ - common_iterator& operator=(const common_iterator& x); + constexpr common_iterator& operator=(const common_iterator& x); \end{itemdecl} \begin{itemdescr} @@ -4892,8 +4902,8 @@ \indexlibrarymember{operator*}{common_iterator}% \begin{itemdecl} -decltype(auto) operator*(); -decltype(auto) operator*() const +constexpr decltype(auto) operator*(); +constexpr decltype(auto) operator*() const requires @\exposconcept{dereferenceable}@; \end{itemdecl} @@ -4909,7 +4919,7 @@ \indexlibrarymember{operator->}{common_iterator}% \begin{itemdecl} -decltype(auto) operator->() const +constexpr decltype(auto) operator->() const requires @\seebelow@; \end{itemdecl} @@ -4949,10 +4959,10 @@ \begin{codeblock} class @\exposid{proxy}@ { iter_value_t keep_; - @\exposid{proxy}@(iter_reference_t&& x) + constexpr @\exposid{proxy}@(iter_reference_t&& x) : keep_(std::move(x)) {} public: - const iter_value_t* operator->() const { + constexpr const iter_value_t* operator->() const noexcept { return addressof(keep_); } }; @@ -4964,7 +4974,7 @@ \indexlibrarymember{operator++}{common_iterator}% \begin{itemdecl} -common_iterator& operator++(); +constexpr common_iterator& operator++(); \end{itemdecl} \begin{itemdescr} @@ -4983,7 +4993,7 @@ \indexlibrarymember{operator++}{common_iterator}% \begin{itemdecl} -decltype(auto) operator++(int); +constexpr decltype(auto) operator++(int); \end{itemdecl} \begin{itemdescr} @@ -5018,10 +5028,10 @@ \begin{codeblock} class @\exposid{postfix-proxy}@ { iter_value_t keep_; - @\exposid{postfix-proxy}@(iter_reference_t&& x) + constexpr @\exposid{postfix-proxy}@(iter_reference_t&& x) : keep_(std::forward>(x)) {} public: - const iter_value_t& operator*() const { + constexpr const iter_value_t& operator*() const noexcept { return keep_; } }; @@ -5034,7 +5044,7 @@ \begin{itemdecl} template S2> requires @\libconcept{sentinel_for}@ -friend bool operator==( +friend constexpr bool operator==( const common_iterator& x, const common_iterator& y); \end{itemdecl} @@ -5055,7 +5065,7 @@ \begin{itemdecl} template S2> requires @\libconcept{sentinel_for}@ && @\libconcept{equality_comparable_with}@ -friend bool operator==( +friend constexpr bool operator==( const common_iterator& x, const common_iterator& y); \end{itemdecl} @@ -5076,7 +5086,7 @@ \begin{itemdecl} template<@\libconcept{sized_sentinel_for}@ I2, @\libconcept{sized_sentinel_for}@ S2> requires @\libconcept{sized_sentinel_for}@ -friend iter_difference_t operator-( +friend constexpr iter_difference_t operator-( const common_iterator& x, const common_iterator& y); \end{itemdecl} @@ -5097,7 +5107,7 @@ \indexlibrarymember{iter_move}{common_iterator}% \begin{itemdecl} -friend iter_rvalue_reference_t iter_move(const common_iterator& i) +friend constexpr iter_rvalue_reference_t iter_move(const common_iterator& i) noexcept(noexcept(ranges::iter_move(declval()))) requires @\libconcept{input_iterator}@; \end{itemdecl} @@ -5115,7 +5125,7 @@ \indexlibrarymember{iter_swap}{common_iterator}% \begin{itemdecl} template<@\libconcept{indirectly_swappable}@ I2, class S2> - friend void iter_swap(const common_iterator& x, const common_iterator& y) + friend constexpr void iter_swap(const common_iterator& x, const common_iterator& y) noexcept(noexcept(ranges::iter_swap(declval(), declval()))); \end{itemdecl} @@ -5204,7 +5214,7 @@ requires @\libconcept{assignable_from}@ constexpr counted_iterator& operator=(const counted_iterator& x); - constexpr const I& base() const &; + constexpr const I& base() const & noexcept; constexpr I base() &&; constexpr iter_difference_t count() const noexcept; constexpr decltype(auto) operator*(); @@ -5331,7 +5341,7 @@ \indexlibrarymember{base}{counted_iterator}% \begin{itemdecl} -constexpr const I& base() const &; +constexpr const I& base() const & noexcept; \end{itemdecl} \begin{itemdescr} diff --git a/source/locales.tex b/source/locales.tex index e0f561fa68..f7f20439b4 100644 --- a/source/locales.tex +++ b/source/locales.tex @@ -2268,7 +2268,7 @@ \end{codeblock} where the values \tcode{src} and \tcode{atoms} are defined as if by: \begin{codeblock} -static const char src[] = "0123456789abcdefxABCDEFX+-"; +static const char src[] = "0123456789abcdefpxABCDEFPX+-"; char_type atoms[sizeof(src)]; use_facet>(loc).widen(src, src + sizeof(src), atoms); \end{codeblock} @@ -2290,6 +2290,22 @@ then \tcode{in} is advanced by \tcode{++in} and processing returns to the beginning of stage 2. +\begin{example} +Given an input sequence of \tcode{"0x1a.bp+07p"}, +\begin{itemize} +\item +if the conversion specifier returned by Stage 1 is \tcode{\%d}, +\tcode{"0"} is accumulated; +\item +if the conversion specifier returned by Stage 1 is \tcode{\%i}, +\tcode{"0x1a"} are accumulated; +\item +if the conversion specifier returned by Stage 1 is \tcode{\%g}, +\tcode{"0x1a.bp+07"} are accumulated. +\end{itemize} +In all cases, the remainder is left in the input. +\end{example} + \stage{3} The sequence of \tcode{char}{s} accumulated in stage 2 (the field) is converted to a numeric value by the rules of one of the functions diff --git a/source/numerics.tex b/source/numerics.tex index 4fcb22d4ec..23a78fd258 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -3557,7 +3557,7 @@ private: Engine e; // \expos - int n; // \expos + size_t n; // \expos }; \end{codeblock} @@ -4167,7 +4167,7 @@ using result_type = uint_least32_t; // constructors - seed_seq(); + seed_seq() noexcept; template seed_seq(initializer_list il); template @@ -4194,29 +4194,25 @@ \indexlibraryctor{seed_seq}% \begin{itemdecl} -seed_seq(); +seed_seq() noexcept; \end{itemdecl} \begin{itemdescr} \pnum \ensures \tcode{v.empty()} is \tcode{true}. - -\pnum -\throws -Nothing. \end{itemdescr} \indexlibraryctor{seed_seq}% \begin{itemdecl} template - seed_seq(initializer_list il); + seed_seq(initializer_list il); \end{itemdecl} \begin{itemdescr} \pnum -\mandates +\constraints \tcode{T} is an integer type. \pnum diff --git a/source/ranges.tex b/source/ranges.tex index daf845ff1b..f1b9593841 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -307,9 +307,9 @@ inline constexpr bool enable_borrowed_range> = enable_borrowed_range; template - using @\libglobal{keys_view}@ = elements_view, 0>; + using @\libglobal{keys_view}@ = elements_view; template - using @\libglobal{values_view}@ = elements_view, 1>; + using @\libglobal{values_view}@ = elements_view; namespace views { template @@ -1066,16 +1066,18 @@ \begin{itemdescr} \pnum -Given an expression \tcode{E} such that \tcode{decltype((E))} is \tcode{T}, +Let \tcode{U} be \tcode{remove_reference_t} +if \tcode{T} is an rvalue reference type, and \tcode{T} otherwise. +Given a variable \tcode{u} of type \tcode{U}, \tcode{T} models \libconcept{borrowed_range} only if -the validity of iterators obtained from the object denoted by \tcode{E} -is not tied to the lifetime of that object. +the validity of iterators obtained from \tcode{u} +is not tied to the lifetime of that variable. \pnum \begin{note} Since the validity of iterators is not tied to the lifetime of -an object whose type models \libconcept{borrowed_range}, -a function can accept arguments of such a type by value and +a variable whose type models \libconcept{borrowed_range}, +a function with a parameter of such a type can return iterators obtained from it without danger of dangling. \end{note} \end{itemdescr} @@ -1131,7 +1133,7 @@ models \libconcept{sized_range} only if \begin{itemize} \item \tcode{ranges::size(t)} is amortized \bigoh{1}, does not modify \tcode{t}, -and is equal to \tcode{ranges::distance(t)}, and +and is equal to \tcode{ranges::distance(\brk{}ranges::begin(t), ranges::end(t))}, and \item if \tcode{iterator_t} models \libconcept{forward_iterator}, \tcode{ranges::size(t)} is well-defined regardless of the evaluation of @@ -1497,12 +1499,15 @@ \indexlibraryglobal{subrange}% \begin{codeblock} namespace std::ranges { + template + concept @\defexposconceptnc{uses-nonqualification-pointer-conversion}@ = // \expos + is_pointer_v && is_pointer_v && + !@\libconcept{convertible_to}@(*)[], remove_pointer_t(*)[]>; + template concept @\defexposconceptnc{convertible-to-non-slicing}@ = // \expos @\libconcept{convertible_to}@ && - !(is_pointer_v> && - is_pointer_v> && - @\exposconcept{different-from}@>, remove_pointer_t>>); + !@\exposconcept{uses-nonqualification-pointer-conversion}@, decay_t>; template concept @\defexposconceptnc{pair-like}@ = // \expos @@ -1594,7 +1599,7 @@ subrange, sentinel_t, subrange_kind::sized>; template - requires (N < 2) + requires ((N == 0 && @\libconcept{copyable}@) || N == 1) constexpr auto get(const subrange& r); template @@ -1826,7 +1831,7 @@ \indexlibrarymember{get}{subrange}% \begin{itemdecl} template - requires (N < 2) + requires ((N == 0 && @\libconcept{copyable}@) || N == 1) constexpr auto get(const subrange& r); template requires (N < 2) @@ -2707,7 +2712,11 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return i += n;} +Equivalent to: +\begin{codeblock} +i += n; +return i; +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator+}{iota_view::iterator} @@ -2731,7 +2740,11 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return i -= n;} +Equivalent to: +\begin{codeblock} +i -= n; +return i; +\end{codeblock} \end{itemdescr} \indexlibrarymember{operator-}{iota_view::iterator} @@ -2874,7 +2887,7 @@ private: struct @\exposidnc{iterator}@; // \expos basic_istream* @\exposid{stream_}@; // \expos - Val @\exposid{value_}@; // \expos + Val @\exposid{value_}@ = Val(); // \expos }; } \end{codeblock} @@ -3129,7 +3142,7 @@ \item If \tcode{\libconcept{copyable}} is not modeled, the copy assignment operator is equivalent to: \begin{codeblock} -@\exposid{copyable-box}@& operator=(const @\exposid{copyable-box}@& that) +constexpr @\exposid{copyable-box}@& operator=(const @\exposid{copyable-box}@& that) noexcept(is_nothrow_copy_constructible_v) { if (this != addressof(that)) { if (that) emplace(*that); @@ -3142,7 +3155,7 @@ \item If \tcode{\libconcept{movable}} is not modeled, the move assignment operator is equivalent to: \begin{codeblock} -@\exposid{copyable-box}@& operator=(@\exposid{copyable-box}@&& that) +constexpr @\exposid{copyable-box}@& operator=(@\exposid{copyable-box}@&& that) noexcept(is_nothrow_move_constructible_v) { if (this != addressof(that)) { if (that) emplace(std::move(*that)); @@ -3469,7 +3482,7 @@ @\exposid{iterator}@() requires @\libconcept{default_initializable}@> = default; constexpr @\exposid{iterator}@(filter_view& parent, iterator_t current); - constexpr const iterator_t& base() const &; + constexpr const iterator_t& base() const & noexcept; constexpr iterator_t base() &&; constexpr range_reference_t operator*() const; constexpr iterator_t operator->() const @@ -3546,7 +3559,7 @@ \indexlibrarymember{base}{filter_view::iterator}% \begin{itemdecl} -constexpr const iterator_t& base() const &; +constexpr const iterator_t& base() const & noexcept; \end{itemdecl} \begin{itemdescr} @@ -3967,7 +3980,7 @@ constexpr @\exposid{iterator}@(@\exposid{iterator}@ i) requires Const && @\libconcept{convertible_to}@, iterator_t<@\exposid{Base}@>>; - constexpr const iterator_t<@\exposid{Base}@>& base() const &; + constexpr const iterator_t<@\exposid{Base}@>& base() const & noexcept; constexpr iterator_t<@\exposid{Base}@> base() &&; constexpr decltype(auto) operator*() const { @@ -4093,7 +4106,7 @@ \indexlibrarymember{base}{transform_view::iterator}% \begin{itemdecl} -constexpr const iterator_t<@\exposid{Base}@>& base() const &; +constexpr const iterator_t<@\exposid{Base}@>& base() const & noexcept; \end{itemdecl} \begin{itemdescr} @@ -4477,15 +4490,33 @@ \item Otherwise, if \tcode{T} models \libconcept{random_access_range} and \libconcept{sized_range} -and is +and is a specialization of +\tcode{span}\iref{views.span}, +\tcode{basic_string_view}\iref{string.view}, or +\tcode{ranges::subrange}\iref{range.subrange}, +then +\tcode{U(ranges::begin(E), +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 a specialization of \tcode{span}\iref{views.span} where \tcode{T::extent == dynamic_extent}, -\item a specialization of \tcode{basic_string_view}\iref{string.view}, -\item a specialization of \tcode{ranges::iota_view}\iref{range.iota.view}, or -\item a specialization of \tcode{ranges::subrange}\iref{range.subrange}, +\item if \tcode{T} is a specialization of \tcode{span}, +then \tcode{U} is \tcode{span}; +\item otherwise, if \tcode{T} is a specialization of \tcode{basic_string_view}, +then \tcode{U} is \tcode{T}; +\item otherwise, \tcode{T} is a specialization of \tcode{ranges::subrange}, and +\tcode{U} is \tcode{ranges::subrange>}; \end{itemize} -then \tcode{T(ranges::begin(E), ranges::begin(E) + min(ranges::size(E), F))}, -except that \tcode{E} is evaluated only once. + +\item +otherwise, if \tcode{T} is +a specialization of \tcode{ranges::iota_view}\iref{range.iota.view} +that models \libconcept{random_access_range} and \libconcept{sized_range}, +then +\tcode{ranges::iota_view(*ranges::begin(E), +*(ranges::begin(E) + std::\linebreak{}min(ranges::distance(E), F)))}, +except that \tcode{E} is evaluated only once; \item Otherwise, \tcode{ranges::take_view(E, F)}. @@ -4890,13 +4921,27 @@ \libconcept{random_access_range} and \libconcept{sized_range} and is \begin{itemize} -\item a specialization of \tcode{span}\iref{views.span} where \tcode{T::extent == dynamic_extent}, +\item a specialization of \tcode{span}\iref{views.span}, \item a specialization of \tcode{basic_string_view}\iref{string.view}, \item a specialization of \tcode{ranges::iota_view}\iref{range.iota.view}, or -\item a specialization of \tcode{ranges::subrange}\iref{range.subrange}, +\item a specialization of \tcode{ranges::subrange}\iref{range.subrange} +where \tcode{T::\exposid{StoreSize}} is \tcode{false}, \end{itemize} -then \tcode{T(ranges::begin(E) + min(ranges::size(E), F), ranges::end(E))}, -except that \tcode{E} is evaluated only once. +then \tcode{U(ranges::begin(E) + std::min(ranges::distance(E), F), ranges::end(E))}, +except that \tcode{E} is evaluated only once, +where \tcode{U} is \tcode{span} +if \tcode{T} is a specialization of \tcode{span} and \tcode{T} otherwise. + +\item +Otherwise, +if \tcode{T} is +a specialization of \tcode{ranges::subrange}\iref{range.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), +\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. \item Otherwise, \tcode{ranges::drop_view(E, F)}. @@ -5314,10 +5359,11 @@ \pnum \tcode{iterator::iterator_concept} is defined as follows: \begin{itemize} -\item If \exposid{ref-is-glvalue} is \tcode{true} and - \exposid{Base} and \tcode{range_reference_t<\exposid{Base}>} each model - \libconcept{bidirectional_range}, then \tcode{iterator_concept} denotes - \tcode{bidirectional_iterator_tag}. +\item If \exposid{ref-is-glvalue} is \tcode{true}, + \exposid{Base} models \libconcept{bidirectional_range}, and + \tcode{range_reference_t<\exposid{Base}>} models + both \libconcept{bidirectional_range} and \libconcept{common_range}, + 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 @@ -5339,8 +5385,9 @@ \tcode{iterator_traits>>::iterator_category}. \item If \placeholder{OUTERC} and \placeholder{INNERC} each model - \tcode{\libconcept{derived_from}}, \tcode{iterator_category} - denotes \tcode{bidirectional_iterator_tag}. + \tcode{\libconcept{derived_from}} and + \tcode{range_reference_t<\exposid{Base}>} models \libconcept{common_range}, + \tcode{iterator_category} denotes \tcode{bidirectional_iterator_tag}. \item Otherwise, if \placeholder{OUTERC} and \placeholder{INNERC} each model \tcode{\libconcept{derived_from}}, \tcode{iter\-ator_category} @@ -5694,7 +5741,8 @@ constexpr auto begin() { if constexpr (@\libconcept{forward_range}@) - return @\exposid{outer-iterator}@<@\placeholder{simple-view}@>{*this, ranges::begin(@\exposid{base_}@)}; + return @\exposid{outer-iterator}@<@\exposconcept{simple-view}@ && @\exposconcept{simple-view}@> + {*this, ranges::begin(@\exposid{base_}@)}; else { @\exposid{current_}@ = ranges::begin(@\exposid{base_}@); return @\exposid{outer-iterator}@{*this}; @@ -5706,7 +5754,8 @@ } constexpr auto end() requires @\libconcept{forward_range}@ && @\libconcept{common_range}@ { - return @\exposid{outer-iterator}@<@\placeholder{simple-view}@>{*this, ranges::end(@\exposid{base_}@)}; + return @\exposid{outer-iterator}@<@\exposconcept{simple-view}@ && @\exposconcept{simple-view}@> + {*this, ranges::end(@\exposid{base_}@)}; } constexpr auto end() const { @@ -5956,7 +6005,7 @@ constexpr explicit value_type(@\exposid{outer-iterator}@ i); constexpr @\exposid{inner-iterator}@ begin() const; - constexpr default_sentinel_t end() const; + constexpr default_sentinel_t end() const noexcept; }; } \end{codeblock} @@ -5985,7 +6034,7 @@ \indexlibrarymember{end}{split_view::\exposid{outer-iterator}::value_type}% \begin{itemdecl} -constexpr default_sentinel_t end() const; +constexpr default_sentinel_t end() const noexcept; \end{itemdecl} \begin{itemdescr} @@ -6021,8 +6070,8 @@ @\exposid{inner-iterator}@() = default; constexpr explicit @\exposid{inner-iterator}@(@\exposid{outer-iterator}@ i); - constexpr const iterator_t<@\exposid{Base}@>& base() const &; - constexpr iterator_t<@\exposid{Base}@> base() &&; + constexpr const iterator_t<@\exposid{Base}@>& base() const & noexcept; + constexpr iterator_t<@\exposid{Base}@> base() && requires @\libconcept{forward_range}@; constexpr decltype(auto) operator*() const { return *@\exposid{i_}@.@\placeholder{current}@; } @@ -6078,7 +6127,7 @@ \indexlibrarymember{base}{lazy_split_view::\exposid{inner-iterator}}% \begin{itemdecl} -constexpr const iterator_t<@\exposid{Base}@>& base() const &; +constexpr const iterator_t<@\exposid{Base}@>& base() const & noexcept; \end{itemdecl} \begin{itemdescr} @@ -6089,7 +6138,7 @@ \indexlibrarymember{base}{lazy_split_view::\exposid{inner-iterator}}% \begin{itemdecl} -constexpr iterator_t<@\exposid{Base}@> base() &&; +constexpr iterator_t<@\exposid{Base}@> base() && requires @\libconcept{forward_range}@; \end{itemdecl} \begin{itemdescr} @@ -6228,7 +6277,7 @@ @\libconcept{constructible_from}@>> constexpr split_view(R&& r, range_value_t e); - constexpr V base() const& requires @\libconcept{copyable}@ { return @\exposid{base_}@; } + constexpr V base() const& requires @\libconcept{copy_constructible}@ { return @\exposid{base_}@; } constexpr V base() && { return std::move(@\exposid{base_}@); } constexpr @\exposid{iterator}@ begin(); @@ -6816,7 +6865,7 @@ \end{example} \pnum -\tcode{keys_view} is an alias for \tcode{elements_view, 0>}, and +\tcode{keys_view} is an alias for \tcode{elements_view}, and is useful for extracting keys from associative containers. \begin{example} @@ -6829,7 +6878,7 @@ \end{example} \pnum -\tcode{values_view} is an alias for \tcode{elements_view, 1>}, and +\tcode{values_view} is an alias for \tcode{elements_view}, and is useful for extracting values from associative containers. \begin{example} @@ -6946,7 +6995,7 @@ constexpr @\exposid{iterator}@(@\exposid{iterator}@ i) requires Const && @\libconcept{convertible_to}@, iterator_t<@\exposid{Base}@>>; - constexpr const iterator_t<@\exposid{Base}@>& base() const&; + constexpr const iterator_t<@\exposid{Base}@>& base() const & noexcept; constexpr iterator_t<@\exposid{Base}@> base() &&; constexpr decltype(auto) operator*() const @@ -7072,7 +7121,7 @@ \indexlibrarymember{base}{elements_view::iterator}% \begin{itemdecl} -constexpr const iterator_t<@\exposid{Base}@>& base() const&; +constexpr const iterator_t<@\exposid{Base}@>& base() const & noexcept; \end{itemdecl} \begin{itemdescr} diff --git a/source/regex.tex b/source/regex.tex index b27e821bb4..d69c440ed5 100644 --- a/source/regex.tex +++ b/source/regex.tex @@ -2064,6 +2064,13 @@ \rSec2[re.results.const]{Constructors} +\pnum +\tref{re.results.const} lists the postconditions of +\tcode{match_results} copy/move constructors and copy/move assignment operators. +For move operations, +the results of the expressions depending on the parameter \tcode{m} denote +the values they had before the respective function calls. + \indexlibraryctor{match_results}% \begin{itemdecl} explicit match_results(const Allocator& a); @@ -2076,6 +2083,17 @@ \tcode{size()} returns \tcode{0}. \end{itemdescr} +\indexlibraryctor{match_results}% +\begin{itemdecl} +match_results(const match_results& m); +\end{itemdecl} + +\begin{itemdescr} +\pnum +\ensures +As specified in \tref{re.results.const}. +\end{itemdescr} + \indexlibraryctor{match_results}% \begin{itemdecl} match_results(match_results&& m) noexcept; @@ -2114,16 +2132,16 @@ \end{itemdescr} \begin{libefftabvalue} - {\tcode{match_results} assignment operator effects} + {\tcode{match_results} copy/move operation postconditions} {re.results.const} \tcode{ready()} & \tcode{m.ready()} \\ \rowsep \tcode{size()} & \tcode{m.size()} \\ \rowsep -\tcode{str(n)} & \tcode{m.str(n)} for all integers \tcode{n < m.size()} \\ \rowsep +\tcode{str(n)} & \tcode{m.str(n)} for all non-negative integers \tcode{n < m.size()} \\ \rowsep \tcode{prefix()} & \tcode{m.prefix()} \\ \rowsep \tcode{suffix()} & \tcode{m.suffix()} \\ \rowsep -\tcode{(*this)[n]} & \tcode{m[n]} for all integers \tcode{n < m.size()} \\ \rowsep -\tcode{length(n)} & \tcode{m.length(n)} for all integers \tcode{n < m.size()} \\ \rowsep -\tcode{position(n)} & \tcode{m.position(n)} for all integers \tcode{n < m.size()} \\ +\tcode{(*this)[n]} & \tcode{m[n]} for all non-negative integers \tcode{n < m.size()} \\ \rowsep +\tcode{length(n)} & \tcode{m.length(n)} for all non-negative integers \tcode{n < m.size()} \\ \rowsep +\tcode{position(n)} & \tcode{m.position(n)} for all non-negative integers \tcode{n < m.size()} \\ \end{libefftabvalue} \rSec2[re.results.state]{State} diff --git a/source/strings.tex b/source/strings.tex index 85aece8b2d..2ddedd63fc 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -4287,6 +4287,10 @@ \effects Initializes \tcode{data_} with \tcode{to_address(begin)} and initializes \tcode{size_} with \tcode{end - begin}. + +\pnum +\throws +When and what \tcode{end - begin} throws. \end{itemdescr} \indexlibraryctor{basic_string_view}% @@ -4303,6 +4307,8 @@ \constraints \begin{itemize} \item +\tcode{remove_cvref_t} is not the same type as \tcode{basic_string_view}, +\item \tcode{R} models \tcode{ranges::\libconcept{contiguous_range}} and \tcode{ranges::\libconcept{sized_range}}, \item diff --git a/source/time.tex b/source/time.tex index 54db568d3e..224b94923d 100644 --- a/source/time.tex +++ b/source/time.tex @@ -851,23 +851,37 @@ namespace chrono { // \ref{time.parse}, parsing + template + @\unspec@ + parse(const charT* fmt, Parsable& tp); template @\unspec@ - parse(const basic_string& format, Parsable& tp); + parse(const basic_string& fmt, Parsable& tp); template @\unspec@ - parse(const basic_string& format, Parsable& tp, + parse(const charT* fmt, Parsable& tp, + basic_string& abbrev); + template + @\unspec@ + parse(const basic_string& fmt, Parsable& tp, basic_string& abbrev); + template + @\unspec@ + parse(const charT* fmt, Parsable& tp, minutes& offset); template @\unspec@ - parse(const basic_string& format, Parsable& tp, + parse(const basic_string& fmt, Parsable& tp, minutes& offset); template @\unspec@ - parse(const basic_string& format, Parsable& tp, + parse(const charT* fmt, Parsable& tp, + basic_string& abbrev, minutes& offset); + template + @\unspec@ + parse(const basic_string& fmt, Parsable& tp, basic_string& abbrev, minutes& offset); // calendrical constants @@ -1304,8 +1318,8 @@ \end{example} \pnum -\ensures -\tcode{count() == static_cast(r)}. +\effects +Initializes \tcode{rep_} with \tcode{r}. \end{itemdescr} \indexlibraryctor{duration}% @@ -10975,18 +10989,33 @@ let \tcode{I} be \tcode{basic_istream\&}, where \tcode{charT} and \tcode{traits} are template parameters in that context. +\pnum +\recommended +Implementations should make it difficult to accidentally store or use +a manipulator that may contain a dangling reference to a format string, +for example by making the manipulators produced by \tcode{parse} immovable and +preventing stream extraction into an lvalue of such a manipulator type. + \begin{itemdecl} +template + @\unspec@ + parse(const charT* fmt, Parsable& tp); template @\unspec@ parse(const basic_string& fmt, Parsable& tp); \end{itemdecl} \begin{itemdescr} +\pnum +Let $F$ be \tcode{fmt} for the first overload and +\tcode{fmt.c_str()} for the second overload. +Let \tcode{traits} be \tcode{char_traits} for the first overload. + \pnum \constraints The expression \begin{codeblock} -from_stream(declval&>(), fmt.c_str(), tp) +from_stream(declval&>(), @$F$@, tp) \end{codeblock} is well-formed when treated as an unevaluated operand. @@ -10996,10 +11025,14 @@ the expression \tcode{is >> parse(fmt, tp)} has type \tcode{I}, has value \tcode{is}, and -calls \tcode{from_stream(is, fmt.c_str(), tp)}. +calls \tcode{from_stream(is, $F$, tp)}. \end{itemdescr} \begin{itemdecl} +template + @\unspec@ + parse(const charT* fmt, Parsable& tp, + basic_string& abbrev); template @\unspec@ parse(const basic_string& fmt, Parsable& tp, @@ -11007,11 +11040,15 @@ \end{itemdecl} \begin{itemdescr} +\pnum +Let $F$ be \tcode{fmt} for the first overload and +\tcode{fmt.c_str()} for the second overload. + \pnum \constraints The expression \begin{codeblock} -from_stream(declval&>(), fmt.c_str(), tp, addressof(abbrev)) +from_stream(declval&>(), @$F$@, tp, addressof(abbrev)) \end{codeblock} is well-formed when treated as an unevaluated operand. @@ -11021,10 +11058,13 @@ the expression \tcode{is >> parse(fmt, tp, abbrev)} has type \tcode{I}, has value \tcode{is}, and -calls \tcode{from_stream(is, fmt.c_str(), tp, addressof(abbrev))}. +calls \tcode{from_stream(is, $F$, tp, addressof(abbrev))}. \end{itemdescr} \begin{itemdecl} +template + @\unspec@ + parse(const charT* fmt, Parsable& tp, minutes& offset); template @\unspec@ parse(const basic_string& fmt, Parsable& tp, @@ -11032,12 +11072,18 @@ \end{itemdecl} \begin{itemdescr} +\pnum +Let $F$ be \tcode{fmt} for the first overload and +\tcode{fmt.c_str()} for the second overload. +Let \tcode{traits} be \tcode{char_traits} and +\tcode{Alloc} be \tcode{allocator} for the first overload. + \pnum \constraints The expression \begin{codeblock} from_stream(declval&>(), - fmt.c_str(), tp, + @$F$@, tp, declval*>(), &offset) \end{codeblock} @@ -11052,13 +11098,17 @@ calls: \begin{codeblock} from_stream(is, - fmt.c_str(), tp, + @$F$@, tp, static_cast*>(nullptr), &offset) \end{codeblock} \end{itemdescr} \begin{itemdecl} +template + @\unspec@ + parse(const charT* fmt, Parsable& tp, + basic_string& abbrev, minutes& offset); template @\unspec@ parse(const basic_string& fmt, Parsable& tp, @@ -11066,12 +11116,16 @@ \end{itemdecl} \begin{itemdescr} +\pnum +Let $F$ be \tcode{fmt} for the first overload and +\tcode{fmt.c_str()} for the second overload. + \pnum \constraints The expression \begin{codeblock} from_stream(declval&>(), - fmt.c_str(), tp, addressof(abbrev), &offset) + @$F$@, tp, addressof(abbrev), &offset) \end{codeblock} is well-formed when treated as an unevaluated operand. @@ -11081,7 +11135,7 @@ the expression \tcode{is >> parse(fmt, tp, abbrev, offset)} has type \tcode{I}, has value \tcode{is}, and -calls \tcode{from_stream(is, fmt.c_str(), tp, addressof(abbrev), \&offset)}. +calls \tcode{from_stream(is, $F$, tp, addressof(abbrev), \&offset)}. \end{itemdescr} \pnum diff --git a/source/utilities.tex b/source/utilities.tex index 2dbf5e8991..17ed34b9e7 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -1464,11 +1464,32 @@ \end{itemdecl} \begin{itemdescr} +\pnum +Let \exposid{disambiguating-constraint} be: +\begin{itemize} +\item +\tcode{negation, tuple>>} +if \tcode{sizeof...(Types)} is 1; +\item +otherwise, +\tcode{bool_constant, allocator_arg_t> || +is_-\newline{}same_v, allocator_arg_t>>} +if \tcode{sizeof...(Types)} is 2 or 3; +\item +otherwise, \tcode{true_type}. +\end{itemize} + \pnum \constraints -\tcode{sizeof...(Types)} equals \tcode{sizeof...(UTypes)} and -$\tcode{sizeof...(Types)} \geq 1$ and -\tcode{is_constructible_v<$\tcode{T}_i$, $\tcode{U}_i$>} is \tcode{true} for all $i$. +\begin{itemize} +\item +\tcode{sizeof...(Types)} equals \tcode{sizeof...(UTypes)}, +\item +$\tcode{sizeof...(Types)} \geq 1$, and +\item +\tcode{conjunction_v<\exposid{disambiguating-constraint}, +is_constructible...>} is\newline \tcode{true}. +\end{itemize} \pnum \effects @@ -2392,6 +2413,11 @@ template class optional; + template + constexpr bool @\exposid{is-optional}@ = false; // \expos + template + constexpr bool @\exposid{is-optional}@> = true; // \expos + // \ref{optional.nullopt}, no-value state indicator struct nullopt_t{@\seebelow@}; inline constexpr nullopt_t nullopt(@\unspec@); @@ -2434,7 +2460,7 @@ template constexpr bool operator<=(const T&, const optional&); template constexpr bool operator>=(const optional&, const U&); template constexpr bool operator>=(const T&, const optional&); - template U> + template requires (!@\exposid{is-optional}@) && @\libconcept{three_way_comparable_with}@ constexpr compare_three_way_result_t operator<=>(const optional&, const U&); @@ -2501,12 +2527,12 @@ constexpr void swap(optional&) noexcept(@\seebelow@); // \ref{optional.observe}, observers - constexpr const T* operator->() const; - constexpr T* operator->(); - constexpr const T& operator*() const&; - constexpr T& operator*() &; - constexpr T&& operator*() &&; - constexpr const T&& operator*() const&&; + constexpr const T* operator->() const noexcept; + constexpr T* operator->() noexcept; + constexpr const T& operator*() const& noexcept; + constexpr T& operator*() & noexcept; + constexpr T&& operator*() && noexcept; + constexpr const T&& operator*() const&& noexcept; constexpr explicit operator bool() const noexcept; constexpr bool has_value() const noexcept; constexpr const T& value() const&; @@ -3224,8 +3250,8 @@ \indexlibrarymember{operator->}{optional}% \begin{itemdecl} -constexpr const T* operator->() const; -constexpr T* operator->(); +constexpr const T* operator->() const noexcept; +constexpr T* operator->() noexcept; \end{itemdecl} \begin{itemdescr} @@ -3237,10 +3263,6 @@ \returns \tcode{val}. -\pnum -\throws -Nothing. - \pnum \remarks These functions are constexpr functions. @@ -3248,8 +3270,8 @@ \indexlibrarymember{operator*}{optional}% \begin{itemdecl} -constexpr const T& operator*() const&; -constexpr T& operator*() &; +constexpr const T& operator*() const& noexcept; +constexpr T& operator*() & noexcept; \end{itemdecl} \begin{itemdescr} @@ -3261,10 +3283,6 @@ \returns \tcode{*val}. -\pnum -\throws -Nothing. - \pnum \remarks These functions are constexpr functions. @@ -3272,8 +3290,8 @@ \indexlibrarymember{operator*}{optional}% \begin{itemdecl} -constexpr T&& operator*() &&; -constexpr const T&& operator*() const&&; +constexpr T&& operator*() && noexcept; +constexpr const T&& operator*() const&& noexcept; \end{itemdecl} \begin{itemdescr} @@ -3831,7 +3849,7 @@ \indexlibrarymember{operator<=>}{optional}% \begin{itemdecl} -template U> +template requires (!@\exposid{is-optional}@) && @\libconcept{three_way_comparable_with}@ constexpr compare_three_way_result_t operator<=>(const optional& x, const U& v); \end{itemdecl} @@ -4583,7 +4601,7 @@ \tcode{!is_nothrow_move_constructible_v<$\tcode{T}_j$>} is \tcode{true}, equivalent to \tcode{emplace<$j$>(std::forward(t))}. \item -Otherwise, equivalent to \tcode{operator=(variant(std::forward(t)))}. +Otherwise, equivalent to \tcode{emplace<$j$>($\tcode{T}_j$(std::forward(t)))}. \end{itemize} \pnum @@ -8580,7 +8598,7 @@ unique_ptr& operator=(nullptr_t) noexcept; // \ref{unique.ptr.single.observers}, observers - add_lvalue_reference_t operator*() const; + add_lvalue_reference_t operator*() const noexcept(@\seebelow@); pointer operator->() const noexcept; pointer get() const noexcept; deleter_type& get_deleter() noexcept; @@ -8955,7 +8973,7 @@ \indexlibrarymember{operator*}{unique_ptr}% \begin{itemdecl} -add_lvalue_reference_t operator*() const; +add_lvalue_reference_t operator*() const noexcept(noexcept(*declval())); \end{itemdecl} \begin{itemdescr} @@ -14010,7 +14028,7 @@ \begin{itemdescr} \pnum \returns -\tcode{ref(t.get())}. +\tcode{t}. \end{itemdescr} \indexlibrarymember{cref}{reference_wrapper}% @@ -14032,7 +14050,7 @@ \begin{itemdescr} \pnum \returns -\tcode{cref(t.get())}. +\tcode{t}. \end{itemdescr} \rSec2[arithmetic.operations]{Arithmetic operations} @@ -18321,8 +18339,9 @@ are desired between the template arguments. \end{note} Such a specialization need not have a member named \tcode{type}, -but if it does, that member shall be a \grammarterm{typedef-name} -for an accessible and unambiguous cv-unqualified non-reference type \tcode{C} +but if it does, +the \grammarterm{qualified-id} \tcode{common_type::type} shall denote +a cv-unqualified non-reference type to which each of the types \tcode{T1} and \tcode{T2} is explicitly convertible. Moreover, \tcode{common_type_t} shall denote the same type, if any, as does \tcode{common_type_t}. @@ -18386,8 +18405,10 @@ between the template arguments. \end{note} Such a specialization need not have a member named \tcode{type}, but if it does, -that member shall be a \grammarterm{typedef-name} for an accessible and -unambiguous type \tcode{C} to which each of the types \tcode{TQual} and +the \grammarterm{qualified-id} +\tcode{basic_common_reference::type} +shall denote a type +to which each of the types \tcode{TQual} and \tcode{UQual} is convertible. Moreover, \tcode{basic_common_reference::type} shall denote the same type, if any, as does @@ -21211,8 +21232,8 @@ \begin{itemdescr} \pnum -\returns -\tcode{out_}. +\effects +Equivalent to: \tcode{return std::move(out_);} \end{itemdescr} \indexlibrarymember{advance_to}{basic_format_context}% @@ -21223,7 +21244,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{out_ = it;} +Equivalent to: \tcode{out_ = std::move(it);} \end{itemdescr} \indextext{left-pad}%