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/device_n.hpp>
17 #include <boost/gil/gray.hpp>
18 #include <boost/gil/rgb.hpp>
19 #include <boost/gil/rgba.hpp>
20 #include <boost/gil/cmyk.hpp>
22 #include <boost/concept_check.hpp>
24 namespace gil = boost::gil;
25 using boost::function_requires;
29 // TODO: Most constraints() for color concepts are no-op as not implemented.
30 // Once implemented, this test should help to catch any issues early.
32 function_requires<gil::ColorSpaceConcept<gil::devicen_t<2>>>();
33 function_requires<gil::ColorSpaceConcept<gil::devicen_t<3>>>();
34 function_requires<gil::ColorSpaceConcept<gil::devicen_t<4>>>();
35 function_requires<gil::ColorSpaceConcept<gil::devicen_t<5>>>();
36 function_requires<gil::ColorSpaceConcept<gil::gray_t>>();
37 function_requires<gil::ColorSpaceConcept<gil::cmyk_t>>();
38 function_requires<gil::ColorSpaceConcept<gil::rgb_t>>();
39 function_requires<gil::ColorSpaceConcept<gil::rgba_t>>();
41 function_requires<gil::ColorSpacesCompatibleConcept<gil::gray_t, gil::gray_t>>();
42 function_requires<gil::ColorSpacesCompatibleConcept<gil::cmyk_t, gil::cmyk_t>>();
43 function_requires<gil::ColorSpacesCompatibleConcept<gil::rgb_t, gil::rgb_t>>();
44 function_requires<gil::ColorSpacesCompatibleConcept<gil::rgba_t, gil::rgba_t>>();
45 function_requires<gil::ColorSpacesCompatibleConcept