summaryrefslogtreecommitdiff
path: root/src/buffer.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/buffer.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/buffer.hh')
-rw-r--r--src/buffer.hh3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/buffer.hh b/src/buffer.hh
index bc960b20..f535c387 100644
--- a/src/buffer.hh
+++ b/src/buffer.hh
@@ -115,6 +115,7 @@ public:
Debug = 1 << 5,
ReadOnly = 1 << 6,
};
+ friend constexpr bool with_bit_ops(Meta::Type<Flags>) { return true; }
Buffer(String name, Flags flags, StringView data = {},
timespec fs_timestamp = InvalidTime);
@@ -283,8 +284,6 @@ private:
mutable ValueMap m_values;
};
-template<> struct WithBitOps<Buffer::Flags> : std::true_type {};
-
}
#include "buffer.inl.hh"