Title
Literal types with constexpr conversions as non-type template arguments
Status
cd2
Section
13.4.3 [temp.arg.nontype]
Submitter
FR

Created on 2009-03-03.00:00:00 last changed 144 months ago

Messages

Date: 2010-03-15.00:00:00

[Voted into WP at March, 2010 meeting.]

Date: 2009-10-15.00:00:00

Proposed resolution (October, 2009):

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

  • an integral constant expression (including a constant expression of literal class type that can be used as an integral constant expression as described in 7.7 [expr.const]); or
Date: 2009-03-15.00:00:00

Notes from the March, 2009 meeting:

The original national body comment suggested allowing any literal type as a non-type template argument. The CWG was not in favor of this change, but in the course of discussing the suggestion discovered the problem with template-parameters of integral and enumeration type.

Date: 2009-03-03.00:00:00
N2800 comment FRĀ 29

7.7 [expr.const] permits literal types with a constexpr conversion function to an integral type to be used in an integral constant expression. However, such conversions are not listed in 13.4.3 [temp.arg.nontype] paragraph 5 bullet 1 among the conversions applied to template-arguments for a non-type template-parameter of integral or enumeration type.

History
Date User Action Args
2010-03-29 00:00:00adminsetmessages: + msg2732
2010-03-29 00:00:00adminsetstatus: ready -> cd2
2009-11-08 00:00:00adminsetmessages: + msg2374
2009-11-08 00:00:00adminsetstatus: drafting -> ready
2009-08-03 00:00:00adminsetstatus: open -> drafting
2009-03-23 00:00:00adminsetmessages: + msg2003
2009-03-03 00:00:00admincreate