Generic Image Library: color.hpp Source File

###  | #  |

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 "-Wunknown-pragmas"
18#pragma clang diagnostic ignored "-Wunused-local-typedefs"
19#endif
20
21#if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
22#pragma GCC diagnostic push
23#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
24#endif
25
26namespace boost { namespace gil {
27
36template <typename CS>
37 struct ColorSpaceConcept
38{
39 void constraints()
40 {
41 // Boost.MP11-compatible list, whose elements are color tags
42
43 // TODO: Is this incomplete?
44 }
45};
46
47// Models ColorSpaceConcept
48template <typename CS1, typename CS2>
49struct color_spaces_are_compatible : std::is_same<CS1, CS2> {};
50
59template <typename CS1, typename CS2>
60 struct ColorSpacesCompatibleConcept
61{
62 void constraints()
63 {
64 static_assert(color_spaces_are_compatible<CS1, CS2>::value, "");
65 }
66};
67
77template <typename CM>
78 struct ChannelMappingConcept
79{
80 void constraints()
81 {
82 // Boost.MP11-compatible list, whose elements model
83 // MPLIntegralConstant representing a permutation.
84
85 // TODO: Is this incomplete?
86 }
87};
88
89}} // namespace boost::gil
90
91#if defined(BOOST_CLANG)
92#pragma clang diagnostic pop
93#endif
94
95#if defined(BOOST_GCC) && (BOOST_GCC >= 40900)
96#pragma GCC diagnostic pop
97#endif
98
99#endif
boost
defined(BOOST_NO_CXX17_HDR_MEMORY_RESOURCE)
Definition algorithm.hpp:36
boost::gil::ChannelMappingConcept
Channel mapping concept.
Definition color.hpp:79
boost::gil::ColorSpaceConcept
Color space type concept.
Definition color.hpp:38
boost::gil::ColorSpacesCompatibleConcept
Two color spaces are compatible if they are the same.
Definition color.hpp:61