From 594bac1e841588aef66efc208a295e08273aec32 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Mon, 28 Apr 2014 19:44:09 +0200 Subject: Remove binary.hpp and use the c++14 feature 0b --- src/utils/binary.hpp | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 src/utils/binary.hpp (limited to 'src/utils/binary.hpp') diff --git a/src/utils/binary.hpp b/src/utils/binary.hpp deleted file mode 100644 index 10807bc..0000000 --- a/src/utils/binary.hpp +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef BINARY_INCLUDED -# define BINARY_INCLUDED - -template struct binary -{ - static_assert(FIRST == '0' || FIRST == '1', "invalid binary digit" ); - enum { value = ((FIRST - '0') << sizeof...(REST)) + binary::value }; -}; - -template<> struct binary<'0'> { enum { value = 0 }; }; -template<> struct binary<'1'> { enum { value = 1 }; }; - -template inline -constexpr unsigned int operator "" _b() { return binary::value; } - -#endif // BINARY_INCLUDED -- cgit v1.2.3