You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the ALLOW_FLAGS_FOR_ENUM has to be in global scope to work, which can be a bit cumbersome (see #26). Instead, I propose two different macros:
It is then possible (mandatory) to use ALLOW_FLAGS_FOR_ENUM(Whatever) directly after an enum is defined, whatever scope it may be, and ALLOW_FLAGS_FOR_ENUM_IN_CLASS(Whatever) if the enum is inside a class or struct.
Note that the enableEnumFlags name should be rather unique so it is not used by anyone else, so maybe it is a good idea to obfuscate it a bit more with e.g. a random number, e.g. enableFlagsfbc4db870f32e
The text was updated successfully, but these errors were encountered:
Currently the
ALLOW_FLAGS_FOR_ENUM
has to be in global scope to work, which can be a bit cumbersome (see #26). Instead, I propose two different macros:Which works nicely thanks to ADL with this
is_flags
implementation:It is then possible (mandatory) to use
ALLOW_FLAGS_FOR_ENUM(Whatever)
directly after an enum is defined, whatever scope it may be, andALLOW_FLAGS_FOR_ENUM_IN_CLASS(Whatever)
if the enum is inside a class or struct.Note that the
enableEnumFlags
name should be rather unique so it is not used by anyone else, so maybe it is a good idea to obfuscate it a bit more with e.g. a random number, e.g.enableFlagsfbc4db870f32e
The text was updated successfully, but these errors were encountered: