
Felipe Magno de Almeida wrote:
On Fri, Jun 20, 2008 at 12:41 PM, David Abrahams <dave@boostpro.com> wrote:
Hi David,
[snip - bad user experience with BOOST_STATIC_ASSERT]
For several releases now we've had a suite of static assertion tools that give far superior error messages to what BOOST_STATIC_ASSERT can provide (http://www.boost.org/doc/libs/1_35_0/libs/mpl/doc/refmanual/asserts.html). I think <radical-idea>it's time to deprecate BOOST_STATIC_ASSERT</radical-idea> or at *least* put a prominent note in its documentation directing people at the BOOST_MPL_ASSERT macros.
Thoughts?
Couldn't BOOST_STATIC_ASSERT be implemented as:
#define BOOST_STATIC_ASSERT(x) BOOST_MPL_ASSERT(x)
?
No, it would have to be something like: BOOST_MPL_ASSERT(mpl::bool_<(x)>)
I like how easy it is to use BOOST_STATIC_ASSERT:
#include <boost/static_assert.hpp>
BOOST_STATIC_ASSERT(( /*whatever*/ ));
It is more straightforward than BOOST_MPL_ASSERT.
Yes, there is no doubt that it is more straightforward for the person writing the assertion. -- Dave Abrahams BoostPro Computing http://www.boostpro.com