
gast128
David Abrahams
writes: "gast 128"
writes: First I get not BOOST_MPL_ASSERT compilable on VC 7.1. From the documentation I could read that it could replace BOOST_MPL_ASSERT_IS_SAME, but I removed it completely, and switched back to BOOST_STATIC_ASSERT.
Please post the code.
That's simple:
#include "boost/mpl/assert.hpp"
void Testmpl6() { BOOST_MPL_ASSERT(false); //fails with error C2143: syntax error : missing '}' before '(' BOOST_MPL_ASSERT((false)); //same error }
But neither of those is supposed to work.
BOOST_MPL_ASSERT((<bool-valued-nullary-metafunction>))
is the only legal way to use this macro. For example,
BOOST_MPL_ASSERT((boost::mpl::false_))
which of course will fail to compile because the condition is false.
BOOST_MPL_ASSERT((boost::mpl::true_))
will pass.
If you are replacing BOOST_MPL_ASSERT_IS_SAME(x, y) you need to write:
BOOST_MPL_ASSERT((boost::is_same