]>
Commit | Line | Data |
---|---|---|
b32b8144 FG |
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 | ||
92f5a8d4 | 11 | #include <boost/mp11/version.hpp> |
b32b8144 FG |
12 | #include <type_traits> |
13 | #include <cstddef> | |
14 | ||
15 | namespace boost | |
16 | { | |
17 | namespace mp11 | |
18 | { | |
19 | ||
20 | // mp_bool | |
21 | template<bool B> using mp_bool = std::integral_constant<bool, B>; | |
22 | ||
23 | using mp_true = mp_bool<true>; | |
24 | using mp_false = mp_bool<false>; | |
25 | ||
26 | // mp_to_bool | |
27 | template<class T> using mp_to_bool = mp_bool<static_cast<bool>( T::value )>; | |
28 | ||
29 | // mp_not<T> | |
30 | template<class T> using mp_not = mp_bool< !T::value >; | |
31 | ||
32 | // mp_int | |
33 | template<int I> using mp_int = std::integral_constant<int, I>; | |
34 | ||
35 | // mp_size_t | |
36 | template<std::size_t N> using mp_size_t = std::integral_constant<std::size_t, N>; | |
37 | ||
38 | } // namespace mp11 | |
39 | } // namespace boost | |
40 | ||
41 | #endif // #ifndef BOOST_MP11_INTEGRAL_HPP_INCLUDED |