Imported Upstream version 1.72.0
[platform/upstream/boost.git] / boost / gil / extension / toolbox / metafunctions / is_bit_aligned.hpp
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_BIT_ALIGNED_TYPE_HPP
9 #define BOOST_GIL_EXTENSION_TOOLBOX_METAFUNCTIONS_IS_BIT_ALIGNED_TYPE_HPP
10
11 #include <boost/gil/bit_aligned_pixel_reference.hpp>
12
13 #include <type_traits>
14
15 namespace boost{ namespace gil {
16
17 /// is_bit_aligned metafunctions
18 /// \brief Determines whether the given type is bit_aligned.
19
20 template< typename PixelRef >
21 struct is_bit_aligned : std::false_type {};
22
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 {};
25
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 {};
28
29 template <typename B, typename C, typename L>
30 struct is_bit_aligned<packed_pixel<B, C, L>> : std::true_type {};
31
32 template <typename B, typename C, typename L>
33 struct is_bit_aligned<packed_pixel<B, C, L> const> : std::true_type {};
34
35 }} // namespace boost::gil
36
37 #endif