On Friday, 7 September 2018 at 02:22:58 UTC, Domain wrote:
The following code fail to compile:
enum KeyMod : int
{
LCtrl = 1 << 0,
RCtrl = 1 << 1,
Ctrl = LCtrl | RCtrl,
}
struct Flags(E)
{
public:
BitFlags!(E, Yes.unsafe) flags;
alias flags this;
bool
The following code fail to compile:
enum KeyMod : int
{
LCtrl = 1 << 0,
RCtrl = 1 << 1,
Ctrl = LCtrl | RCtrl,
}
struct Flags(E)
{
public:
BitFlags!(E, Yes.unsafe) flags;
alias flags this;
bool opDispatch(string name)() const
if (__traits(hasMember, E, name))