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

@@ -16,6 +16,7 @@
#include <memory>
#include <string>
#include <type_traits>
namespace boost { namespace gil { namespace detail {
@@ -117,11 +118,7 @@ public:
};
template< typename FormatTag >
struct is_adaptable_input_device< FormatTag
, LibRaw
, void
>
: mpl::true_
struct is_adaptable_input_device<FormatTag, LibRaw, void> : std::true_type
{
using device_type = file_stream_device<FormatTag>;
};

View File

@@ -11,29 +11,31 @@
#include <boost/gil/extension/io/raw/tags.hpp>
#include <boost/gil/io/base.hpp>
#include <type_traits>
namespace boost { namespace gil { namespace detail {
template< typename View >
bool is_allowed( const image_read_info< raw_tag >& info
, mpl::true_ // is read_and_no_convert
, std::true_type // is read_and_no_convert
)
{
using pixel_t = typename get_pixel_type<View>::type;
using num_channel_t = typename num_channels<pixel_t>::value_type;
using channel_t = typename channel_traits<typename element_type<typename View::value_type>::type>::value_type;
const num_channel_t dst_samples_per_pixel = num_channels< pixel_t >::value;
const unsigned int dst_bits_per_pixel = detail::unsigned_integral_num_bits< channel_t >::value;
const bool is_type_signed = boost::is_signed< channel_t >::value;
constexpr num_channel_t dst_samples_per_pixel = num_channels<pixel_t>::value;
constexpr unsigned int dst_bits_per_pixel = detail::unsigned_integral_num_bits<channel_t>::value;
constexpr bool is_type_signed = std::is_signed<channel_t>::value;
return( dst_samples_per_pixel == info._samples_per_pixel &&
dst_bits_per_pixel == static_cast<unsigned int>(info._bits_per_pixel) &&
!is_type_signed );
return (dst_samples_per_pixel == info._samples_per_pixel &&
dst_bits_per_pixel == static_cast<unsigned int>(info._bits_per_pixel) &&
!is_type_signed);
}
template< typename View >
bool is_allowed( const image_read_info< raw_tag >& /* info */
, mpl::false_ // is read_and_convert
, std::false_type // is read_and_convert
)
{
return true;

View File

@@ -13,17 +13,18 @@
#include <boost/gil/extension/io/raw/detail/is_allowed.hpp>
#include <boost/gil/extension/io/raw/detail/reader_backend.hpp>
#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>
#include <cstdio>
#include <sstream>
#include <type_traits>
#include <vector>
namespace boost { namespace gil {
@@ -100,7 +101,7 @@ public:
io_error( "Image header was not read." );
}
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
@@ -165,10 +166,7 @@ struct raw_type_format_checker
bool apply()
{
using view_t = typename Image::view_t;
return is_allowed< view_t >( _info
, mpl::true_()
);
return is_allowed<view_t>(_info, std::true_type{});
}
private:
@@ -202,12 +200,12 @@ public:
)
{}
template< typename Images >
void apply( any_image< Images >& images )
template< typename ...Images >
void apply( any_image< Images... >& images )
{
detail::raw_type_format_checker format_checker( this->_info );
if( !construct_matched( images
if( !detail::construct_matched( images
, format_checker
))
{
@@ -226,8 +224,8 @@ public:
, parent_t
> op( this );
apply_operation( view( images )
, op
variant2::visit( op
, view( images )
);
}
}

View File

@@ -98,7 +98,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 {
@@ -52,23 +51,24 @@ struct raw_write_support : write_support_false {};
} // namespace detail
template< typename Pixel >
struct is_read_supported< Pixel,
raw_tag
>
: mpl::bool_< detail::raw_read_support< typename channel_type< Pixel >::type
, typename color_space_type< Pixel >::type
>::is_supported > {};
template< typename Pixel >
struct is_write_supported< Pixel
, raw_tag
>
: mpl::bool_< detail::raw_write_support::is_supported >
template<typename Pixel>
struct is_read_supported<Pixel,raw_tag>
: std::integral_constant
<
bool,
detail::raw_read_support
<
typename channel_type<Pixel>::type,
typename color_space_type<Pixel>::type
>::is_supported
>
{};
} // namespace gil
} // namespace boost
template<typename Pixel>
struct is_write_supported<Pixel, raw_tag>
: std::integral_constant<bool, detail::raw_write_support::is_supported>
{};
}} // namespace boost::gil
#endif