On 9/8/11 2:02 PM, Jonathan M Davis wrote:
I think that it makes perfect sense to use enums for flags. What I don't think
makes sense is making the type of the variable which holds the flags to be that
enum type unless _every_ possible combination of flags has its own flag so that
&ing or |ing enums always results in a valid enum.

This ain't going to work because it would require the human user to write by hand a combinatorial number of symbols.

A ligthweight fixed-sized set with named members is a worthy abstraction for the standard library.


Andrei

Reply via email to