forked from Alepha/Alepha
Negation support for binary Enum
This commit is contained in:
9
Enum.h
9
Enum.h
@ -224,6 +224,15 @@ namespace Alepha::Hydrogen ::detail:: Enum_m
|
||||
}
|
||||
};
|
||||
|
||||
template< EnumValueString no, EnumValueString yes >
|
||||
constexpr Enum< no, yes >
|
||||
operator not ( Enum< no, yes > enumeration )
|
||||
{
|
||||
enumeration.set_index( 1 - enumeration.get_index() );
|
||||
|
||||
return enumeration;
|
||||
}
|
||||
|
||||
namespace exports
|
||||
{
|
||||
template< auto ... values >
|
||||
|
Reference in New Issue
Block a user