File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed
Expand file tree Collapse file tree 1 file changed +58
-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 =" 4200" status =" New" >
5+ <title >The `operation_state` concept can be simplified</title >
6+ <section ><sref ref =" [exec.opstate.general]" /></section >
7+ <submitter >Eric Niebler</submitter >
8+ <date >03 Feb 2025</date >
9+ <priority >99</priority >
10+
11+ <discussion >
12+ <p >
13+ Imported from <a href =" https://github.com/cplusplus/sender-receiver/issues/312" >cplusplus/sender-receiver #312</a >.
14+ </p >
15+ <p >
16+ The current defn of the `operation_state` concept is:
17+
18+ <pre ><code >
19+ template< class O>
20+ concept operation_state =
21+ derived_from< typename O::operation_state_concept, operation_state_t> &&
22+ requires (O& o) {
23+ { start(o) } noexcept;
24+ };
25+ </code ></pre >
26+
27+ I think the <code >is_object_v< O> </code > constraint is not needed
28+ because the <code >derived_from</code > constraint has already established that
29+ <code >O</code > is a class type.
30+ </p >
31+ <p >
32+ And `start(o)` is always `noexcept` now that `start` mandates the
33+ `noexcept`-ness of `op.start()`.
34+ </p >
35+ </discussion >
36+
37+ <resolution >
38+ <p >
39+ This wording is relative to <paper num =" N5001" />.
40+ </p >
41+ <ol >
42+ <li >
43+ Modify <sref ref =" [exec.opstate.general]" /> as indicated:
44+ <blockquote ><pre ><code >
45+ template< class O>
46+ concept operation_state =
47+ derived_from< typename O::operation_state_concept, operation_state_t> &&
48+ <del >is_object_v< O> && </del >
49+ requires (O& o) {
50+ <del >{</del > start(o) <del >} noexcept;</del >
51+ };
52+ </code ></pre ></blockquote >
53+ </li >
54+ </ol >
55+
56+ </resolution >
57+
58+ </issue >
You can’t perform that action at this time.
0 commit comments