Merge trunk BOOST_ASSERT_MSG additions

[SVN r68912]
This commit is contained in:
Beman Dawes
2011-02-15 14:54:16 +00:00
parent 6f1d2476fa
commit 06dedcd232

View File

@ -17,6 +17,12 @@
#include <boost/config.hpp> #include <boost/config.hpp>
#include <boost/detail/workaround.hpp> #include <boost/detail/workaround.hpp>
#ifndef BOOST_NO_STATIC_ASSERT
# define BOOST_STATIC_ASSERT_MSG( B, Msg ) static_assert(B, Msg)
#else
# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B )
#endif
#ifdef __BORLANDC__ #ifdef __BORLANDC__
// //
// workaround for buggy integral-constant expression support: // workaround for buggy integral-constant expression support:
@ -38,7 +44,7 @@
# define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x) # define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x)
#endif #endif
#ifdef BOOST_HAS_STATIC_ASSERT #ifndef BOOST_NO_STATIC_ASSERT
# define BOOST_STATIC_ASSERT( B ) static_assert(B, #B) # define BOOST_STATIC_ASSERT( B ) static_assert(B, #B)
#else #else
@ -125,7 +131,7 @@ template<int x> struct static_assert_test{};
enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \
= sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) } = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) }
#endif #endif
#endif // ndef BOOST_HAS_STATIC_ASSERT #endif // defined(BOOST_NO_STATIC_ASSERT)
#endif // BOOST_STATIC_ASSERT_HPP #endif // BOOST_STATIC_ASSERT_HPP