Created on 2022-01-25.00:00:00 last changed 16 months ago
Proposed resolution (approved by CWG 2023-02-09):
Change in 3.50 [defns.signature.friend] as follows:
signature
<function template>
name, parameter-type-list, enclosing namespace, return type, signature of the template-head, and trailing requires-clause (if any)
Change in 3.51 [defns.signature.templ] as follows:
signature
<friend function template with constraint involving enclosing template parameters>
name, parameter-type-list, return type, enclosing class, signature of the template-head, and trailing requires-clause (if any)
Change in 3.54 [defns.signature.member] as follows:
signature
<class member function template>
name, parameter-type-list, class of which the function is a member, cv-qualifiers (if any), ref-qualifier (if any), return type (if any), signature of the template-head, and trailing requires-clause (if any)
Add a new section in Clause 3 [intro.defs] as follows:
signature
<template-head>
template parameter list, excluding template parameter names and default arguments, and requires-clause (if any)
CWG 2022-11-11
CWG agrees with the suggested direction.
[Accepted as a DR at the February, 2023 meeting.]
According to 3.51 [defns.signature.templ], the signature of a function template includes:
name, parameter-type-list, enclosing namespace, return type, template-head, and trailing requires-clause (if any)
The mention of the template-head is a change from previous versions of the Standard, which referred to the “template parameter list”, in order to include the requires-clause in the signature. However, template-head is a syntactic nonterminal and thus includes everything in that production, including default template arguments. It seems undesirable to make the default arguments part of the template signature.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-07-16 13:00:43 | admin | set | status: open -> c++23 |
2023-07-16 13:00:43 | admin | set | status: dr -> open |
2023-02-18 18:43:04 | admin | set | status: ready -> dr |
2023-02-10 23:01:52 | admin | set | status: tentatively ready -> ready |
2023-02-10 00:25:18 | admin | set | status: review -> tentatively ready |
2023-02-07 14:43:26 | admin | set | messages: + msg7166 |
2022-11-20 07:54:16 | admin | set | messages: + msg7047 |
2022-11-20 07:54:16 | admin | set | status: open -> review |
2022-01-25 00:00:00 | admin | create |