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

2025-01-10


2983. Non-type template parameters are not variables

Section: 6.1  [basic.pre]     Status: open     Submitter: Richard Smith     Date: 2025-01-09

Subclause 6.1 [basic.pre] paragraph 6 specifies:

A variable is introduced by the declaration of a reference other than a non-static data member or of an object. The variable's name, if any, denotes the reference or object.

Does this mean that non-type template parameters of class type are variables? Better not.

Possible resolution:

Change in 6.1 [basic.pre] paragraph 6 as follows:

A non-template-parameter declaration is a declaration that is not a type-parameter or parameter-declaration of a template-parameter. A variable is introduced by the non-template-parameter declaration of a reference other than a non-static data member or of an object. The variable's name, if any, denotes the reference or object.