is_similar.hpp 905 B

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // Copyright 2012 Christian Henning, Andreas Pokorny, Lubomir Bourdev
  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_EXTENSION_TOOLBOX_METAFUNCTIONS_IS_SIMILAR_HPP
  9. #define BOOST_GIL_EXTENSION_TOOLBOX_METAFUNCTIONS_IS_SIMILAR_HPP
  10. #include <boost/gil/channel.hpp>
  11. namespace boost{ namespace gil {
  12. /// is_similar metafunctions
  13. /// \brief Determines if two pixel types are similar.
  14. template< typename A, typename B >
  15. struct is_similar : mpl::false_ {};
  16. template<typename A>
  17. struct is_similar< A, A > : mpl::true_ {};
  18. template<typename B,int I, int S, bool M, int I2>
  19. struct is_similar< packed_channel_reference< B, I, S, M >
  20. , packed_channel_reference< B, I2, S, M >
  21. > : mpl::true_ {};
  22. } // namespace gil
  23. } // namespace boost
  24. #endif