Imported Upstream version 1.72.0
[platform/upstream/boost.git] / boost / gil / extension / toolbox / metafunctions / get_pixel_type.hpp
index 5fa37b3..d4e43b3 100644 (file)
 #include <boost/gil/extension/toolbox/dynamic_images.hpp>
 #include <boost/gil/extension/toolbox/metafunctions/is_bit_aligned.hpp>
 
+#include <boost/gil/detail/mp11.hpp>
+
 namespace boost{ namespace gil {
 
 /// get_pixel_type metafunction
 /// \brief Depending on Image this function generates either
 ///        the pixel type or the reference type in case
 ///        the image is bit_aligned.
-template< typename View >
-struct get_pixel_type : mpl::if_< typename is_bit_aligned< typename View::value_type >::type
-                                , typename View::reference
-                                , typename View::value_type
-                                > {};
+template<typename View>
+struct get_pixel_type
+{
+    using type = mp11::mp_if
+        <
+            is_bit_aligned<typename View::value_type>,
+            typename View::reference,
+            typename View::value_type
+        >;
+};
 
-template< typename ImageViewTypes >
-struct get_pixel_type< any_image_view< ImageViewTypes > >
+template<typename Views>
+struct get_pixel_type<any_image_view<Views>>
 {
     using type = any_image_pixel_t;
 };
 
-} // namespace gil
-} // namespace boost
+}} // namespace boost::gil
 
 #endif