Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-07-01 12:57:03


Michael Behrns-Miller wrote:
> Is there a way to make the end-of-the-chain error message
> (`boost::STATIC_ASSERTION_FAILURE<false>' does not
> have member `value') more clear? I would rate the severity of the
> difficulty a 2 or 3 out of 10, from a new user's perspective. It
> seemed intuitive enough once I understood the requirement. Putting
> the serialization save calls within a const save(archive) function of
> the object being serialized made it a non-issue for me. I haven't used
it
> enough to say I won't run into the const issue again, but at least I
> know about it now.

This is something other people has asked for but we've never been able to
figure out how to implement it. Whenever I do include a BOOST_STATIC_ASSERT
that a library user might be expected to trip on, I include comments at that
point which describes the problem and hopefully a helpful course of action.
When I build in my environment (VC 7.1) and double click on the error
message, the BOOST_STATIC_ASSERT pops up and right there is the comment
explaining it. To me, this seems pretty good and I would hope that this
would minimize the time a user has to spend looking for sources to these
problems. In fact, I have received mail from users that have remarked upon
exactly this feature/practice as being very helpful in understanding these
other wise very subtle errors. By far the best one is when one uses an
xml_archive to serialize something which doesn't have a variable name
attached. It pops a STATIC_ASSERT and the comment right there is the
comment describing what one is doing wrong.

Robert Ramey


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk