2 // Copyright 2005-2007 Adobe Systems Incorporated
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 #ifndef BOOST_GIL_CONCEPTS_COLOR_HPP
9 #define BOOST_GIL_CONCEPTS_COLOR_HPP
11 #include <boost/gil/concepts/concept_check.hpp>
13 #include <type_traits>
15 #if defined(BOOST_CLANG)
16 #pragma clang diagnostic push
17 #pragma clang diagnostic ignored "-Wunused-local-typedefs"
20 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
21 #pragma GCC diagnostic push
22 #pragma GCC diagnostic ignored "-Wunused-local-typedefs"
25 namespace boost { namespace gil {
27 /// \ingroup ColorSpaceAndLayoutConcept
28 /// \brief Color space type concept
30 /// concept ColorSpaceConcept<MPLRandomAccessSequence CS>
32 /// // Boost.MP11-compatible list, whose elements are color tags.
35 template <typename CS>
36 struct ColorSpaceConcept
40 // Boost.MP11-compatible list, whose elements are color tags
42 // TODO: Is this incomplete?
46 // Models ColorSpaceConcept
47 template <typename CS1, typename CS2>
48 struct color_spaces_are_compatible : std::is_same<CS1, CS2> {};
50 /// \ingroup ColorSpaceAndLayoutConcept
51 /// \brief Two color spaces are compatible if they are the same
53 /// concept ColorSpacesCompatibleConcept<ColorSpaceConcept CS1, ColorSpaceConcept CS2>
55 /// where SameType<CS1, CS2>;
58 template <typename CS1, typename CS2>
59 struct ColorSpacesCompatibleConcept
63 static_assert(color_spaces_are_compatible<CS1, CS2>::value, "");
67 /// \ingroup ColorSpaceAndLayoutConcept
68 /// \brief Channel mapping concept
70 /// concept ChannelMappingConcept<MPLRandomAccessSequence CM>
72 /// // Boost.MP11-compatible list, whose elements
73 /// // model MPLIntegralConstant representing a permutation
76 template <typename CM>
77 struct ChannelMappingConcept
81 // Boost.MP11-compatible list, whose elements model
82 // MPLIntegralConstant representing a permutation.
84 // TODO: Is this incomplete?
88 }} // namespace boost::gil
90 #if defined(BOOST_CLANG)
91 #pragma clang diagnostic pop
94 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
95 #pragma GCC diagnostic pop