Imported Upstream version 1.72.0
[platform/upstream/boost.git] / boost / gil / extension / io / tiff / detail / read.hpp
index 617a83b..ee93098 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <algorithm>
 #include <string>
+#include <type_traits>
 #include <vector>
 
 // taken from jpegxx - https://bitbucket.org/edd/jpegxx/src/ea2492a1a4a6/src/ijg_headers.hpp
@@ -173,7 +174,7 @@ public:
             // the tiff type need to compatible. Which means:
             // color_spaces_are_compatible && channels_are_pairwise_compatible
 
-            using is_read_only = typename is_same
+            using is_read_only = typename std::is_same
                 <
                     ConversionPolicy,
                     detail::read_and_no_convert
@@ -208,7 +209,7 @@ private:
 
     template< typename View >
     void read( View v
-             , mpl::true_ // is_read_only
+             , std::true_type // is_read_only
              )
     {
         read_data< detail::row_buffer_helper_view< View > >( v, 0 );
@@ -216,7 +217,7 @@ private:
 
     template< typename View >
     void read( View v
-             , mpl::false_  // is_read_only
+             , std::false_type  // is_read_only
              )
     {
         // the read_data function needs to know what gil type the source image is
@@ -302,11 +303,13 @@ private:
                           , this->_info._height - this->_settings._top_left.y );
 
       // read the palette first
-      read_data< detail::row_buffer_helper_view< typename PaletteImage::view_t > >( view( indices ), 0 );
+      read_data< detail::row_buffer_helper_view
+          <
+            typename PaletteImage::view_t>
+        >(view(indices), 0);
 
-      read_palette_image( dst_view
-                        , view( indices )
-                        , typename is_same< View, rgb16_view_t >::type() );
+      read_palette_image(dst_view, view(indices),
+          typename std::is_same<View, rgb16_view_t>::type());
    }
 
    template< typename View
@@ -314,7 +317,7 @@ private:
            >
    void read_palette_image( const View&         dst_view
                           , const Indices_View& indices_view
-                          , mpl::true_   // is View rgb16_view_t
+                          , std::true_type   // is View rgb16_view_t
                           )
    {
       tiff_color_map::red_t   red   = nullptr;
@@ -356,7 +359,7 @@ private:
    inline
    void read_palette_image( const View&         /* dst_view     */
                           , const Indices_View& /* indices_view */
-                          , mpl::false_  // is View rgb16_view_t
+                          , std::false_type  // is View rgb16_view_t
                           )
    {
       io_error( "User supplied image type must be rgb16_image_t." );
@@ -653,7 +656,7 @@ private:
 
     template< typename Pixel >
     std::size_t buffer_size( std::size_t width
-                           , mpl::false_ // is_bit_aligned
+                           , std::false_type // is_bit_aligned
                            )
     {
         std::size_t scanline_size_in_bytes = this->_io_dev.get_scanline_size();
@@ -669,7 +672,7 @@ private:
 
     template< typename Pixel >
     std::size_t buffer_size( std::size_t /* width */
-                            , mpl::true_  // is_bit_aligned
+                            , std::true_type  // is_bit_aligned
                             )
     {
         return this->_io_dev.get_scanline_size();
@@ -694,7 +697,7 @@ struct tiff_type_format_checker
         using view_t = typename Image::view_t;
 
         return is_allowed< view_t >( _info
-                                   , mpl::true_()
+                                   , std::true_type()
                                    );
     }