CWG Issue 1922 (original) (raw)
This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-11-05
1922. Injected class template names and default arguments
Section: 13.8.2 [temp.local]Status: CD4Submitter: Hubert TongDate: 2014-05-05
[Moved to DR at the May, 2015 meeting.]
Use of the injected-class-name of a class template with a_template-argument-list_ that relies on default arguments is not clearly specified in the current wording of the Standard. In particular, according to 13.2 [temp.param] paragraph 10,
The set of default _template-argument_s available for use with a template declaration or definition is obtained by merging the default arguments from the definition (if in scope) and all declarations in scope in the same way default function arguments are (9.3.4.7 [dcl.fct.default]).
However, the injected-class-name hides the template declarations, so it is not clear whether the default arguments are available at that point or not.
Proposed resolution (November, 2014):
Change 13.2 [temp.param] paragraph 10 as follows:
The set of default _template-argument_s available for use
with a template declaration or definitionis obtained by merging the default arguments fromthe definition (if in scope) andall priordeclarationsin scopeof the templatein the same way default function arguments are (9.3.4.7 [dcl.fct.default]). [Example:...