D-Programming-Language/phobos — pull request #2058 by lultimouomo (2014-03-31 09:27:31+00:00)
Title: Add Flags teplate

Flags is a typecons template for storing OR combinaton of enum values in a type safe fashion.

I think that the possibility to use bitwise operation on enums is a bit of a hole in D type system;
Flags provides a type safe alternative modeled after Qt's Q_FLAGS