Boost GIL


color.hpp
1 //
2 // Copyright 2005-2007 Adobe Systems Incorporated
3 //
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
7 //
8 #ifndef BOOST_GIL_CONCEPTS_COLOR_HPP
9 #define BOOST_GIL_CONCEPTS_COLOR_HPP
10 
11 #include <boost/gil/concepts/concept_check.hpp>
12 
13 #include <type_traits>
14 
15 #if defined(BOOST_CLANG)
16 #pragma clang diagnostic push
17 #pragma clang diagnostic ignored "-Wunused-local-typedefs"
18 #endif
19 
20 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
21 #pragma GCC diagnostic push
22 #pragma GCC diagnostic ignored "-Wunused-local-typedefs"
23 #endif
24 
25 namespace boost { namespace gil {
26 
35 template <typename CS>
37 {
38  void constraints()
39  {
40  // Boost.MP11-compatible list, whose elements are color tags
41 
42  // TODO: Is this incomplete?
43  }
44 };
45 
46 // Models ColorSpaceConcept
47 template <typename CS1, typename CS2>
48 struct color_spaces_are_compatible : std::is_same<CS1, CS2> {};
49 
58 template <typename CS1, typename CS2>
60 {
61  void constraints()
62  {
63  static_assert(color_spaces_are_compatible<CS1, CS2>::value, "");
64  }
65 };
66 
76 template <typename CM>
78 {
79  void constraints()
80  {
81  // Boost.MP11-compatible list, whose elements model
82  // MPLIntegralConstant representing a permutation.
83 
84  // TODO: Is this incomplete?
85  }
86 };
87 
88 }} // namespace boost::gil
89 
90 #if defined(BOOST_CLANG)
91 #pragma clang diagnostic pop
92 #endif
93 
94 #if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
95 #pragma GCC diagnostic pop
96 #endif
97 
98 #endif
Channel mapping concept.
Definition: color.hpp:77
Color space type concept.
Definition: color.hpp:36
Two color spaces are compatible if they are the same.
Definition: color.hpp:59