Skip to content

Commit 1c45cff

Browse files
committed
move definition of with_error and change_coroutine_scheduler to synopsis
1 parent 7361f74 commit 1c45cff

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
@@ -719,11 +719,23 @@
719719
// \ref{exec.task.scheduler}
720720
class @\libglobal{task_scheduler}@;
721721

722-
// \ref{exec.task}
723722
template<class E>
724-
struct @\libglobal{with_error}@;
723+
struct @\libglobal{with_error}@ {
724+
using type = remove_cvref_t<E>;
725+
type error;
726+
};
727+
template<class E>
728+
with_error(E) -> with_error<E>;
729+
725730
template<@\libconcept{scheduler}@ Sch>
726-
struct @\libglobal{change_coroutine_scheduler}@;
731+
struct change_coroutine_scheduler {
732+
using type = remove_cvref_t<Sch>;
733+
type scheduler;
734+
};
735+
template<@\libconcept{scheduler}@ Sch>
736+
change_coroutine_scheduler(Sch) -> change_coroutine_scheduler<Sch>;
737+
738+
// \ref{exec.task}
727739
template<class T, class Environment>
728740
class @\libglobal{task}@;
729741
}
@@ -6242,22 +6254,6 @@
62426254

62436255
\begin{codeblock}
62446256
namespace std::execution {
6245-
template<class E>
6246-
struct @\libglobal{with_error}@ {
6247-
using type = remove_cvref_t<E>;
6248-
type error;
6249-
};
6250-
template<class E>
6251-
with_error(E) -> with_error<E>;
6252-
6253-
template<@\libconcept{scheduler}@ Sch>
6254-
struct change_coroutine_scheduler {
6255-
using type = remove_cvref_t<Sch>;
6256-
type scheduler;
6257-
};
6258-
template<@\libconcept{scheduler}@ Sch>
6259-
change_coroutine_scheduler(Sch) -> change_coroutine_scheduler<Sch>;
6260-
62616257
template<class T, class Environment>
62626258
class task<T, Environment>::promise_type {
62636259
public:

0 commit comments

Comments
 (0)