8#ifndef BOOST_GIL_CONCEPTS_PIXEL_ITERATOR_HPP
9#define BOOST_GIL_CONCEPTS_PIXEL_ITERATOR_HPP
11#include <boost/gil/concepts/channel.hpp>
12#include <boost/gil/concepts/color.hpp>
13#include <boost/gil/concepts/concept_check.hpp>
14#include <boost/gil/concepts/fwd.hpp>
15#include <boost/gil/concepts/pixel.hpp>
16#include <boost/gil/concepts/pixel_based.hpp>
22#if defined(BOOST_CLANG)
23#pragma clang diagnostic push
24#pragma clang diagnostic ignored "-Wunknown-pragmas"
25#pragma clang diagnostic ignored "-Wunused-local-typedefs"
28#if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
29#pragma GCC diagnostic push
30#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
33namespace boost {
namespace gil {
36template <
typename It>
struct const_iterator_type;
37template <
typename It>
struct iterator_is_mutable;
38template <
typename It>
struct is_iterator_adaptor;
39template <
typename It,
typename NewBaseIt>
struct iterator_adaptor_rebind;
40template <
typename It>
struct iterator_adaptor_get_base;
88template <
typename Iterator>
89struct RandomAccessIteratorIsMemoryBasedConcept
93 std::ptrdiff_t bs = memunit_step(it);
94 ignore_unused_variable_warning(bs);
96 it = memunit_advanced(it, 3);
97 std::ptrdiff_t bd = memunit_distance(it, it);
98 ignore_unused_variable_warning(bd);
100 memunit_advance(it,3);
107template <
typename Iterator>
112 gil_function_requires<Mutable_RandomAccessIterator<Iterator>>();
114 using ref_t =
typename std::remove_reference
116 typename std::iterator_traits<Iterator>::reference
119 gil_function_requires<detail::ChannelIsMutableConcept<channel_t>>();
139 using type =
typename transposed_type<T>::type;
140 ignore_unused_variable_warning(type{});
167template <
typename Iterator>
172 gil_function_requires<RandomAccessIterator<Iterator>>();
173 gil_function_requires<PixelBasedConcept<Iterator>>();
175 using value_type =
typename std::iterator_traits<Iterator>::value_type;
176 gil_function_requires<PixelValueConcept<value_type>>();
180 ignore_unused_variable_warning(is_mutable);
183 const_t const_it(it);
184 ignore_unused_variable_warning(const_it);
189 void check_base(std::false_type) {}
191 void check_base(std::true_type)
194 gil_function_requires<PixelIteratorConcept<base_t>>();
206template <
typename Iterator>
211 gil_function_requires<PixelIteratorConcept<Iterator>>();
212 gil_function_requires<detail::PixelIteratorIsMutableConcept<Iterator>>();
233template <
typename Iterator>
238 gil_function_requires<RandomAccessIterator<Iterator>>();
239 gil_function_requires<detail::RandomAccessIteratorIsMemoryBasedConcept<Iterator>>();
254template <
typename Iterator>
259 gil_function_requires<ForwardIterator<Iterator>>();
272template <
typename Iterator>
277 gil_function_requires<StepIteratorConcept<Iterator>>();
278 gil_function_requires<Mutable_ForwardIterator<Iterator>>();
314template <
typename Iterator>
319 gil_function_requires<ForwardIterator<Iterator>>();
322 gil_function_requires<ForwardIterator<base_t>>();
327 base_t base = it.base();
328 ignore_unused_variable_warning(base);
339template <
typename Iterator>
344 gil_function_requires<IteratorAdaptorConcept<Iterator>>();
345 gil_function_requires<Mutable_ForwardIterator<Iterator>>();
351#if defined(BOOST_CLANG)
352#pragma clang diagnostic pop
355#if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
356#pragma GCC diagnostic pop
defined(BOOST_NO_CXX17_HDR_MEMORY_RESOURCE)
Definition algorithm.hpp:36
Concept for locators and views that can define a type just like the given locator or view,...
Definition concepts/pixel_iterator.hpp:136
Iterator adaptor is a forward iterator adapting another forward iterator.
Definition concepts/pixel_iterator.hpp:316
Concept of a random-access iterator that can be advanced in memory units (bytes or bits)
Definition concepts/pixel_iterator.hpp:235
Iterator adaptor that is mutable.
Definition concepts/pixel_iterator.hpp:341
Pixel iterator that allows for changing its pixel.
Definition concepts/pixel_iterator.hpp:208
Step iterator that allows for modifying its current value.
Definition concepts/pixel_iterator.hpp:274
An STL random access traversal iterator over a model of PixelConcept.
Definition concepts/pixel_iterator.hpp:169
Step iterator concept.
Definition concepts/pixel_iterator.hpp:256
Returns the type of an iterator just like the input iterator, except operating over immutable values.
Definition pixel_iterator.hpp:40
Definition concepts/pixel_iterator.hpp:109
Specifies the element type of a homogeneous color base.
Definition color_base_algorithm.hpp:225
metafunction predicate determining whether the given iterator is a plain one or an adaptor over anoth...
Definition pixel_iterator.hpp:28
returns the base iterator for a given iterator adaptor. Provide an specialization when introducing ne...
Definition metafunctions.hpp:38
Changes the base iterator of an iterator adaptor. Provide an specialization when introducing new iter...
Definition pixel_iterator.hpp:36
Metafunction predicate returning whether the given iterator allows for changing its values.
Definition pixel_iterator.hpp:49