On Tuesday, 25 September 2012 at 17:13:44 UTC, Denis Shelomovskij
wrote:
.NET has FlagsAttribute, Java has EnumSet. Looks like we need
this too. How about to add a library solution to Phobos?
+1.
Also I'm not sure:
* Should we support converting from a number to a flag enum?
+1.
* If so, should we support values not from enum flags or throw
exceptions (it may be configurable)?
http://msdn.microsoft.com/en-us/library/system.enum.aspx
IsDefined method.
* Is `flagEnum` an appropriate name?
Just "enum" with additional methods like: HasFlag, IsFlag