|
719 | 719 | // \ref{exec.task.scheduler}
|
720 | 720 | class @\libglobal{task_scheduler}@;
|
721 | 721 |
|
722 |
| - // \ref{exec.task} |
723 | 722 | 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 | + |
725 | 730 | 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} |
727 | 739 | template<class T, class Environment>
|
728 | 740 | class @\libglobal{task}@;
|
729 | 741 | }
|
|
6242 | 6254 |
|
6243 | 6255 | \begin{codeblock}
|
6244 | 6256 | 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 |
| - |
6261 | 6257 | template<class T, class Environment>
|
6262 | 6258 | class task<T, Environment>::promise_type {
|
6263 | 6259 | public:
|
|
0 commit comments