From: David Abrahams (dave_at_[hidden])
Date: 2008-06-22 21:08:23
Andrey Semashev wrote:
> As a user and a library writer I would ask to keep BOOST_STATIC_ASSERT
> as it is without deprecation. I'm using this macro on a regular basis
> and found no problems with it. I usually put a comment near the macro
> that explains what the check does and I'm very sure the comment will be
> far more informative than any compiler-generated error message (unless
> we are speaking of static_assert in C++0x).
Oh, I agree. Probably even if we _are_ speaking of static_assert in
C++0x. The problem of course is that (generalizing wildly here):
1. users don't look at the code
2. users can't even locate the line where the error occurred in a long
3. the part of the backtrace they paste into their problem reports
doesn't contain the information you need to know what went wrong.
The point is that BOOST_MPL_ASSERT does a better job of highlighting the
> I wouldn't like to move to BOOST_MPL_ASSERT since (a) it would require
> to change my code (b) it would complicate condition expressions with
> compile-time constants
How do you manage to use BOOST_STATIC_ASSERT without compile-time constants?
> and (c) it would introduce dependency on MPL
> where there was no such dependency.
That can be dealt with, if necessary, by factoring out that part of the
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk