This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-08-11
2831. Non-templated function definitions and requires-clausesSection: 9.3.1 [dcl.decl.general] Status: DRWP Submitter: Krystian Stasiowski Date: 2020-04-13[Accepted as a DR at the March, 2024 meeting.]
(From editorial issue 3936.)
Subclause 9.3.1 [dcl.decl.general] paragraph 4 specifies:
The optional requires-clause in an init-declarator or member-declarator shall be present only if the declarator declares a templated function (13.1 [temp.pre]). ...
This rule does not address function definitions, because those have neither an init-declarator nor a member-declarator.
Proposed resolution (approved by CWG 2024-03-20):
Change in 9.6.1 [dcl.fct.def.general] paragraph 1 as follows:
... The optional attribute-specifier-seq in a function-definition appertains to the function. A virt-specifier-seq can be part of a function-definition only if it is function-definition with a virt-specifier-seq shall be a member-declaration (11.4 [class.mem]). A function-definition with a requires-clause shall define a templated function.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4