Re: EnumToFlags

2016-06-30 Thread Basile B. via Digitalmars-d-learn
On Thursday, 30 June 2016 at 02:39:22 UTC, JS wrote: I created a type that makes working with flags much easier. Please review for issues and enhancements. It would be nice to simplify the value size code. [...] You can look at this, it's more or less the same concept:

Re: EnumToFlags

2016-06-30 Thread ag0aep6g via Digitalmars-d-learn
On 06/30/2016 04:39 AM, JS wrote: struct EnumToFlags(alias E) { import std.traits, std.conv, std.string, std.algorithm, std.array; static if (E.max < 8) alias vtype = ubyte; Convention says: Capitalize user-defined type names. So it should be "Vtype" or