diff --git a/include/boost/static_assert.hpp b/include/boost/static_assert.hpp index dfeafe5..11f8490 100644 --- a/include/boost/static_assert.hpp +++ b/include/boost/static_assert.hpp @@ -59,13 +59,18 @@ template 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