Skip to content

Commit f9f91cf

Browse files
committed
New issue from Eric Niebler: "Query objects must be default constructible"
1 parent 8b67487 commit f9f91cf

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

xml/issue4260.xml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4260" status="New">
5+
<title>Query objects must be default constructible</title>
6+
<section><sref ref="[exec.queryable.general]"/></section>
7+
<submitter>Eric Niebler</submitter>
8+
<date>7 May 2025</date>
9+
<priority>99</priority>
10+
11+
<discussion>
12+
<p>
13+
Imported from <a href="https://github.com/cplusplus/sender-receiver/issues/333">cplusplus/sender-receiver #333</a>.
14+
<p/>
15+
We require the types of query objects such as `get_scheduler` to be customization point objects.
16+
<sref ref="[customization.point.object]"/> requires them to be `semiregular` but that concept
17+
does not require default constructability. Much of `std::execution` assumes query object types
18+
to be default constructible.
19+
<p/>
20+
I propose adding a (nothrow) default-constructibility requirement.
21+
</p>
22+
</discussion>
23+
24+
<resolution>
25+
<p>
26+
This wording is relative to <paper num="N5008"/>.
27+
</p>
28+
<ol>
29+
30+
<li><p>Modify <sref ref="[exec.queryable.general]"/> as indicated:</p>
31+
32+
<blockquote>
33+
<p>
34+
-1- A <i>queryable object</i> is a read-only collection of key/value pair where each key is a
35+
customization point object known as a <i>query object</i>.
36+
<ins>The type of a query object satisfies `default_initializable`, and its default constructor
37+
is not potentially throwing.</ins>
38+
A <i>query</i> is an invocation of a query object with a queryable object as its first
39+
argument and a (possibly empty) set of additional arguments.
40+
A query imposes syntactic and semantic requirements on its invocations.
41+
</p>
42+
</blockquote>
43+
</li>
44+
</ol>
45+
</resolution>
46+
47+
</issue>

0 commit comments

Comments
 (0)