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


1904. Default template arguments for members of class templates

Section: 13.2  [temp.param]     Status: NAD     Submitter: John Spicer     Date: 2014-03-27

According to 13.2 [temp.param] paragraph 9,

A default template-argument shall not be specified in the template-parameter-lists of the definition of a member of a class template that appears outside of the member's class.

This presumably is intended to apply to the parameters of the containing class template, not to the parameters of a member template, but the wording should be clarified. (Default arguments are permitted for a template member of a non-template class, and there does not appear to be a good rationale for treating members of a class template differently in this regard.)

Rationale (June, 2014):

CWG felt that the existing wording os clear enough.