Skip to content

Commit 79d1725

Browse files
dietmarkuehltkoeppe
authored andcommitted
[execution.syn, task.promise] Move class definitions to synopsis
The definitions of with_error and change_coroutine_scheduler are now in the main <execution> synopsis.
1 parent 9261edd commit 79d1725

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

source/exec.tex

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -745,11 +745,23 @@
745745
// \ref{exec.task.scheduler}
746746
class @\libglobal{task_scheduler}@;
747747

748-
// \ref{exec.task}
749748
template<class E>
750-
struct @\libglobal{with_error}@;
749+
struct @\libglobal{with_error}@ {
750+
using type = remove_cvref_t<E>;
751+
type error;
752+
};
753+
template<class E>
754+
with_error(E) -> with_error<E>;
755+
751756
template<@\libconcept{scheduler}@ Sch>
752-
struct @\libglobal{change_coroutine_scheduler}@;
757+
struct change_coroutine_scheduler {
758+
using type = remove_cvref_t<Sch>;
759+
type scheduler;
760+
};
761+
template<@\libconcept{scheduler}@ Sch>
762+
change_coroutine_scheduler(Sch) -> change_coroutine_scheduler<Sch>;
763+
764+
// \ref{exec.task}
753765
template<class T, class Environment>
754766
class @\libglobal{task}@;
755767
}
@@ -7464,22 +7476,6 @@
74647476

74657477
\begin{codeblock}
74667478
namespace std::execution {
7467-
template<class E>
7468-
struct @\libglobal{with_error}@ {
7469-
using type = remove_cvref_t<E>;
7470-
type error;
7471-
};
7472-
template<class E>
7473-
with_error(E) -> with_error<E>;
7474-
7475-
template<@\libconcept{scheduler}@ Sch>
7476-
struct change_coroutine_scheduler {
7477-
using type = remove_cvref_t<Sch>;
7478-
type scheduler;
7479-
};
7480-
template<@\libconcept{scheduler}@ Sch>
7481-
change_coroutine_scheduler(Sch) -> change_coroutine_scheduler<Sch>;
7482-
74837479
template<class T, class Environment>
74847480
class task<T, Environment>::promise_type {
74857481
public:

0 commit comments

Comments
 (0)