Title
Deduced return type in redeclaration or specialization of function template
Status
cd5
Section
9.2.9.7 [dcl.spec.auto]
Submitter
John Spicer

Created on 2015-02-05.00:00:00 last changed 47 months ago

Messages

Date: 2017-11-15.00:00:00

Proposed resolution (November, 2017)

Change 9.2.9.7 [dcl.spec.auto] paragraph 11 as follows:

Redeclarations or specializations of a function or function template with a declared return type that uses a placeholder type shall also use that placeholder, not a deduced type. Similarly, redeclarations or specializations of a function or function template with a declared return type that does not use a placeholder type shall not use a placeholder. [Example:
Date: 2018-03-15.00:00:00

[Accepted as a DR at the March, 2018 (Jacksonville) meeting.]

9.2.9.7 [dcl.spec.auto] paragraph 13 says,

Redeclarations or specializations of a function or function template with a declared return type that uses a placeholder type shall also use that placeholder, not a deduced type.

The inverse should also be true (a specialization cannot use a placeholder type if the template used a non-placeholder), but this is not said explicitly.

History
Date User Action Args
2020-12-15 00:00:00adminsetstatus: dr -> cd5
2018-04-11 00:00:00adminsetstatus: tentatively ready -> dr
2018-02-27 00:00:00adminsetmessages: + msg5858
2018-02-27 00:00:00adminsetstatus: drafting -> tentatively ready
2015-02-05 00:00:00admincreate