]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/multiprecision/include/boost/multiprecision/traits/is_byte_container.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / multiprecision / include / boost / multiprecision / traits / is_byte_container.hpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Copyright 2015 John Maddock. Distributed under the Boost
3 // Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6 #ifndef BOOST_IS_BYTE_CONTAINER_HPP
7 #define BOOST_IS_BYTE_CONTAINER_HPP
8
9 #include <boost/mpl/has_xxx.hpp>
10 #include <boost/type_traits/is_integral.hpp>
11
12 namespace boost{ namespace multiprecision{ namespace detail{
13
14 BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_member_value_type, value_type, false);
15 BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_member_const_iterator, const_iterator, false);
16
17 template <class C, bool b>
18 struct is_byte_container_imp
19 {
20 static const bool value = boost::is_integral<typename C::value_type>::value && (sizeof(typename C::value_type) == 1);
21 };
22
23 template <class C>
24 struct is_byte_container_imp<C, false> : public boost::false_type {};
25
26 template <class C>
27 struct is_byte_container : public is_byte_container_imp<C, has_member_value_type<C>::value && has_member_const_iterator<C>::value> {};
28
29
30 }}} // namespaces
31
32 #endif // BOOST_IS_BYTE_CONTAINER_HPP
33