2 // Copyright 2012 Christian Henning, Andreas Pokorny, Lubomir Bourdev
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_EXTENSION_TOOLBOX_METAFUNCTIONS_IS_SIMILAR_HPP
9 #define BOOST_GIL_EXTENSION_TOOLBOX_METAFUNCTIONS_IS_SIMILAR_HPP
11 #include <boost/gil/channel.hpp>
13 #include <type_traits>
15 namespace boost{ namespace gil {
17 /// is_similar metafunctions
18 /// \brief Determines if two pixel types are similar.
20 template<typename A, typename B>
21 struct is_similar : std::false_type {};
24 struct is_similar<A, A> : std::true_type {};
26 template<typename B,int I, int S, bool M, int I2>
29 packed_channel_reference<B, I, S, M>,
30 packed_channel_reference<B, I2, S, M>
31 > : std::true_type {};
33 }} // namespace boost::gil