File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ <?xml version =' 1.0' encoding =' utf-8' standalone =' no' ?>
2+ <!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+ <issue num =" 4454" status =" New" >
5+ <title >`assert` should forbid `co_await` and `co_yield`</title >
6+ <section ><sref ref =" [assertions.assert]" /></section >
7+ <submitter >Jonathan Wakely</submitter >
8+ <date >06 Nov 2025</date >
9+ <priority >1</priority >
10+
11+ <discussion >
12+ <b >Addresses <a href =" https://github.com/cplusplus/nbballot/issues/708" >GB 05-129</a ></b >
13+ <p >
14+ The new implementation of `assert` introduced by <paper num =" P2264R7" />
15+ might require something like `sizeof(bool(__VA_ARGS__))`.
16+ Using something like `assert((co_yield 1, true))` would be ill-formed
17+ if the implementation of `assert` uses `sizeof`, because `co_yield` cannot
18+ appear in an unevaluated context.
19+ </p >
20+ <p >
21+ The specification for `assert` should forbid using any constructs which
22+ are not valid in unevaluated contexts, unless we are certain that the
23+ new `assert` requirements can be implemented without such tricks using
24+ unevaluated contexts. "Ill-formed; no diagnostic required" seems appropriate.
25+ </p >
26+ </discussion >
27+
28+ <resolution >
29+ <p >
30+ </p >
31+ </resolution >
32+
33+ </issue >
You can’t perform that action at this time.
0 commit comments