2 // Copyright 2019 Mateusz Loskot <mateusz at loskot dot net>
4 // Distributed under the Boost Software License, Version 1.0
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
8 // FIXME: Avoid Clang's flooding of non-disableable warnings like:
9 // "T does not declare any constructor to initialize its non-modifiable members"
10 // when compiling with concepts check enabled.
11 // See https://bugs.llvm.org/show_bug.cgi?id=41759
12 #if !defined(BOOST_GIL_USE_CONCEPT_CHECK) && !defined(__clang__)
13 #error Compile with BOOST_GIL_USE_CONCEPT_CHECK defined
15 #include <boost/gil/concepts.hpp>
16 #include <boost/gil/color_base.hpp> // kth_element_type
17 #include <boost/gil/pixel.hpp> // kth_element_type
18 #include <boost/gil/pixel_iterator.hpp>
19 #include <boost/gil/pixel_iterator_adaptor.hpp>
20 #include <boost/gil/planar_pixel_iterator.hpp> // kth_element_type
21 #include <boost/gil/planar_pixel_reference.hpp> // kth_element_type
22 #include <boost/gil/typedefs.hpp>
24 #include <boost/concept_check.hpp>
26 namespace gil
= boost::gil
;
27 using boost::function_requires
;
29 template <typename Iterator
>
32 function_requires
<gil::PixelIteratorConcept
<Iterator
>>();
33 function_requires
<gil::HasDynamicXStepTypeConcept
<Iterator
>>();
34 // NOTE: Pixel iterator does not model Y-step
35 //function_requires<gil::HasDynamicYStepTypeConcept<Iterator>>();
38 template <typename Iterator
>
41 function_requires
<gil::MutablePixelIteratorConcept
<Iterator
>>();
42 function_requires
<gil::HasDynamicXStepTypeConcept
<Iterator
>>();
43 // NOTE: Pixel iterator does not model Y-step
44 //function_requires<gil::HasDynamicYStepTypeConcept<Iterator>>();
49 test_mutable
<gil::gray8_ptr_t
>();
50 test_mutable
<gil::gray8_step_ptr_t
>();
51 test_mutable
<gil::gray16_ptr_t
>();
52 test_mutable
<gil::gray16_step_ptr_t
>();
53 test_mutable
<gil::gray32_ptr_t
>();
54 test_mutable
<gil::gray32_step_ptr_t
>();
55 test_mutable
<gil::gray32f_ptr_t
>();
56 test_mutable
<gil::gray32f_step_ptr_t
>();
57 test_immutable
<gil::gray8c_ptr_t
>();
58 test_immutable
<gil::gray8c_step_ptr_t
>();
59 test_immutable
<gil::gray16c_ptr_t
>();
60 test_immutable
<gil::gray16c_step_ptr_t
>();
61 test_immutable
<gil::gray32c_ptr_t
>();
62 test_immutable
<gil::gray32c_step_ptr_t
>();
63 test_immutable
<gil::gray32fc_ptr_t
>();
64 test_immutable
<gil::gray32fc_step_ptr_t
>();
66 test_mutable
<gil::abgr8_ptr_t
>();
67 test_mutable
<gil::abgr8_step_ptr_t
>();
68 test_mutable
<gil::abgr16_ptr_t
>();
69 test_mutable
<gil::abgr16_step_ptr_t
>();
70 test_mutable
<gil::abgr32_ptr_t
>();
71 test_mutable
<gil::abgr32_step_ptr_t
>();
72 test_mutable
<gil::abgr32f_ptr_t
>();
73 test_mutable
<gil::abgr32f_step_ptr_t
>();
74 test_immutable
<gil::abgr8c_ptr_t
>();
75 test_immutable
<gil::abgr8c_step_ptr_t
>();
76 test_immutable
<gil::abgr16c_ptr_t
>();
77 test_immutable
<gil::abgr16c_step_ptr_t
>();
78 test_immutable
<gil::abgr32c_ptr_t
>();
79 test_immutable
<gil::abgr32c_step_ptr_t
>();
80 test_immutable
<gil::abgr32fc_ptr_t
>();
81 test_immutable
<gil::abgr32fc_step_ptr_t
>();
83 test_mutable
<gil::argb8_ptr_t
>();
84 test_mutable
<gil::argb8_step_ptr_t
>();
85 test_mutable
<gil::argb16_ptr_t
>();
86 test_mutable
<gil::argb16_step_ptr_t
>();
87 test_mutable
<gil::argb32_ptr_t
>();
88 test_mutable
<gil::argb32_step_ptr_t
>();
89 test_mutable
<gil::argb32f_ptr_t
>();
90 test_mutable
<gil::argb32f_step_ptr_t
>();
92 test_mutable
<gil::bgr8_ptr_t
>();
93 test_mutable
<gil::bgr8_step_ptr_t
>();
94 test_mutable
<gil::bgr16_ptr_t
>();
95 test_mutable
<gil::bgr16_step_ptr_t
>();
96 test_mutable
<gil::bgr32_ptr_t
>();
97 test_mutable
<gil::bgr32_step_ptr_t
>();
98 test_mutable
<gil::bgr32f_ptr_t
>();
99 test_mutable
<gil::bgr32f_step_ptr_t
>();
101 test_mutable
<gil::bgra8_ptr_t
>();
102 test_mutable
<gil::bgra8_step_ptr_t
>();
103 test_mutable
<gil::bgra16_ptr_t
>();
104 test_mutable
<gil::bgra16_step_ptr_t
>();
105 test_mutable
<gil::bgra32_ptr_t
>();
106 test_mutable
<gil::bgra32_step_ptr_t
>();
107 test_mutable
<gil::bgra32f_ptr_t
>();
108 test_mutable
<gil::bgra32f_step_ptr_t
>();
110 test_mutable
<gil::rgb8_ptr_t
>();
111 test_mutable
<gil::rgb8_step_ptr_t
>();
112 test_mutable
<gil::rgb8_planar_ptr_t
>();
113 test_mutable
<gil::rgb8_planar_step_ptr_t
>();
114 test_mutable
<gil::rgb16_ptr_t
>();
115 test_mutable
<gil::rgb16_step_ptr_t
>();
116 test_mutable
<gil::rgb16_planar_ptr_t
>();
117 test_mutable
<gil::rgb16_planar_step_ptr_t
>();
118 test_mutable
<gil::rgb32_ptr_t
>();
119 test_mutable
<gil::rgb32_step_ptr_t
>();
120 test_mutable
<gil::rgb32_planar_ptr_t
>();
121 test_mutable
<gil::rgb32_planar_step_ptr_t
>();
122 test_mutable
<gil::rgb32f_ptr_t
>();
123 test_mutable
<gil::rgb32f_step_ptr_t
>();
124 test_mutable
<gil::rgb32f_planar_ptr_t
>();
125 test_mutable
<gil::rgb32f_planar_step_ptr_t
>();
126 test_immutable
<gil::rgb8c_ptr_t
>();
127 test_immutable
<gil::rgb8c_step_ptr_t
>();
128 test_immutable
<gil::rgb16c_ptr_t
>();
129 test_immutable
<gil::rgb16c_step_ptr_t
>();
130 test_immutable
<gil::rgb32c_ptr_t
>();
131 test_immutable
<gil::rgb32c_step_ptr_t
>();
132 test_immutable
<gil::rgb32fc_ptr_t
>();
133 test_immutable
<gil::rgb32fc_step_ptr_t
>();
135 test_mutable
<gil::rgba8_ptr_t
>();
136 test_mutable
<gil::rgba8_step_ptr_t
>();
137 test_mutable
<gil::rgba8_planar_ptr_t
>();
138 test_mutable
<gil::rgba8_planar_step_ptr_t
>();
139 test_mutable
<gil::rgba16_ptr_t
>();
140 test_mutable
<gil::rgba16_step_ptr_t
>();
141 test_mutable
<gil::rgba16_planar_ptr_t
>();
142 test_mutable
<gil::rgba16_planar_step_ptr_t
>();
143 test_mutable
<gil::rgba32_ptr_t
>();
144 test_mutable
<gil::rgba32_step_ptr_t
>();
145 test_mutable
<gil::rgba32_planar_ptr_t
>();
146 test_mutable
<gil::rgba32_planar_step_ptr_t
>();
147 test_mutable
<gil::rgba32f_ptr_t
>();
148 test_mutable
<gil::rgba32f_step_ptr_t
>();
149 test_mutable
<gil::rgba32f_planar_ptr_t
>();
150 test_mutable
<gil::rgba32f_planar_step_ptr_t
>();
152 test_mutable
<gil::cmyk8_ptr_t
>();
153 test_mutable
<gil::cmyk8_step_ptr_t
>();
154 test_mutable
<gil::cmyk8_planar_ptr_t
>();
155 test_mutable
<gil::cmyk8_planar_step_ptr_t
>();
156 test_mutable
<gil::cmyk16_ptr_t
>();
157 test_mutable
<gil::cmyk16_step_ptr_t
>();
158 test_mutable
<gil::cmyk16_planar_ptr_t
>();
159 test_mutable
<gil::cmyk16_planar_step_ptr_t
>();
160 test_mutable
<gil::cmyk32_ptr_t
>();
161 test_mutable
<gil::cmyk32_step_ptr_t
>();
162 test_mutable
<gil::cmyk32_planar_ptr_t
>();
163 test_mutable
<gil::cmyk32_planar_step_ptr_t
>();
164 test_mutable
<gil::cmyk32f_ptr_t
>();
165 test_mutable
<gil::cmyk32f_step_ptr_t
>();
166 test_mutable
<gil::cmyk32f_planar_ptr_t
>();
167 test_mutable
<gil::cmyk32f_planar_step_ptr_t
>();
168 test_immutable
<gil::cmyk8c_ptr_t
>();
169 test_immutable
<gil::cmyk8c_step_ptr_t
>();
170 test_immutable
<gil::cmyk8c_planar_ptr_t
>();
171 test_immutable
<gil::cmyk8c_planar_step_ptr_t
>();