123456789101112131415161718192021222324252627282930 |
- #ifndef BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP
- #define BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP
- #include <boost/chrono/config.hpp>
- #ifndef BOOST_NO_CXX11_STATIC_ASSERT
- #define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
- #elif defined(BOOST_CHRONO_USES_STATIC_ASSERT)
- #include <boost/static_assert.hpp>
- #define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
- #elif defined(BOOST_CHRONO_USES_MPL_ASSERT)
- #include <boost/mpl/assert.hpp>
- #include <boost/mpl/bool.hpp>
- #define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) \
- BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
- #else
- #define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_JOIN(boost_chrono_test_,__LINE__)[(CND)?1:-1]
- #endif
- #endif
|