Title
Non-templated function definitions and requires-clauses
Status
drwp
Section
9.3.1 [dcl.decl.general]
Submitter
Krystian Stasiowski

Created on 2020-04-13.00:00:00 last changed 4 months ago

Messages

Date: 2024-03-20.07:40:30

Proposed resolution (approved by CWG 2024-03-20):

Change in 9.5.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.
Date: 2024-03-15.00:00:00

[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.

History
Date User Action Args
2024-07-20 13:52:34adminsetstatus: dr -> drwp
2024-04-05 21:43:46adminsetstatus: ready -> dr
2024-03-20 07:41:34adminsetstatus: tentatively ready -> ready
2024-01-21 13:30:12adminsetmessages: + msg7574
2024-01-21 13:30:12adminsetstatus: open -> tentatively ready
2020-04-13 00:00:00admincreate