M
Mr.Tickle
When setting the [Flags] attribute on an enum, why should I have to specify
powers of 2 when the compiler should see this is a bitfield and set the
range accordingly, why should I have to do the work that the compiler can
do?
To me this is just asking for errors to be introduced by offloading this
responsibility onto the programmer.
Sure we should be able to override a value in the bitfield enum to allow
ranges like All = Enum1Val | Enum2Val; etc.
powers of 2 when the compiler should see this is a bitfield and set the
range accordingly, why should I have to do the work that the compiler can
do?
To me this is just asking for errors to be introduced by offloading this
responsibility onto the programmer.
Sure we should be able to override a value in the bitfield enum to allow
ranges like All = Enum1Val | Enum2Val; etc.