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

2023-01-15


773. Parentheses in address non-type template arguments

Section: 13.4.3  [temp.arg.nontype]     Status: C++11     Submitter: Doug Gregor     Date: 11 February, 2009

[Voted into WP at August, 2010 meeting.]

According to 13.4.3 [temp.arg.nontype] paragraph 1, bullet 3, one of the acceptable forms of a non-type, non-template template argument is:

the address of an object or function... expressed as & id-expression where the & is optional if the name refers to a function or array, or if the corresponding template-parameter is a reference

It is not clear from this whether a template argument like (&i) satisfies the requirement or not.

Notes from the March, 2009 meeting:

The consensus of the CWG was that the parentheses should be allowed.

Proposed resolution (February, 2010):

Change 13.4.3 [temp.arg.nontype] bullet 1.3 as follows:

[Drafting note: The change requiring the omission of the & in the reference case fixes an existing problem that is not related to this issue.]