diff --git a/source/containers.tex b/source/containers.tex index 39d1107df5..4d49855d66 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -2176,8 +2176,8 @@ \tcode{reference; const_reference} for constant \tcode{a} \pnum -\returns -\tcode{*(a.begin() + n)} +\effects +Equivalent to: \tcode{return *(a.begin() + n);} \pnum \remarks @@ -14758,6 +14758,11 @@ // \ref{flat.map.cons}, construct/copy/destroy flat_map() : flat_map(key_compare()) { } + template + flat_map(const flat_map&, const Allocator& a); + template + flat_map(flat_map&&, const Allocator& a); + flat_map(key_container_type key_cont, mapped_container_type mapped_cont, const key_compare& comp = key_compare()); template @@ -15166,6 +15171,10 @@ \indexlibraryctor{flat_map}% \begin{itemdecl} +template + flat_map(const flat_map&, const Allocator& a); +template + flat_map(flat_map&&, const Allocator& a); template flat_map(const key_compare& comp, const Allocator& a); template @@ -15938,6 +15947,11 @@ // \ref{flat.multimap.cons}, construct/copy/destroy flat_multimap() : flat_multimap(key_compare()) { } + template + flat_multimap(const flat_multimap&, const Allocator& a); + template + flat_multimap(flat_multimap&&, const Allocator& a); + flat_multimap(key_container_type key_cont, mapped_container_type mapped_cont, const key_compare& comp = key_compare()); template @@ -16308,6 +16322,10 @@ \indexlibraryctor{flat_multimap}% \begin{itemdecl} +template + flat_multimap(const flat_multimap&, const Allocator& a); +template + flat_multimap(flat_multimap&&, const Allocator& a); template flat_multimap(const key_compare& comp, const Allocator& a); template @@ -16499,6 +16517,11 @@ // \ref{flat.set.cons}, constructors flat_set() : flat_set(key_compare()) { } + template + flat_set(const flat_set&, const Allocator& a); + template + flat_set(flat_set&&, const Allocator& a); + explicit flat_set(container_type cont, const key_compare& comp = key_compare()); template flat_set(const container_type& cont, const Allocator& a); @@ -16808,6 +16831,10 @@ \indexlibraryctor{flat_set}% \begin{itemdecl} +template + flat_set(const flat_set&, const Allocator& a); +template + flat_set(flat_set&&, const Allocator& a); template flat_set(const key_compare& comp, const Allocator& a); template @@ -17153,6 +17180,11 @@ // \ref{flat.multiset.cons}, constructors flat_multiset() : flat_multiset(key_compare()) { } + template + flat_multiset(const flat_multiset&, const Allocator& a); + template + flat_multiset(flat_multiset&&, const Allocator& a); + explicit flat_multiset(container_type cont, const key_compare& comp = key_compare()); template flat_multiset(const container_type& cont, const Allocator& a); @@ -17464,6 +17496,10 @@ \indexlibraryctor{flat_multiset}% \begin{itemdecl} +template + flat_multiset(const flat_multiset&, const Allocator& a); +template + flat_multiset(flat_multiset&&, const Allocator& a); template flat_multiset(const key_compare& comp, const Allocator& a); template @@ -17808,8 +17844,6 @@ template constexpr explicit(@\seebelow@) span(const span& s) noexcept; - ~span() noexcept = default; - constexpr span& operator=(const span& other) noexcept = default; // \ref{span.sub}, subviews diff --git a/source/lib-intro.tex b/source/lib-intro.tex index f5039472b1..944afab25e 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -2968,6 +2968,7 @@ \item \indexlibraryzombie{argument_type} \tcode{argument_type}, \item \indexlibraryzombie{first_argument_type} \tcode{first_argument_type}, \item \indexlibraryzombie{io_state} \tcode{io_state}, +\item \indexlibraryzombie{op} \tcode{op}, \item \indexlibraryzombie{open_mode} \tcode{open_mode}, \item \indexlibraryzombie{preferred} \tcode{preferred}, \item \indexlibraryzombie{second_argument_type} \tcode{second_argument_type}, diff --git a/source/numerics.tex b/source/numerics.tex index 785bb29f51..81efc1e347 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -125,7 +125,7 @@ namespace std { // types using fenv_t = @\textit{object type}@; - using fexcept_t = @\textit{integer type}@; + using fexcept_t = @\textit{object type}@; // functions int feclearexcept(int except); @@ -500,6 +500,23 @@ \tcode{*this}. \end{itemdescr} +\indexlibrarymember{operator=}{complex}% +\begin{itemdecl} +template constexpr complex& operator=(const complex& rhs); +\end{itemdecl} + +\begin{itemdescr} +\pnum +\effects +Assigns the value \tcode{rhs.real()} to the real part and +the value \tcode{rhs.imag()} to the imaginary part +of the complex value \tcode{*this}. + +\pnum +\returns +\tcode{*this}. +\end{itemdescr} + \indexlibrarymember{operator+=}{complex}% \begin{itemdecl} template constexpr complex& operator+=(const complex& rhs); diff --git a/source/ranges.tex b/source/ranges.tex index 851ed0248e..c30a56a901 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -433,8 +433,8 @@ } // \ref{range.enumerate}, enumerate view - template<@\libconcept{input_range}@ View> - requires @\libconcept{view}@ + template<@\libconcept{view}@ V> + requires @\seebelow@ class enumerate_view; // freestanding template @@ -1265,14 +1265,6 @@ \end{itemdecl} \begin{itemdescr} -\pnum -The required expressions -\tcode{ranges::begin(t)} -and -\tcode{ranges::end(t)} -of the \libconcept{range} concept -do not require implicit expression variations\iref{concepts.equality}. - \pnum Given an expression \tcode{t} such that \tcode{decltype((t))} is \tcode{T\&}, \tcode{T} models \libconcept{range} only if @@ -7803,8 +7795,9 @@ \begin{itemdescr} \pnum \effects -Initializes \exposid{parent_} with \tcode{i.\exposid{parent_}} and -\exposid{current_} with \tcode{std::move(i.\exposid{current_})}. +Initializes \exposid{parent_} with \tcode{i.\exposid{parent_}}, +\exposid{current_} with \tcode{std::move(i.\exposid{current_})}, and +\exposid{trailing_empty_} with \tcode{i.\exposid{trailing_empty_}}. \end{itemdescr} \indexlibrarymember{operator*}{lazy_split_view::\exposid{outer-iterator}}% @@ -9633,7 +9626,7 @@ requires @\libconcept{random_access_range}@<@\exposid{Base}@>; friend constexpr @\exposid{iterator}@ operator-(const @\exposid{iterator}@& x, difference_type y) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; - friend constexpr difference_type operator-(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y); + friend constexpr difference_type operator-(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) noexcept; friend constexpr auto iter_move(const @\exposid{iterator}@& i) noexcept(noexcept(ranges::iter_move(i.@\exposid{current_}@)) && @@ -9900,7 +9893,7 @@ \indexlibrarymember{operator-}{enumerate_view::\exposid{iterator}}% \begin{itemdecl} -friend constexpr difference_type operator-(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y); +friend constexpr difference_type operator-(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) noexcept; \end{itemdecl} \begin{itemdescr} @@ -15957,7 +15950,7 @@ template requires @\libconcept{convertible_to}@, yielded> - auto yield_value(ranges::elements_of r) noexcept; + auto yield_value(ranges::elements_of r); void await_transform() = delete; @@ -16121,7 +16114,7 @@ \begin{itemdecl} template requires @\libconcept{convertible_to}@, yielded> - auto yield_value(ranges::elements_of r) noexcept; + auto yield_value(ranges::elements_of r); \end{itemdecl} \begin{itemdescr} diff --git a/source/strings.tex b/source/strings.tex index 66fc8b2094..3bd859e555 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -2368,9 +2368,7 @@ function or operator has no other effect on the \tcode{basic_string} object. \pnum -In every specialization \tcode{basic_string}, -the type \tcode{allocator_traits::value_type} shall name the same type -as \tcode{charT}. Every object of type +Every object of type \tcode{basic_string} uses an object of type \tcode{Allocator} to allocate and free storage for the contained \tcode{charT} objects as needed. The \tcode{Allocator} object used is @@ -2383,6 +2381,8 @@ an allocator-aware container, but does not use the allocator's \tcode{construct} and \tcode{destroy} member functions\iref{container.requirements.pre}. +The program is ill-formed if +\tcode{Allocator::value_type} is not the same type as \tcode{charT}. \end{note} \begin{note} The program is ill-formed if \tcode{traits::char_type} diff --git a/source/threads.tex b/source/threads.tex index e4fa6273c9..527bf57e7a 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -4905,6 +4905,7 @@ operator shared_ptr() const noexcept; void store(shared_ptr desired, memory_order order = memory_order::seq_cst) noexcept; void operator=(shared_ptr desired) noexcept; + void operator=(nullptr_t) noexcept; shared_ptr exchange(shared_ptr desired, memory_order order = memory_order::seq_cst) noexcept; @@ -4991,6 +4992,17 @@ Equivalent to \tcode{store(desired)}. \end{itemdescr} +\indexlibrarymember{operator=}{atomic>}% +\begin{itemdecl} +void operator=(nullptr_t) noexcept; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\effects +Equivalent to \tcode{store(nullptr)}. +\end{itemdescr} + \indexlibrarymember{load}{atomic>}% \begin{itemdecl} shared_ptr load(memory_order order = memory_order::seq_cst) const noexcept; diff --git a/source/utilities.tex b/source/utilities.tex index c99d900ebc..3a89948f7b 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -8310,7 +8310,7 @@ \begin{itemdescr} \pnum -Let \tcode{U} be \tcode{remove_cvref_t>}. +Let \tcode{U} be \tcode{remove_cvref_t>}. \pnum \constraints @@ -8326,7 +8326,7 @@ Equivalent to: \begin{codeblock} if (has_value()) - return invoke(std::forward(f), value()); + return invoke(std::forward(f), **this); else return U(unexpect, error()); \end{codeblock} @@ -8341,7 +8341,7 @@ \begin{itemdescr} \pnum Let \tcode{U} be -\tcode{remove_cvref_t>}. +\tcode{remove_cvref_t>}. \pnum \constraints @@ -8357,7 +8357,7 @@ Equivalent to: \begin{codeblock} if (has_value()) - return invoke(std::forward(f), std::move(value())); + return invoke(std::forward(f), std::move(**this)); else return U(unexpect, std::move(error())); \end{codeblock} @@ -8375,7 +8375,7 @@ \pnum \constraints -\tcode{is_constructible_v} is \tcode{true}. +\tcode{is_constructible_v} is \tcode{true}. \pnum \mandates @@ -8387,7 +8387,7 @@ Equivalent to: \begin{codeblock} if (has_value()) - return G(in_place, value()); + return G(in_place, **this); else return invoke(std::forward(f), error()); \end{codeblock} @@ -8406,7 +8406,7 @@ \pnum \constraints -\tcode{is_constructible_v} is \tcode{true}. +\tcode{is_constructible_v} is \tcode{true}. \pnum \mandates @@ -8418,7 +8418,7 @@ Equivalent to: \begin{codeblock} if (has_value()) - return G(in_place, std::move(value())); + return G(in_place, std::move(**this)); else return invoke(std::forward(f), std::move(error())); \end{codeblock} @@ -8433,7 +8433,7 @@ \begin{itemdescr} \pnum Let \tcode{U} be -\tcode{remove_cv_t>}. +\tcode{remove_cv_t>}. \pnum \constraints @@ -8445,7 +8445,7 @@ If \tcode{is_void_v} is \tcode{false}, the declaration \begin{codeblock} -U u(invoke(std::forward(f), value())); +U u(invoke(std::forward(f), **this)); \end{codeblock} is well-formed. @@ -8459,9 +8459,9 @@ Otherwise, if \tcode{is_void_v} is \tcode{false}, returns an \tcode{expected} object whose \exposid{has_val} member is \tcode{true} and \exposid{val} member is direct-non-list-initialized with -\tcode{invoke(std::forward(f), value())}. +\tcode{invoke(std::forward(f), **this)}. \item -Otherwise, evaluates \tcode{invoke(std::forward(f), value())} and then +Otherwise, evaluates \tcode{invoke(std::forward(f), **this)} and then returns \tcode{expected()}. \end{itemize} \end{itemdescr} @@ -8475,7 +8475,7 @@ \begin{itemdescr} \pnum Let \tcode{U} be -\tcode{remove_cv_t>}. +\tcode{remove_cv_t>}. \pnum \constraints @@ -8486,9 +8486,9 @@ \tcode{U} is a valid value type for \tcode{expected}. If \tcode{is_void_v} is \tcode{false}, the declaration \begin{codeblock} -U u(invoke(std::forward(f), std::move(value()))); +U u(invoke(std::forward(f), std::move(**this))); \end{codeblock} -is well-formed for some invented variable \tcode{u}. +is well-formed. \pnum \effects @@ -8500,10 +8500,10 @@ Otherwise, if \tcode{is_void_v} is \tcode{false}, returns an \tcode{expected} object whose \exposid{has_val} member is \tcode{true} and \exposid{val} member is direct-non-list-initialized with -\tcode{invoke(std::forward(f), std::move(value()))}. +\tcode{invoke(std::forward(f), std::move(**this))}. \item -Otherwise, evaluates \tcode{invoke(std::forward(f), std::move(value()))} and -then returns \tcode{expected()}. +Otherwise, evaluates \tcode{invoke(std::forward(f), std::move(**this))} and +then returns \tcode{ex\-pected()}. \end{itemize} \end{itemdescr} @@ -8519,7 +8519,7 @@ \pnum \constraints -\tcode{is_constructible_v} is \tcode{true}. +\tcode{is_constructible_v} is \tcode{true}. \pnum \mandates @@ -8533,7 +8533,7 @@ \pnum \returns If \tcode{has_value()} is \tcode{true}, -\tcode{expected(in_place, value())}; otherwise, an \tcode{expected} +\tcode{expected(in_place, **this)}; 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::forward(f), error())}. \end{itemdescr} @@ -8551,7 +8551,7 @@ \pnum \constraints -\tcode{is_constructible_v} is \tcode{true}. +\tcode{is_constructible_v} is \tcode{true}. \pnum \mandates @@ -8565,7 +8565,7 @@ \pnum \returns If \tcode{has_value()} is \tcode{true}, -\tcode{expected(in_place, std::move(value()))}; otherwise, an +\tcode{expected(in_place, std::move(**this))}; 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::forward(f), std::move(error()))}. @@ -9188,6 +9188,10 @@ \end{itemdecl} \begin{itemdescr} +\pnum +\mandates +\tcode{is_copy_constructible_v} is \tcode{true}. + \pnum \throws \tcode{bad_expected_access(error())} if \tcode{has_value()} is \tcode{false}. @@ -9199,6 +9203,11 @@ \end{itemdecl} \begin{itemdescr} +\pnum +\mandates +\tcode{is_copy_constructible_v} is \tcode{true} and +\tcode{is_move_constructible_v} is \tcode{true}. + \pnum \throws \tcode{bad_expected_access(std::move(error()))} @@ -15851,7 +15860,7 @@ template concept @\deflibconcept{formattable}@ = - @\exposconcept{formattable-with}@, basic_format_context<@\placeholder{fmt-iter-for}@>>; + @\exposconcept{formattable-with}@, basic_format_context<@\placeholder{fmt-iter-for}@, charT>>; \end{codeblock} \pnum