summaryrefslogtreecommitdiff
path: root/src/ranked_match.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-03-15 17:55:34 +0000
committerMaxime Coste <mawww@kakoune.org>2017-03-15 18:00:58 +0000
commitdb9b863222dbd51154c422cf85bc8fafacd5b25b (patch)
treec64d4a42ff62372736d747a1ab25568954ba6e32 /src/ranked_match.hh
parenta49e175727928b8b45c0c2ccdb01f143ea6d18c2 (diff)
Migrate WithBitOps template specialization to with_bit_ops function
This way we dont depend on knowing the base template to enable bit ops on an enum type.
Diffstat (limited to 'src/ranked_match.hh')
-rw-r--r--src/ranked_match.hh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ranked_match.hh b/src/ranked_match.hh
index bac6bc39..9d0e3b73 100644
--- a/src/ranked_match.hh
+++ b/src/ranked_match.hh
@@ -2,6 +2,7 @@
#define ranked_match_hh_INCLUDED
#include "string.hh"
+#include "meta.hh"
namespace Kakoune
{
@@ -43,6 +44,7 @@ private:
Prefix = 1 << 4,
FullMatch = 1 << 5,
};
+ friend constexpr bool with_bit_ops(Meta::Type<Flags>) { return true; }
StringView m_candidate{};
Flags m_flags = Flags::None;