A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/CWG/issues/2081.html below:

CWG Issue 2081

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

2081. Deduced return type in redeclaration or specialization of function templateSection: 9.2.9.7  [dcl.spec.auto]     Status: CD5     Submitter: John Spicer     Date: 2015-02-05

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

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:

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