BOOST_STATIC_ASSERT_MSG bug?
#ifndef BOOST_NO_CXX11_STATIC_ASSERT # ifndef BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__) # else # define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B ) # endif #else # define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B ) #endif The second case looks wrong, we have static_assert in this case; should it not be static_assert( B, Msg ) instead?
#ifndef BOOST_NO_CXX11_STATIC_ASSERT # ifndef BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__) # else # define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B ) # endif #else # define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B ) #endif
The second case looks wrong, we have static_assert in this case; should it not be static_assert( B, Msg ) instead?
You're right, although in practice any compiler that has static_assert has variadic macros as well. I'll fix this as soon as I can get access to static_assert's Git repro. John.
participants (2)
-
John Maddock
-
Peter Dimov