Title
sizeof an enumeration type with a fixed underlying type
Status
cd2
Section
7.6.2.5 [expr.sizeof]
Submitter
UK

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

Messages

Date: 2009-10-15.00:00:00

[Voted into WP at October, 2009 meeting.]

Date: 2009-07-15.00:00:00

Proposed resolution (July, 2009):

Change 7.6.2.5 [expr.sizeof] paragraph 1 as follows:

...The sizeof operator shall not be applied to an expression that has function or incomplete type, or to an enumeration type whose underlying type is not fixed before all its enumerators have been declared, or to the parenthesized name of such types, or to an lvalue that designates a bit-field...
Date: 2009-03-03.00:00:00
N2800 comment UK 70

There is no reason for the prohibition of using sizeof on “an enumeration type before all its enumerators have been declared” (7.6.2.5 [expr.sizeof] paragraph 1) if the underlying type of the enumeration is fixed.

History
Date User Action Args
2010-03-29 00:00:00adminsetstatus: dr -> cd2
2009-11-08 00:00:00adminsetmessages: + msg2437
2009-11-08 00:00:00adminsetstatus: ready -> dr
2009-08-03 00:00:00adminsetmessages: + msg2148
2009-08-03 00:00:00adminsetstatus: drafting -> ready
2009-03-03 00:00:00admincreate