forked from boostorg/static_assert
Added __COUNTER__ based version for VC7 and later.
[SVN r19043]
This commit is contained in:
@ -59,13 +59,18 @@ template<int x> struct static_assert_test{};
|
||||
//
|
||||
#if !defined(BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS) && !defined(__MWERKS__)
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
|
||||
// __LINE__ macro broken when -ZI is used see Q199057
|
||||
// fortunately MSVC ignores duplicate typedef's.
|
||||
#define BOOST_STATIC_ASSERT( B ) \
|
||||
typedef ::boost::static_assert_test<\
|
||||
sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >)\
|
||||
> boost_static_assert_typedef_
|
||||
#elif defined(BOOST_MSVC)
|
||||
#define BOOST_STATIC_ASSERT( B ) \
|
||||
typedef ::boost::static_assert_test<\
|
||||
sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >)>\
|
||||
BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__)
|
||||
#elif defined(BOOST_INTEL_CXX_VERSION)
|
||||
// agurt 15/sep/02: a special care is needed to force Intel C++ issue an error
|
||||
// instead of warning in case of failure
|
||||
|
Reference in New Issue
Block a user