This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112c. See for the official list.


840. Rvalue references as nontype template parameters

Section: 13.2  [temp.param]     Status: CD2     Submitter: Steve Adamczyk     Date: 13 March, 2009

[Voted into WP at October, 2009 meeting.]

Nontype template parameters are currently allowed to have rvalue reference type (13.2 [temp.param] bullet 4.3 just says “reference,” not “lvalue reference”). However, with the change of N2844 voted in (which prohibits rvalue references from binding to lvalues), I can't think of any way to specify a valid template argument for a parameter of rvalue reference type. If that's the case, should we restrict nontype template parameters to lvalue reference types?

Proposed resolution (July, 2009):

Change 13.2 [temp.param] paragraph 4, bullet 3 as follows: