From db9b863222dbd51154c422cf85bc8fafacd5b25b Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 15 Mar 2017 17:55:34 +0000 Subject: 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. --- src/buffer.hh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/buffer.hh') 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) { 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 : std::true_type {}; - } #include "buffer.inl.hh" -- cgit v1.2.3