8#ifndef BOOST_GIL_IO_CONVERSION_POLICIES_HPP
9#define BOOST_GIL_IO_CONVERSION_POLICIES_HPP
11#include <boost/gil/image_view_factory.hpp>
12#include <boost/gil/detail/mp11.hpp>
13#include <boost/gil/io/error.hpp>
19namespace boost{
namespace gil {
namespace detail {
21struct read_and_no_convert
24 using color_converter_type =
void *;
26 template <
typename InIterator,
typename OutIterator>
28 InIterator
const& , InIterator
const& , OutIterator ,
29 typename std::enable_if
35 typename std::iterator_traits<InIterator>::value_type,
36 typename std::iterator_traits<OutIterator>::value_type
41 io_error(
"Data cannot be copied because the pixels are incompatible.");
44 template <
typename InIterator,
typename OutIterator>
45 void read(InIterator
const& begin, InIterator
const& end, OutIterator out,
46 typename std::enable_if
50 typename std::iterator_traits<InIterator>::value_type,
51 typename std::iterator_traits<OutIterator>::value_type
55 std::copy(begin, end, out);
60struct read_and_convert
63 using color_converter_type = default_color_converter;
69 read_and_convert(
const color_converter_type& cc )
73 template<
typename InIterator
74 ,
typename OutIterator
76 void read(
const InIterator& begin
77 ,
const InIterator& end
81 using deref_t = color_convert_deref_fn<typename std::iterator_traits<InIterator>::reference
82 ,
typename std::iterator_traits<OutIterator>::value_type
96template<
typename Conversion_Policy >
100struct is_read_only<detail::read_and_no_convert> : std::true_type {};
defined(BOOST_NO_CXX17_HDR_MEMORY_RESOURCE)
Definition algorithm.hpp:36
Determines if reader type is read only ( no conversion ).
Definition conversion_policies.hpp:97