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_BIT_ALIGNED_TYPE_HPP
9 #define BOOST_GIL_EXTENSION_TOOLBOX_METAFUNCTIONS_IS_BIT_ALIGNED_TYPE_HPP
11 #include <boost/gil/bit_aligned_pixel_reference.hpp>
13 #include <type_traits>
15 namespace boost{ namespace gil {
17 /// is_bit_aligned metafunctions
18 /// \brief Determines whether the given type is bit_aligned.
20 template< typename PixelRef >
21 struct is_bit_aligned : std::false_type {};
23 template <typename B, typename C, typename L, bool M>
24 struct is_bit_aligned<bit_aligned_pixel_reference<B, C, L, M>> : std::true_type {};
26 template <typename B, typename C, typename L, bool M>
27 struct is_bit_aligned<bit_aligned_pixel_reference<B, C, L, M> const> : std::true_type {};
29 template <typename B, typename C, typename L>
30 struct is_bit_aligned<packed_pixel<B, C, L>> : std::true_type {};
32 template <typename B, typename C, typename L>
33 struct is_bit_aligned<packed_pixel<B, C, L> const> : std::true_type {};
35 }} // namespace boost::gil