|
Boost Users : |
From: John Maddock (john_at_[hidden])
Date: 2008-03-27 05:31:33
Beman Dawes wrote:
> John Maddock wrote:
>>> ...
>>> As you can see, it fails at line 3 as it should, while not
>>> complaining about line 2. It will not complain about any
>>> old-style-cast either. So the test was completely successful.
>>
>> Hardly that successful: those error messages are awful! The whole
>> point of BOOST_STATIC_ASSERT is to provide semi-readable error
>> messages - at least so that you know it's a static assertion failure
>> and not some other issue that's the problem.
>>
>> I'll have another look at this when I have a chance.
>
> static_assert seems to be one of the first C++0x features compilers
> are implementing. Maybe we should be working on a transition plan for
> BOOST_STATIC_ASSERT. Or do you already have a plan and I'm just behind
> the times?
There's already a hook in the implementation to the native static_assert
when available, however, a new macro that accepts a message string as well
as the test might well be in order :-)
John.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net