This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 114a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-04-18


2060. Deduced return type for explicit specialization

Section: 9.2.9.7  [dcl.spec.auto]     Status: NAD     Submitter: John Spicer     Date: 2014-12-15

The Standard does not indicate whether an explicit specialization of a function template can have a deduced return type. It seems a bit too much to require parsing the entire function body in order to tell which template is being specialized. In extreme cases, that could mean deferring access checks for the entire body of the function.

Rationale (May, 2015):

An explicit specialization with a deduced return type can only match a template declared with a deduced return type, so the actual return type is not needed in order to match the explicit specialization with the template being specialized.