summaryrefslogtreecommitdiff
path: root/boost/gil/extension/toolbox/metafunctions/get_num_bits.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/gil/extension/toolbox/metafunctions/get_num_bits.hpp')
-rw-r--r--boost/gil/extension/toolbox/metafunctions/get_num_bits.hpp28
1 files changed, 19 insertions, 9 deletions
diff --git a/boost/gil/extension/toolbox/metafunctions/get_num_bits.hpp b/boost/gil/extension/toolbox/metafunctions/get_num_bits.hpp
index 3721c4939b..586ca09ee2 100644
--- a/boost/gil/extension/toolbox/metafunctions/get_num_bits.hpp
+++ b/boost/gil/extension/toolbox/metafunctions/get_num_bits.hpp
@@ -10,11 +10,14 @@
#include <boost/gil/channel.hpp>
+#include <boost/mpl/and.hpp>
#include <boost/mpl/int.hpp>
+#include <boost/mpl/not.hpp>
#include <boost/mpl/size_t.hpp>
#include <boost/type_traits/is_integral.hpp>
#include <boost/type_traits/is_class.hpp>
-#include <boost/utility/enable_if.hpp>
+
+#include <type_traits>
namespace boost{ namespace gil {
@@ -48,14 +51,21 @@ template< int N >
struct get_num_bits< const packed_channel_value< N > > : mpl::int_< N >
{};
-template< typename T >
-struct get_num_bits< T
- , typename enable_if< mpl::and_< is_integral< T >
- , mpl::not_< is_class< T > >
- >
- >::type
- > : mpl::size_t< sizeof(T) * 8 >
-{};
+template <typename T>
+struct get_num_bits
+<
+ T,
+ typename std::enable_if
+ <
+ mpl::and_
+ <
+ is_integral<T>,
+ mpl::not_<is_class<T>>
+ >::value
+ >::type
+> : mpl::size_t<sizeof(T) * 8>
+{
+};
} // namespace gil
} // namespace boost