123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #ifndef BOOST_MP11_INTEGRAL_HPP_INCLUDED
- #define BOOST_MP11_INTEGRAL_HPP_INCLUDED
- #include <boost/mp11/version.hpp>
- #include <boost/mp11/detail/mp_value.hpp>
- #include <type_traits>
- #include <cstddef>
- #if defined(_MSC_VER) || defined(__GNUC__)
- # pragma push_macro( "I" )
- # undef I
- #endif
- namespace boost
- {
- namespace mp11
- {
- template<bool B> using mp_bool = std::integral_constant<bool, B>;
- using mp_true = mp_bool<true>;
- using mp_false = mp_bool<false>;
- template<class T> using mp_to_bool = mp_bool<static_cast<bool>( T::value )>;
- template<class T> using mp_not = mp_bool< !T::value >;
- template<int I> using mp_int = std::integral_constant<int, I>;
- template<std::size_t N> using mp_size_t = std::integral_constant<std::size_t, N>;
- }
- }
- #if defined(_MSC_VER) || defined(__GNUC__)
- # pragma pop_macro( "I" )
- #endif
- #endif
|