summaryrefslogtreecommitdiff
path: root/src/utils/binary.hpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-04-28 19:44:09 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-04-28 19:44:09 +0200
commit594bac1e841588aef66efc208a295e08273aec32 (patch)
tree41ed18c2f4b9851e77f726ab51dfbc783a9e4a39 /src/utils/binary.hpp
parentc6059e5a215624e205cae401183f3a8bb1bf87d0 (diff)
downloadbiboumi-594bac1e841588aef66efc208a295e08273aec32.tar.gz
biboumi-594bac1e841588aef66efc208a295e08273aec32.tar.bz2
biboumi-594bac1e841588aef66efc208a295e08273aec32.tar.xz
biboumi-594bac1e841588aef66efc208a295e08273aec32.zip
Remove binary.hpp and use the c++14 feature 0b
Diffstat (limited to 'src/utils/binary.hpp')
-rw-r--r--src/utils/binary.hpp16
1 files changed, 0 insertions, 16 deletions
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<char FIRST, char... REST> struct binary
-{
- static_assert(FIRST == '0' || FIRST == '1', "invalid binary digit" );
- enum { value = ((FIRST - '0') << sizeof...(REST)) + binary<REST...>::value };
-};
-
-template<> struct binary<'0'> { enum { value = 0 }; };
-template<> struct binary<'1'> { enum { value = 1 }; };
-
-template<char... LITERAL> inline
-constexpr unsigned int operator "" _b() { return binary<LITERAL...>::value; }
-
-#endif // BINARY_INCLUDED