diff --git a/src/face.hh b/src/face.hh index 00bb4e08..18016e9b 100644 --- a/src/face.hh +++ b/src/face.hh @@ -2,6 +2,7 @@ #define face_hh_INCLUDED #include "color.hh" +#include "flags.hh" namespace Kakoune { @@ -16,25 +17,7 @@ enum class Attribute : int Dim = 1 << 5 }; -inline constexpr Attribute operator|(Attribute lhs, Attribute rhs) -{ - return (Attribute)((int) lhs | (int) rhs); -} - -inline Attribute& operator|=(Attribute& lhs, Attribute rhs) -{ - return (Attribute&)((int&) lhs |= (int) rhs); -} - -inline constexpr bool operator&(Attribute lhs, Attribute rhs) -{ - return ((int) lhs & (int) rhs) != 0; -} - -inline Attribute& operator&=(Attribute& lhs, Attribute rhs) -{ - return (Attribute&)((int&) lhs &= (int) rhs); -} +template<> struct WithBitOps : std::true_type {}; struct Face {