// // Copyright 2012 Christian Henning, Andreas Pokorny, Lubomir Bourdev // // Distributed under the Boost Software License, Version 1.0 // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // #ifndef BOOST_GIL_EXTENSION_TOOLBOX_METAFUNCTIONS_IS_HOMOGENEOUS_HPP #define BOOST_GIL_EXTENSION_TOOLBOX_METAFUNCTIONS_IS_HOMOGENEOUS_HPP #include #include #include namespace boost{ namespace gil { /// is_homogeneous metafunctions /// \brief Determines if a pixel types are homogeneous. template struct is_homogeneous_impl; template struct is_homogeneous_impl : std::true_type {}; template struct is_homogeneous_impl : mp11::mp_and < is_homogeneous_impl, std::is_same> > {}; template struct is_homogeneous : std::false_type {}; // pixel template struct is_homogeneous> : std::true_type {}; template struct is_homogeneous const> : std::true_type {}; template struct is_homogeneous&> : std::true_type {}; template struct is_homogeneous const&> : std::true_type {}; // planar pixel reference template struct is_homogeneous> : std::true_type {}; template struct is_homogeneous const> : std::true_type {}; template struct is_homogeneous_impl_p {}; // for packed_pixel template struct is_homogeneous> : is_homogeneous_impl_p < C, mp11::mp_at_c, 1, mp11::mp_size::value > {}; template< typename B , typename C , typename L > struct is_homogeneous const> : is_homogeneous_impl_p < C, mp11::mp_at_c, 1, mp11::mp_size::value > {}; // for bit_aligned_pixel_reference template struct is_homogeneous> : is_homogeneous_impl, 1, mp11::mp_size::value> {}; template struct is_homogeneous > : is_homogeneous_impl, 1, mp11::mp_size::value> {}; }} // namespace boost::gil #endif