Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / gil / test / legacy / recreate_image.cpp
index 3c78890..eec4e3d 100644 (file)
@@ -12,7 +12,6 @@
 
 #include <boost/gil/extension/dynamic_image/dynamic_image_all.hpp>
 
-#include <boost/mpl/vector.hpp>
 #include <boost/test/unit_test.hpp>
 
 #include <ios>
@@ -20,6 +19,7 @@
 #include <fstream>
 #include <map>
 #include <string>
+#include <type_traits>
 #include <vector>
 
 using namespace boost::gil;
@@ -30,7 +30,7 @@ using namespace boost;
 
 std::size_t is_planar_impl( const std::size_t size_in_units
                             , const std::size_t channels_in_image
-                            , mpl::true_
+                            , std::true_type
                             )
 {
     return size_in_units * channels_in_image;
@@ -38,7 +38,7 @@ std::size_t is_planar_impl( const std::size_t size_in_units
 
 std::size_t is_planar_impl( const std::size_t size_in_units
                           , const std::size_t
-                          , mpl::false_
+                          , std::false_type
                           )
 {
     return size_in_units;
@@ -62,14 +62,14 @@ std::size_t total_allocated_size_in_bytes( const typename View::point_t& dimensi
     using x_iterator = typename View::x_iterator;
 
     // when value_type is a non-pixel, like int or float, num_channels< ... > doesn't work.
-    const std::size_t _channels_in_image = mpl::eval_if< is_pixel< typename View::value_type >
+    const std::size_t _channels_in_image = mp11::mp_eval_if< is_pixel< typename View::value_type >
                                                         , num_channels< View >
-                                                        , mpl::int_< 1 >
+                                                        , std::integral_constant<int, 1>
                                                         >::type::value;
 
     std::size_t size_in_units = is_planar_impl( get_row_size_in_memunits< View >( dimensions.x ) * dimensions.y
                                                 , _channels_in_image
-                                                , typename boost::conditional< IsPlanar, mpl::true_, mpl::false_ >::type()
+                                                , typename std::conditional< IsPlanar, std::true_type, std::false_type >::type()
                                                 );
 
     // return the size rounded up to the nearest byte