Title
Type equivalence and unsigned overflow
Status
cd1
Section
13.6 [temp.type]
Submitter
James Widman

Created on 2006-11-03.00:00:00 last changed 196 months ago

Messages

Date: 2007-04-15.00:00:00

[Voted into WP at April, 2007 meeting as part of paper N2258.]

Date: 2007-04-15.00:00:00

Proposed resolution (April, 2007):

The change to 13.6 [temp.type] paragraph 1 shown in document J16/07-0118 = WG21 N2258, in which the syntactic non-terminal template-argument is changed to the English term “template argument” is sufficient to remove the confusion about whether the value before or after conversion is used in matching template-ids.

Date: 2006-11-03.00:00:00

One of the requirements for two template-ids to refer to the same class or function (13.6 [temp.type] paragraph 1) is that

  • their corresponding non-type template-arguments of integral or enumeration type have identical values

If we have some template of the form

  template <unsigned char c> struct A;

does this imply that A<'\001'> and A<257> (for an eight-bit char) refer to different specializations?

Jens Maurer: Looks like it should say something like, “their corresponding converted non-type template arguments of integral or enumeration type have identical values.”

History
Date User Action Args
2008-10-05 00:00:00adminsetstatus: wp -> cd1
2008-08-25 00:00:00adminsetmessages: + msg1760
2008-08-25 00:00:00adminsetstatus: review -> wp
2007-05-06 00:00:00adminsetmessages: + msg1483
2007-05-06 00:00:00adminsetstatus: open -> review
2006-11-03 00:00:00admincreate