#include "Utility/traits.h"
#include <type_traits>
#include <initializer_list>
#include "Utility/TBitFlags.ipp"
Go to the source code of this file.
|
namespace | ph |
| The root for all renderer implementations.
|
|
|
template<CEnum EnumType> |
using | ph::TEnumFlags = TBitFlags<std::underlying_type_t<EnumType>, EnumType> |
| Convenient type for using scoped/unscoped enum for bit flags.
|
|
◆ PH_DEFINE_INLINE_ENUM_FLAG_OPERATORS
#define PH_DEFINE_INLINE_ENUM_FLAG_OPERATORS |
( |
| EnumType | ) |
|
Value: static_assert(::ph::CEnum<EnumType>, #EnumType " must be an enum type");\
\
inline constexpr EnumType operator | (const EnumType lhs, const EnumType rhs)\
{\
return ::ph::TEnumFlags<EnumType>({lhs, rhs}).getEnum();\
}\
\
inline constexpr EnumType operator & (const EnumType lhs, const EnumType rhs)\
{\
return ::ph::TEnumFlags<EnumType>({lhs}).intersectWith({rhs}).getEnum();\
}
Defines operator |
and operator &
for EnumType
.