Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2008-06-20 11:41:40

Yesterday someone on the user's list posted a message
( about a
"compilation error in the boost code:"

  s-test.h:49: instantiated from here
  /usr/include/boost/archive/detail/oserializer.hpp:567: error: invalid
  application of 'sizeof' to incomplete
  type 'boost::STATIC_ASSERTION_FAILURE<false>'
  make: *** [stest] Error 1

and proceeded to try to analyze the BOOST_STATIC_ASSERT implementation
to see what was wrong with it. Granted, most people figure out what a
static assertion is supposed to be, but still, the error message gave no
clue about what might have gone wrong... no clue to the user, and no
clue to anyone reading his posting, unless they were going to look up
the line in the source file... oops, I take it back. My copy of
oserializer.hpp doesn't even have a line 567, and the posting doesn't
indicate which version the user has.

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
 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.


Dave Abrahams
BoostPro Computing

Boost list run by bdawes at, gregod at, cpdaniel at, john at