SA_Support
Sapphire's Suite's C++ Support library.
Loading...
Searching...
No Matches
Macros
Flags.hpp File Reference

Flags support file. More...

#include <cstdint>

Go to the source code of this file.

Macros

#define SA_DEFINE_ENUM_CLASS_FLAGS(EnumType)
 

Detailed Description

Flags support file.

Define preprocessor for enum class to flag support.

Macro Definition Documentation

◆ SA_DEFINE_ENUM_CLASS_FLAGS

#define SA_DEFINE_ENUM_CLASS_FLAGS ( EnumType)
Value:
__SA_DEFINE_ENUM_CLASS_FLAGS_OP(EnumType, &)\
__SA_DEFINE_ENUM_CLASS_FLAGS_OP(EnumType, |)\
__SA_DEFINE_ENUM_CLASS_FLAGS_OP(EnumType, ^)\
inline constexpr __SA_EUINT(EnumType) operator ~(EnumType _e){\
return ~static_cast<__SA_EUINT(EnumType)>(_e);\
}\
inline constexpr __SA_EUINT(EnumType) operator +(EnumType _e){\
return static_cast<__SA_EUINT(EnumType)>(_e);\
}