This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
[exec.queryable.concept]
# 33 Execution control library [[exec]](./#exec)
## 33.2 Queries and queryables [[exec.queryable]](exec.queryable#concept)
### 33.2.2 queryable concept [exec.queryable.concept]
namespace std {template<class T>concept [*queryable*](#concept:queryable "33.2.2queryable concept[exec.queryable.concept]") = [destructible](concept.destructible#concept:destructible "18.4.10Concept destructible[concept.destructible]")<T>; // *exposition only*}
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L159)
The exposition-only [*queryable*](#concept:queryable "33.2.2queryable concept[exec.queryable.concept]") concept specifies
the constraints on the types of queryable objects[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L163)
Let env be an object of type Env[.](#2.sentence-1)
The type Env models [*queryable*](#concept:queryable "33.2.2queryable concept[exec.queryable.concept]") if for each callable object q and a pack of subexpressions args,
if requires { q(env, args...) } is true thenq(env, args...) meets any semantic requirements imposed by q[.](#2.sentence-2)

View File

@@ -0,0 +1,62 @@
[exec.queryable.general]
# 33 Execution control library [[exec]](./#exec)
## 33.2 Queries and queryables [[exec.queryable]](exec.queryable#general)
### 33.2.1 General [exec.queryable.general]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L115)
A [*queryable object*](#def:object,queryable "33.2.1General[exec.queryable.general]") is
a read-only collection of key/value pair
where each key is a customization point object known as a [*query object*](#def:query_object "33.2.1General[exec.queryable.general]")[.](#1.sentence-1)
A [*query*](#def:query "33.2.1General[exec.queryable.general]") is an invocation of a query object
with a queryable object as its first argument and
a (possibly empty) set of additional arguments[.](#1.sentence-2)
A query imposes syntactic and semantic requirements on its invocations[.](#1.sentence-3)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L124)
Let q be a query object,
let args be a (possibly empty) pack of subexpressions,
let env be a subexpression
that refers to a queryable object o of type O, and
let cenv be a subexpression referring to o such that decltype((cenv)) is const O&[.](#2.sentence-1)
The expression q(env, args...) is equal to ([[concepts.equality]](concepts.equality "18.2Equality preservation"))
the expression q(cenv, args...)[.](#2.sentence-2)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L134)
The type of a query expression cannot be void[.](#3.sentence-1)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L137)
The expression q(env, args...) is
equality-preserving ([[concepts.equality]](concepts.equality "18.2Equality preservation")) and
does not modify the query object or the arguments[.](#4.sentence-1)
[5](#5)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L142)
If the expression env.query(q, args...) is well-formed,
then it is expression-equivalent to q(env, args...)[.](#5.sentence-1)
[6](#6)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L146)
Unless otherwise specified,
the result of a query is valid as long as the queryable object is valid[.](#6.sentence-1)