
Steven Watanabe wrote:
AMDG
On 1/27/2011 8:26 AM, Jeff Flinn wrote:
Stewart, Robert wrote:
+ #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
The abbreviated "MSG" seems out of place. I realize "BOOST_STATIC_ASSERT_MESSAGE" is very long, but it fits the pattern better. I could make it even worse by suggesting that "BOOST_STATIC_ASSERT_WITH_MESSAGE" would read better, particularly since the message isn't being asserted.
It would be nice to remain consistent boost test practice:
BOOST_WARN_MESSAGE(predicate, message) BOOST_CHECK_MESSAGE(predicate, message) BOOST_REQUIRE_MESSAGE(predicate, message)
BOOST_STATIC_ASSERT_MESSAGE(predicate, message)
and didn't Beman just add a
BOOST_ASSERT_MESSAGE(predicate, message)
No. He added BOOST_ASSERT_MSG. This is consistent with BOOST_MPL_ASSERT_MSG.
Ahh, I forgot about that one. So the _MSG has some precedence, and is closer related to the existing BOOST_MPL_ASSERT_MSG, than to the boost test, IMHO, of course. Jeff