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 <boost/mp11/version.hpp>
12#include <boost/mp11/detail/mp_value.hpp>
13#include <type_traits>
14#include <cstddef>
15
16#if defined(_MSC_VER) || defined(__GNUC__)
17# pragma push_macro( "I" )
18# undef I
19#endif
20
21namespace boost
22{
23namespace mp11
24{
25
26// mp_bool
27template<bool B> using mp_bool = std::integral_constant<bool, B>;
28
29using mp_true = mp_bool<true>;
30using mp_false = mp_bool<false>;
31
32// mp_to_bool
33template<class T> using mp_to_bool = mp_bool<static_cast<bool>( T::value )>;
34
35// mp_not<T>
36template<class T> using mp_not = mp_bool< !T::value >;
37
38// mp_int
39template<int I> using mp_int = std::integral_constant<int, I>;
40
41// mp_size_t
42template<std::size_t N> using mp_size_t = std::integral_constant<std::size_t, N>;
43
44} // namespace mp11
45} // namespace boost
46
47#if defined(_MSC_VER) || defined(__GNUC__)
48# pragma pop_macro( "I" )
49#endif
50
51#endif // #ifndef BOOST_MP11_INTEGRAL_HPP_INCLUDED
52

source code of boost/libs/mp11/include/boost/mp11/integral.hpp