Правка регистра
This commit is contained in:
@ -13,17 +13,17 @@ namespace base {
|
||||
template< typename Enum >
|
||||
struct EnableBitMaskOperators
|
||||
{
|
||||
static const bool enable = false;
|
||||
static const bool k_Enable = false;
|
||||
};
|
||||
|
||||
template< typename Enum >
|
||||
typename std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type
|
||||
typename std::enable_if< EnableBitMaskOperators< Enum >::k_Enable, Enum >::type
|
||||
operator |( Enum lhs, Enum rhs )
|
||||
{
|
||||
using underlying = typename std::underlying_type< Enum >::type;
|
||||
using Underlying = typename std::underlying_type< Enum >::type;
|
||||
return( static_cast< Enum >(
|
||||
static_cast< underlying >( lhs ) |
|
||||
static_cast< underlying >( rhs )
|
||||
static_cast< Underlying >( lhs ) |
|
||||
static_cast< Underlying >( rhs )
|
||||
) );
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ operator |( Enum lhs, Enum rhs )
|
||||
template<> \
|
||||
struct myx::base::EnableBitMaskOperators< x > \
|
||||
{ \
|
||||
static const bool enable = true; \
|
||||
static const bool k_Enable = true; \
|
||||
};
|
||||
|
||||
#endif // ifndef MYX_BASE_ENUM_BITWISE_OPERATIONS_HPP_
|
||||
|
Reference in New Issue
Block a user