Skip to content

Commit 5a33c8e

Browse files
committed
P2300R10 std::execution
1 parent 6d67d20 commit 5a33c8e

File tree

4 files changed

+63
-1
lines changed

4 files changed

+63
-1
lines changed

source/exceptions.tex

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,27 @@
10841084
\item%
10851085
when a call to a \tcode{wait()}, \tcode{wait_until()}, or \tcode{wait_for()}
10861086
function on a condition variable\iref{thread.condition.condvar,thread.condition.condvarany}
1087-
fails to meet a postcondition.
1087+
fails to meet a postcondition, or
1088+
1089+
\item%
1090+
when a callback invocation exits via an exception
1091+
when requesting stop on
1092+
a \tcode{std::stop_source} or
1093+
a \tcode{std::in\-place_stop_source}\iref{stopsource.mem,stopsource.inplace.mem},
1094+
or in the constructor of
1095+
\tcode{std::stop_callback} or
1096+
\tcode{std::inplace_stop_callback}\iref{stopcallback.cons,stopcallback.inplace.cons}
1097+
when a callback invocation exits via an exception, or
1098+
1099+
\item%
1100+
when a \tcode{run_loop} object is destroyed
1101+
that is still in the \tcode{running} state\iref{exec.run.loop}, or
1102+
1103+
\item%
1104+
when \tcode{unhandled_stopped} is called on
1105+
a \tcode{with_awaitable_senders<T>} object\iref{exec.with.awaitable.senders}
1106+
whose continuation is not a handle to a coroutine
1107+
whose promise type has an \tcode{unhandled_stopped} member function.
10881108

10891109
\end{itemize}
10901110

source/lib-intro.tex

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,14 @@
525525
}
526526
\end{codeblock}
527527

528+
\pnum
529+
An object \tcode{dst} is said to be \defn{decay-copied from}
530+
a subexpression \tcode{src}
531+
if the type of \tcode{dst} is
532+
\begin{codeblock}
533+
decay_t<decltype((src))>
534+
\end{codeblock} and \tcode{dst} is copy-initialized from \tcode{src}.
535+
528536
\rSec3[type.descriptions]{Type descriptions}
529537

530538
\rSec4[type.descriptions.general]{General}
@@ -2850,6 +2858,22 @@
28502858
\end{codeblock}
28512859
\end{example}
28522860

2861+
\pnum
2862+
The following exposition-only concept defines
2863+
the minimal requirements on an Allocator type.
2864+
\begin{codeblock}
2865+
template<class Alloc>
2866+
concept @\defexposconcept{simple-allocator}@ =
2867+
requires(Alloc alloc, size_t n) {
2868+
{ *alloc.allocate(n) } -> @\libconcept{same_as}@<typename Alloc::value_type&>;
2869+
{ alloc.deallocate(alloc.allocate(n), n) };
2870+
} &&
2871+
@\libconcept{copy_constructible}@<Alloc> &&
2872+
@\libconcept{equality_comparable}@<Alloc>;
2873+
\end{codeblock}
2874+
A type \tcode{Alloc} models \exposconcept{simple-allocator}
2875+
if it meets the requirements of \ref{allocator.requirements.general}.
2876+
28532877
\rSec4[allocator.requirements.completeness]{Allocator completeness requirements}
28542878

28552879
\pnum

source/support.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,7 @@
765765
#define @\defnlibxname{cpp_lib_saturation_arithmetic}@ 202311L // also in \libheader{numeric}
766766
#define @\defnlibxname{cpp_lib_scoped_lock}@ 201703L // also in \libheader{mutex}
767767
#define @\defnlibxname{cpp_lib_semaphore}@ 201907L // also in \libheader{semaphore}
768+
#define @\defnlibxname{cpp_lib_senders}@ 202406L // also in \libheader{execution}
768769
#define @\defnlibxname{cpp_lib_shared_mutex}@ 201505L // also in \libheader{shared_mutex}
769770
#define @\defnlibxname{cpp_lib_shared_ptr_arrays}@ 201707L // also in \libheader{memory}
770771
#define @\defnlibxname{cpp_lib_shared_ptr_weak_type}@ 201606L // also in \libheader{memory}

source/utilities.tex

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10755,6 +10755,23 @@
1075510755
struct greater_equal; // freestanding
1075610756
struct less_equal; // freestanding
1075710757
}
10758+
10759+
template<class Fn, class... Args>
10760+
concept @\defexposconcept{callable}@ = // \expos
10761+
requires (Fn&& fn, Args&&... args) {
10762+
std::forward<Fn>(fn)(std::forward<Args>(args)...);
10763+
};
10764+
template<class Fn, class... Args>
10765+
concept @\defexposconcept{nothrow-callable}@ = // \expos
10766+
\exposconcept{callable}<Fn, Args...> &&
10767+
requires (Fn&& fn, Args&&... args) {
10768+
{ std::forward<Fn>(fn)(std::forward<Args>(args)...) } noexcept;
10769+
};
10770+
template<class Fn, class... Args>
10771+
using @\exposid{call-result-t}@ = decltype(declval<Fn>()(declval<Args>()...)); // \expos
10772+
10773+
template<const auto& T>
10774+
using @\exposid{decayed-typeof}@ = decltype(auto(T)); // \expos
1075810775
}
1075910776
\end{codeblock}
1076010777

0 commit comments

Comments
 (0)