Closed
Description
enum Foo { Foo }
std::mem::size_of::<Foo>() // evaluates to 1
Since type Foo
has only one value, it could have size zero. (This is already the case for single-valued struct types like struct Foo;
.)
Open question: If this change is made, should Foo as uint
still evaluate to 0
in the example above?
Note: It would still be possible to force a non-zero size using [#repr(...)]
or enum Foo { Foo = 1 }
.