1
0
forked from Alepha/Alepha

Negation support for binary Enum

This commit is contained in:
2024-07-13 05:32:57 -04:00
parent 6a89b18c11
commit ad053e9175
2 changed files with 36 additions and 0 deletions

9
Enum.h
View File

@ -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 >