Skip to content

Commit fb01400

Browse files
eisenwavetkoeppe
authored andcommitted
LWG4349 task is not actually started lazily
Fixes NB US 258-381 (C++26 CD).
1 parent 4b735c8 commit fb01400

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

source/exec.tex

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7423,7 +7423,7 @@
74237423

74247424
task get_return_object() noexcept;
74257425

7426-
auto initial_suspend() noexcept;
7426+
static constexpr suspend_always @\libmember{initial_suspend}{task::promise_type}@() noexcept { return {}; }
74277427
auto final_suspend() noexcept;
74287428

74297429
void uncaught_exception();
@@ -7509,22 +7509,6 @@
75097509
\tcode{coroutine_handle<promise_type>::\brk{}from_promise\brk{}(*this)}.
75107510
\end{itemdescr}
75117511

7512-
\indexlibrarymember{initial_suspend}{task::promise_type}%
7513-
\begin{itemdecl}
7514-
auto initial_suspend() noexcept;
7515-
\end{itemdecl}
7516-
\begin{itemdescr}
7517-
\pnum
7518-
\returns
7519-
An awaitable object of unspecified type\iref{expr.await} whose
7520-
member functions arrange for
7521-
\begin{itemize}
7522-
\item the calling coroutine to be suspended,
7523-
\item the coroutine to be resumed on an execution agent of the
7524-
execution resource associated with \tcode{\exposid{SCHED}(*this)}.
7525-
\end{itemize}
7526-
\end{itemdescr}
7527-
75287512
\indexlibrarymember{final_suspend}{task::promise_type}%
75297513
\begin{itemdecl}
75307514
auto final_suspend() noexcept;

0 commit comments

Comments
 (0)