|
745 | 745 | // \ref{exec.task.scheduler}
|
746 | 746 | class @\libglobal{task_scheduler}@;
|
747 | 747 |
|
748 |
| - // \ref{exec.task} |
749 | 748 | 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 | + |
751 | 756 | 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} |
753 | 765 | template<class T, class Environment>
|
754 | 766 | class @\libglobal{task}@;
|
755 | 767 | }
|
|
7447 | 7459 |
|
7448 | 7460 | \begin{codeblock}
|
7449 | 7461 | namespace std::execution {
|
7450 |
| - template<class E> |
7451 |
| - struct @\libglobal{with_error}@ { |
7452 |
| - using type = remove_cvref_t<E>; |
7453 |
| - type error; |
7454 |
| - }; |
7455 |
| - template<class E> |
7456 |
| - with_error(E) -> with_error<E>; |
7457 |
| - |
7458 |
| - template<@\libconcept{scheduler}@ Sch> |
7459 |
| - struct change_coroutine_scheduler { |
7460 |
| - using type = remove_cvref_t<Sch>; |
7461 |
| - type scheduler; |
7462 |
| - }; |
7463 |
| - template<@\libconcept{scheduler}@ Sch> |
7464 |
| - change_coroutine_scheduler(Sch) -> change_coroutine_scheduler<Sch>; |
7465 |
| - |
7466 | 7462 | template<class T, class Environment>
|
7467 | 7463 | class task<T, Environment>::promise_type {
|
7468 | 7464 | public:
|
|
0 commit comments