sizeof an enumeration type with a fixed underlying type
Section [expr.sizeof]

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


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 [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” ( [expr.sizeof] paragraph 1) if the underlying type of the enumeration is fixed.

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