P3822R1 — Conditional noexcept specifiers in compound requirements
(2 items)
EWG
This paper proposes extending compound requirements in requires-expressions to support conditional noexcept specifiers, allowing the syntax `{ expression } noexcept(constant-expression)`. This eliminates the need to duplicate requires-expressions when noexcept checking must be applied conditionally based on a template parameter, bringing compound requirements into consistency with function declarations, which have supported conditional noexcept since C++11.
- Section 1 (Introduction) — The syntax sketch uses the nonterminal return-type-constraint, which is not a grammar production in the C++ standard or in this paper; the paper's own Sections 5 and 7 define the production as return-type-requirement (which expands to -> type-constraint). The introduction should use either -> type-constraint or return-type-requirement (without the redundant ->). [1]
References — Anthropic Citations API
[1]
"The proposed syntax for this is `requires { { expression } noexcept(constant-expression) -> return-type-constraint; }`"
"The proposed syntax for this is `requires { { expression } noexcept(constant-expression) -> return-type-constraint; }`"
Summary: Proposes extending compound requirements in requires-expressions to allow a conditional noexcept specifier (noexcept(expr)), enabling concept authors to constrain both the return type and the noexcept status of an expression in a single compound requirement.
Pipeline: Discovery (Anthropic Opus + Citations API) → Verification Gate (OpenRouter Opus) → Report Writer (OpenRouter Opus)
Provenance: All references are machine-verified character positions from the Anthropic Citations API — deterministic, exact substrings, not model-generated quotes.
Provenance: All references are machine-verified character positions from the Anthropic Citations API — deterministic, exact substrings, not model-generated quotes.