Title
Query objects must be default constructible
Status
new
Section
[exec.queryable.general]
Submitter
Eric Niebler

Created on 2025-05-07.00:00:00 last changed 2 weeks ago

Messages

Date: 2025-05-18.09:48:20

Proposed resolution:

This wording is relative to N5008.

  1. Modify [exec.queryable.general] as indicated:

    -1- A queryable object is a read-only collection of key/value pair where each key is a customization point object known as a query object. The type of a query object satisfies `default_initializable`, and its default constructor is not potentially throwing. A query is an invocation of a query object with a queryable object as its first argument and a (possibly empty) set of additional arguments. A query imposes syntactic and semantic requirements on its invocations.

Date: 2025-05-07.00:00:00

Imported from cplusplus/sender-receiver #333.

We require the types of query objects such as `get_scheduler` to be customization point objects. [customization.point.object] requires them to be `semiregular` but that concept does not require default constructability. Much of `std::execution` assumes query object types to be default constructible.

I propose adding a (nothrow) default-constructibility requirement.

History
Date User Action Args
2025-05-18 09:48:20adminsetmessages: + msg14757
2025-05-07 00:00:00admincreate