]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/mp11/integral.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / mp11 / integral.hpp
1 #ifndef BOOST_MP11_INTEGRAL_HPP_INCLUDED
2 #define BOOST_MP11_INTEGRAL_HPP_INCLUDED
3
4 // Copyright 2015 Peter Dimov.
5 //
6 // Distributed under the Boost Software License, Version 1.0.
7 //
8 // See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt
10
11 #include <type_traits>
12 #include <cstddef>
13
14 namespace boost
15 {
16 namespace mp11
17 {
18
19 // mp_bool
20 template<bool B> using mp_bool = std::integral_constant<bool, B>;
21
22 using mp_true = mp_bool<true>;
23 using mp_false = mp_bool<false>;
24
25 // mp_to_bool
26 template<class T> using mp_to_bool = mp_bool<static_cast<bool>( T::value )>;
27
28 // mp_not<T>
29 template<class T> using mp_not = mp_bool< !T::value >;
30
31 // mp_int
32 template<int I> using mp_int = std::integral_constant<int, I>;
33
34 // mp_size_t
35 template<std::size_t N> using mp_size_t = std::integral_constant<std::size_t, N>;
36
37 } // namespace mp11
38 } // namespace boost
39
40 #endif // #ifndef BOOST_MP11_INTEGRAL_HPP_INCLUDED