diff --git a/source/algorithms.tex b/source/algorithms.tex index 8b2f530d4c..46ca18960b 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -268,10 +268,9 @@ \item a corresponding iterator argument is initialized with \tcode{ranges::begin(r)} and \item - a corresponding sentinel argument is initialized with \tcode{ranges::end(r)}, - or \tcode{ranges::next(ranges::\brk{}begin(r), ranges::end(r))} - if the type of \tcode{r} models \libconcept{forward_range} - and computing \tcode{ranges::next} meets the specified complexity requirements. + a corresponding sentinel argument is initialized with + \tcode{ranges::begin(r) + N} + where \tcode{N} is equal to \tcode{ranges::distance(r)}. \end{itemize} \pnum diff --git a/source/exec.tex b/source/exec.tex index 42c1a57a0d..1eb8531584 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -4911,7 +4911,7 @@ \end{codeblock} where \tcode{\placeholder{sends-stopped}} equals \tcode{true} if and only if there exists an element \tcode{S} of \tcode{Sndrs} such that -\tcode{completion_signatures_of_t>} +\tcode{completion_signatures_of_t>>} contains \tcode{set_stopped_t()}. \end{itemize} @@ -5641,9 +5641,9 @@ namespace std::execution { template struct @\exposidnc{spawn-future-state}@ // \expos - : @\exposid{spawn-future-state-base}@>> { + : @\exposid{spawn-future-state-base}@, env<>>> { using @\exposidnc{sigs-t}@ = // \expos - completion_signatures_of_t<@\exposid{future-spawned-sender}@>; + completion_signatures_of_t<@\exposid{future-spawned-sender}@, env<>>; using @\exposidnc{receiver-t}@ = // \expos @\exposid{spawn-future-receiver}@<@\exposid{sigs-t}@>; using @\exposidnc{op-t}@ = // \expos @@ -6838,8 +6838,7 @@ \tcode{(void(\exposid{sndr}), auto(\exposid{rcvr}))} is potentially-throwing. \item The expression \tcode{get_completion_scheduler(get_env(\exposid{sndr}))} -is potentially-throwing if and only if \exposid{sndr} is potentially-throwing, -has type \exposid{run-loop-scheduler}, and +has type \exposid{run-loop-scheduler} and compares equal to the \exposid{run-loop-\newline scheduler} instance from which \exposid{sndr} was obtained. \end{itemize} @@ -7161,11 +7160,12 @@ \pnum \tcode{as_awaitable} is a customization point object. -For subexpressions \tcode{expr} and \tcode{p} -where \tcode{p} is an lvalue, +For subexpressions \tcode{expr} and \tcode{p}, \tcode{Expr} names the type \tcode{decltype((expr))} and \tcode{Promise} names the type \tcode{decay_t}, -\tcode{as_awaitable(expr, p)} is expression-equivalent to, +\tcode{as_awaitable(expr, p)} is ill-formed if \tcode{p} is not an lvalue, +otherwise \tcode{as_awaitable(expr, p)} is expression-equivalent to +the expression specified below, except that the evaluations of \tcode{expr} and \tcode{p} are indeterminately sequenced: \begin{itemize} diff --git a/source/future.tex b/source/future.tex index 72dbeabbc5..830a7a44c0 100644 --- a/source/future.tex +++ b/source/future.tex @@ -987,6 +987,13 @@ T fetch_@\placeholdernc{key}@(T operand, memory_order order = memory_order::seq_cst) volatile noexcept; T operator @\placeholdernc{op}@=(T operand) volatile noexcept; T* fetch_@\placeholdernc{key}@(ptrdiff_t operand, memory_order order = memory_order::seq_cst) volatile noexcept; +value_type operator++(int) volatile noexcept; +value_type operator--(int) volatile noexcept; +value_type operator++() volatile noexcept; +value_type operator--() volatile noexcept; +void wait(T old, memory_order order = memory_order::seq_cst) const volatile noexcept; +void notify_one() volatile noexcept; +void notify_all() volatile noexcept; \end{codeblock} \rSec2[depr.atomics.nonmembers]{Non-member functions} diff --git a/source/iterators.tex b/source/iterators.tex index ed599d9725..317e6a04cc 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -4339,17 +4339,17 @@ constexpr auto operator<=>(const I& y) const requires @\libconcept{random_access_iterator}@ && @\libconcept{totally_ordered_with}@ && @\libconcept{three_way_comparable_with}@; - template<@\exposconcept{not-a-const-iterator}@ I> - friend constexpr bool operator<(const I& x, const basic_const_iterator& y) + template<@\exposconcept{not-a-const-iterator}@ I, @\libconcept{same_as}@ J> + friend constexpr bool operator<(const I& x, const basic_const_iterator& y) requires @\libconcept{random_access_iterator}@ && @\libconcept{totally_ordered_with}@; - template<@\exposconcept{not-a-const-iterator}@ I> - friend constexpr bool operator>(const I& x, const basic_const_iterator& y) + template<@\exposconcept{not-a-const-iterator}@ I, @\libconcept{same_as}@ J> + friend constexpr bool operator>(const I& x, const basic_const_iterator& y) requires @\libconcept{random_access_iterator}@ && @\libconcept{totally_ordered_with}@; - template<@\exposconcept{not-a-const-iterator}@ I> - friend constexpr bool operator<=(const I& x, const basic_const_iterator& y) + template<@\exposconcept{not-a-const-iterator}@ I, @\libconcept{same_as}@ J> + friend constexpr bool operator<=(const I& x, const basic_const_iterator& y) requires @\libconcept{random_access_iterator}@ && @\libconcept{totally_ordered_with}@; - template<@\exposconcept{not-a-const-iterator}@ I> - friend constexpr bool operator>=(const I& x, const basic_const_iterator& y) + template<@\exposconcept{not-a-const-iterator}@ I, @\libconcept{same_as}@ J> + friend constexpr bool operator>=(const I& x, const basic_const_iterator& y) requires @\libconcept{random_access_iterator}@ && @\libconcept{totally_ordered_with}@; friend constexpr basic_const_iterator operator+(const basic_const_iterator& i, @@ -4704,17 +4704,17 @@ \indexlibrarymember{operator<=}{basic_const_iterator}% \indexlibrarymember{operator>=}{basic_const_iterator}% \begin{itemdecl} -template<@\exposconcept{not-a-const-iterator}@ I> - friend constexpr bool operator<(const I& x, const basic_const_iterator& y) +template<@\exposconcept{not-a-const-iterator}@ I, @\libconcept{same_as}@ J> + friend constexpr bool operator<(const I& x, const basic_const_iterator& y) requires @\libconcept{random_access_iterator}@ && @\libconcept{totally_ordered_with}@; -template<@\exposconcept{not-a-const-iterator}@ I> - friend constexpr bool operator>(const I& x, const basic_const_iterator& y) +template<@\exposconcept{not-a-const-iterator}@ I, @\libconcept{same_as}@ J> + friend constexpr bool operator>(const I& x, const basic_const_iterator& y) requires @\libconcept{random_access_iterator}@ && @\libconcept{totally_ordered_with}@; -template<@\exposconcept{not-a-const-iterator}@ I> - friend constexpr bool operator<=(const I& x, const basic_const_iterator& y) +template<@\exposconcept{not-a-const-iterator}@ I, @\libconcept{same_as}@ J> + friend constexpr bool operator<=(const I& x, const basic_const_iterator& y) requires @\libconcept{random_access_iterator}@ && @\libconcept{totally_ordered_with}@; -template<@\exposconcept{not-a-const-iterator}@ I> - friend constexpr bool operator>=(const I& x, const basic_const_iterator& y) +template<@\exposconcept{not-a-const-iterator}@ I, @\libconcept{same_as}@ J> + friend constexpr bool operator>=(const I& x, const basic_const_iterator& y) requires @\libconcept{random_access_iterator}@ && @\libconcept{totally_ordered_with}@; \end{itemdecl} @@ -4818,7 +4818,7 @@ using pointer = Iterator; using reference = iter_rvalue_reference_t; - constexpr move_iterator(); + constexpr move_iterator() requires @\libconcept{default_initializable}@ = default; constexpr explicit move_iterator(Iterator i); template constexpr move_iterator(const move_iterator& u); template constexpr move_iterator& operator=(const move_iterator& u); @@ -4856,7 +4856,7 @@ noexcept(noexcept(ranges::iter_swap(x.current, y.current))); private: - Iterator current; // \expos + Iterator current = Iterator(); // \expos }; } \end{codeblock} @@ -4912,18 +4912,6 @@ \rSec3[move.iter.cons]{Construction and assignment} -\indexlibraryctor{move_iterator}% -\begin{itemdecl} -constexpr move_iterator(); -\end{itemdecl} - -\begin{itemdescr} -\pnum -\effects -Value-initializes \tcode{current}. -\end{itemdescr} - - \indexlibraryctor{move_iterator}% \begin{itemdecl} constexpr explicit move_iterator(Iterator i); @@ -7274,6 +7262,7 @@ \item \libheaderref{optional} \item \libheaderrefx{regex}{re.syn} \item \libheaderrefx{set}{associative.set.syn} +\item \libheaderref{simd} \item \libheaderref{span} \item \libheaderref{stacktrace} \item \libheaderref{string} diff --git a/source/ranges.tex b/source/ranges.tex index bffc0fde18..f49a3ad6b8 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -2390,7 +2390,7 @@ requires(Container& c, Ref&& ref) { requires (requires { c.emplace_back(std::forward(ref)); } || requires { c.push_back(std::forward(ref)); } || - requires { c.emplace(c.end(), std::forward(ref)); } || + requires { c.emplace_hint(c.end(), std::forward(ref)); } || requires { c.insert(c.end(), std::forward(ref)); }); }; \end{codeblock} @@ -2405,8 +2405,8 @@ c.emplace_back(std::forward(ref)); else if constexpr (requires { c.push_back(declval()); }) c.push_back(std::forward(ref)); - else if constexpr (requires { c.emplace(c.end(), declval()); }) - c.emplace(c.end(), std::forward(ref)); + else if constexpr (requires { c.emplace_hint(c.end(), declval()); }) + c.emplace_hint(c.end(), std::forward(ref)); else c.insert(c.end(), std::forward(ref)); }; @@ -8192,6 +8192,8 @@ ++@\placeholder{current}@; if (@\placeholder{current}@ == end) @\exposid{trailing_empty_}@ = true; + else if constexpr (!@\libconcept{forward_range}@) + @\exposid{trailing_empty_}@ = true; } } else { diff --git a/source/support.tex b/source/support.tex index 70028e6719..53f0e0e95d 100644 --- a/source/support.tex +++ b/source/support.tex @@ -287,9 +287,11 @@ The macro \indexlibraryglobal{NULL}% \tcode{NULL} -is an \impldef{definition of \tcode{NULL}} null pointer constant. +is an \impldef{definition of \tcode{NULL}} null pointer constant +that is a literal\iref{lex.icon,lex.nullptr}. \begin{footnote} Possible definitions include +\tcode{nullptr}, \tcode{0} and \tcode{0L}, @@ -578,8 +580,8 @@ // freestanding, also in \libheader{memory}, \libheader{scoped_allocator}, \libheader{string}, \libheader{deque}, \libheader{forward_list}, \libheader{list}, // \libheader{vector}, \libheader{map}, \libheader{set}, \libheader{unordered_map}, \libheader{unordered_set} #define @\defnlibxname{cpp_lib_any}@ 201606L // also in \libheader{any} -#define @\defnlibxname{cpp_lib_apply}@ 202506L - // freestanding, also in \libheader{tuple}, \libheader{type_traits} +#define @\defnlibxname{cpp_lib_apply}@ 202603L + // freestanding, also in \libheader{tuple}, \libheader{type_traits}, \libheader{meta} #define @\defnlibxname{cpp_lib_array_constexpr}@ 201811L // freestanding, also in \libheader{iterator}, \libheader{array} #define @\defnlibxname{cpp_lib_as_const}@ 201510L // freestanding, also in \libheader{utility} @@ -646,7 +648,7 @@ #define @\defnlibxname{cpp_lib_constexpr_queue}@ 202502L // also in \libheader{queue} #define @\defnlibxname{cpp_lib_constexpr_set}@ 202502L // also in \libheader{set} #define @\defnlibxname{cpp_lib_constexpr_stack}@ 202502L // also in \libheader{stack} -#define @\defnlibxname{cpp_lib_constexpr_string}@ 201907L // also in \libheader{string} +#define @\defnlibxname{cpp_lib_constexpr_string}@ 202511L // also in \libheader{string} #define @\defnlibxname{cpp_lib_constexpr_string_view}@ 201811L // also in \libheader{string_view} #define @\defnlibxname{cpp_lib_constexpr_tuple}@ 201811L // freestanding, also in \libheader{tuple} #define @\defnlibxname{cpp_lib_constexpr_typeinfo}@ 202106L // freestanding, also in \libheader{typeinfo} diff --git a/source/threads.tex b/source/threads.tex index b3a041cf6f..60fbc7b3a6 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -3012,9 +3012,9 @@ \end{note} \pnum -Atomic read-modify-write operations shall always read the last value -(in the modification order) written before the write associated with -the read-modify-write operation. +An atomic read-modify-write operation always reads the value +from the side effect that immediately precedes the side effect of the +read-modify-write operation in the modification order. \pnum An \defnadj{atomic}{modify-write operation} is @@ -4943,6 +4943,11 @@ \end{itemdecl} \begin{itemdescr} +\pnum +\constraints +For the \tcode{volatile} overload of this function, +\tcode{is_always_lock_free} is \tcode{true}. + \pnum \expects \tcode{order} is @@ -4979,6 +4984,11 @@ \end{itemdecl} \begin{itemdescr} +\pnum +\constraints +For the \tcode{volatile} overload of this function, +\tcode{is_always_lock_free} is \tcode{true}. + \pnum \effects Unblocks the execution of at least one atomic waiting operation @@ -5000,6 +5010,11 @@ \end{itemdecl} \begin{itemdescr} +\pnum +\constraints +For the \tcode{volatile} overload of this function, +\tcode{is_always_lock_free} is \tcode{true}. + \pnum \effects Unblocks the execution of all atomic waiting operations @@ -11534,7 +11549,7 @@ \begin{itemdescr} \pnum \effects -Abandons any shared state\iref{futures.state} and then as if +Equivalent to \tcode{promise(std::move(rhs)).swap(*this)}. \pnum @@ -12736,12 +12751,12 @@ \begin{itemdescr} \pnum \effects -\begin{itemize} -\item -Releases any shared state\iref{futures.state}; -\item -calls \tcode{packaged_task(std::move(rhs)).swap(*this)}. -\end{itemize} +Equivalent to +\tcode{packaged_task(std::move(rhs)).swap(*this)}. + +\pnum +\returns +\tcode{*this}. \end{itemdescr} \indexlibrarydtor{packaged_task}% diff --git a/source/time.tex b/source/time.tex index dcbcd38598..85696ba96b 100644 --- a/source/time.tex +++ b/source/time.tex @@ -1015,7 +1015,8 @@ \tcode{C1::is_steady} & \tcode{const bool} & \tcode{true} if \tcode{t1 <= t2} is always \tcode{true} and the time between clock - ticks is constant, otherwise \tcode{false}. \\ \rowsep + ticks is constant, otherwise \tcode{false}. + \tcode{C1::is_steady} shall be usable in constant expressions\iref{expr.const}. \\ \rowsep \tcode{C1::now()} & \tcode{C1::time_point} & diff --git a/source/utilities.tex b/source/utilities.tex index f3e66eb429..bd62dc699a 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -2463,7 +2463,8 @@ \pnum \effects -Equivalent to the preceding constructors except that each element is constructed with +Equivalent to the preceding constructors +except that each element of non-reference type is constructed with uses-allocator construction\iref{allocator.uses.construction}. \end{itemdescr}