update boost

This commit is contained in:
2023-11-24 12:56:13 -06:00
parent cfc99971af
commit 19d727037a
9260 changed files with 849256 additions and 299957 deletions

View File

@@ -10,11 +10,13 @@
#include <boost/gil/extension/io/pnm/tags.hpp>
#include <type_traits>
namespace boost { namespace gil { namespace detail {
template< typename View >
bool is_allowed( const image_read_info< pnm_tag >& info
, mpl::true_ // is read_and_no_convert
, std::true_type // is read_and_no_convert
)
{
pnm_image_type::type asc_type = is_read_supported< typename get_pixel_type< View >::type
@@ -38,7 +40,7 @@ bool is_allowed( const image_read_info< pnm_tag >& info
template< typename View >
bool is_allowed( const image_read_info< pnm_tag >& /* info */
, mpl::false_ // is read_and_convert
, std::false_type // is read_and_convert
)
{
return true;

View File

@@ -13,11 +13,11 @@
#include <boost/gil/extension/io/pnm/detail/is_allowed.hpp>
#include <boost/gil.hpp> // FIXME: Include what you use!
#include <boost/gil/io/detail/dynamic.hpp>
#include <boost/gil/io/base.hpp>
#include <boost/gil/io/bit_operations.hpp>
#include <boost/gil/io/conversion_policies.hpp>
#include <boost/gil/io/device.hpp>
#include <boost/gil/io/dynamic_io_new.hpp>
#include <boost/gil/io/reader_base.hpp>
#include <boost/gil/io/row_buffer_helper.hpp>
#include <boost/gil/io/typedefs.hpp>
@@ -85,7 +85,7 @@ public:
template<typename View>
void apply( const View& view )
{
using is_read_and_convert_t = typename is_same
using is_read_and_convert_t = typename std::is_same
<
ConversionPolicy,
detail::read_and_no_convert
@@ -237,7 +237,7 @@ private:
, View_Src >( dst
, src
, y
, typename is_same< View_Dst
, typename std::is_same< View_Dst
, gray1_image_t::view_t
>::type()
);
@@ -250,7 +250,7 @@ private:
void copy_data( const View_Dst& dst
, const View_Src& src
, typename View_Dst::y_coord_t y
, mpl::true_ // is gray1_view
, std::true_type // is gray1_view
)
{
if( this->_info._max_value == 1 )
@@ -267,11 +267,7 @@ private:
}
else
{
copy_data( dst
, src
, y
, mpl::false_()
);
copy_data(dst, src, y, std::false_type{});
}
}
@@ -281,7 +277,7 @@ private:
void copy_data( const View_Dst& view
, const View_Src& src
, typename View_Dst::y_coord_t y
, mpl::false_ // is gray1_view
, std::false_type // is gray1_view
)
{
typename View_Src::x_iterator beg = src.row_begin( 0 ) + this->_settings._top_left.x;
@@ -420,12 +416,12 @@ public:
)
{}
template< typename Images >
void apply( any_image< Images >& images )
template< typename ...Images >
void apply( any_image< Images... >& images )
{
detail::pnm_type_format_checker format_checker( this->_info._type );
if( !construct_matched( images
if( !detail::construct_matched( images
, format_checker
))
{
@@ -441,8 +437,8 @@ public:
, parent_t
> op( this );
apply_operation( view( images )
, op
variant2::visit( op
,view( images )
);
}
}

View File

@@ -82,7 +82,7 @@ public:
}
/// Check if image is large enough.
void check_image_size( const point_t& img_dim )
void check_image_size( point_t const& img_dim )
{
if( _settings._dim.x > 0 )
{

View File

@@ -14,8 +14,7 @@
#include <boost/gil/color_base.hpp>
#include <boost/gil/io/base.hpp>
#include <boost/mpl/not.hpp>
#include <boost/type_traits/is_same.hpp>
#include <type_traits>
namespace boost { namespace gil { namespace detail {
@@ -105,14 +104,17 @@ struct pnm_write_support<uint8_t
} // namespace detail
template< typename Pixel >
struct is_read_supported< Pixel
, pnm_tag
>
: mpl::bool_< detail::pnm_read_support< typename channel_type < Pixel >::type
, typename color_space_type< Pixel >::type
>::is_supported
>
template<typename Pixel>
struct is_read_supported<Pixel, pnm_tag>
: std::integral_constant
<
bool,
detail::pnm_read_support
<
typename channel_type<Pixel>::type,
typename color_space_type<Pixel>::type
>::is_supported
>
{
using parent_t = detail::pnm_read_support
<
@@ -124,14 +126,18 @@ struct is_read_supported< Pixel
static const pnm_image_type::type _bin_type = parent_t::_bin_type;
};
template< typename Pixel >
struct is_write_supported< Pixel
, pnm_tag
>
: mpl::bool_< detail::pnm_write_support< typename channel_type < Pixel >::type
, typename color_space_type< Pixel >::type
>::is_supported
> {};
template<typename Pixel>
struct is_write_supported<Pixel, pnm_tag>
: std::integral_constant
<
bool,
detail::pnm_write_support
<
typename channel_type<Pixel>::type,
typename color_space_type<Pixel>::type
>::is_supported
>
{};
} // namespace gil
} // namespace boost

View File

@@ -14,10 +14,12 @@
#include <boost/gil/io/base.hpp>
#include <boost/gil/io/bit_operations.hpp>
#include <boost/gil/io/device.hpp>
#include <boost/gil/io/dynamic_io_new.hpp>
#include <boost/gil/io/detail/dynamic.hpp>
#include <boost/gil/detail/mp11.hpp>
#include <cstdlib>
#include <string>
#include <type_traits>
namespace boost { namespace gil {
@@ -108,30 +110,34 @@ public:
private:
template< int Channels >
unsigned int get_type( mpl::true_ /* is_bit_aligned */ )
unsigned int get_type( std::true_type /* is_bit_aligned */ )
{
return boost::mpl::if_c< Channels == 1
, pnm_image_type::mono_bin_t
, pnm_image_type::color_bin_t
>::type::value;
return mp11::mp_if_c
<
Channels == 1,
pnm_image_type::mono_bin_t,
pnm_image_type::color_bin_t
>::value;
}
template< int Channels >
unsigned int get_type( mpl::false_ /* is_bit_aligned */ )
unsigned int get_type( std::false_type /* is_bit_aligned */ )
{
return boost::mpl::if_c< Channels == 1
, pnm_image_type::gray_bin_t
, pnm_image_type::color_bin_t
>::type::value;
return mp11::mp_if_c
<
Channels == 1,
pnm_image_type::gray_bin_t,
pnm_image_type::color_bin_t
>::value;
}
template< typename View >
void write_data( const View& src
, std::size_t pitch
, const mpl::true_& // bit_aligned
, const std::true_type& // bit_aligned
)
{
static_assert(is_same<View, typename gray1_image_t::view_t>::value, "");
static_assert(std::is_same<View, typename gray1_image_t::view_t>::value, "");
byte_vector_t row( pitch / 8 );
@@ -154,7 +160,7 @@ private:
template< typename View >
void write_data( const View& src
, std::size_t pitch
, const mpl::false_& // bit_aligned
, const std::false_type& // bit_aligned
)
{
std::vector< pixel< typename channel_type< View >::type
@@ -220,14 +226,14 @@ public:
)
{}
template< typename Views >
void apply( const any_image_view< Views >& views )
template< typename ...Views >
void apply( const any_image_view< Views... >& views )
{
detail::dynamic_io_fnobj< detail::pnm_write_is_supported
, parent_t
> op( this );
apply_operation( views, op );
variant2::visit( op, views );
}
};