From: Beman Dawes (beman_at_[hidden])
Date: 1999-08-31 15:07:34
Valentin Bonnard wrote:
>Beman Dawes wrote:
>> The real question is whether to stick with assert() or try to
>> something along the lines of assertion<>(). It seems to me that
>> assertion<>() meets identified needs:
>> * Code usually optimized away if not active.
>Need a compile time constant to do that.
>> * Avoids ODR violations.
*@#$%! assertion<>() does violate the ODR. I was misreading 3.2
[basic.def.odr] paragraph 5. Argh...
>> * Avoids possibly harmful macro usage.
>> Needs identified so far that assertion<>() doesn't meet :
>> * Reporting of file and line.
>These are contradicting. We must choose.
Well, it is possible to pass __LINE__ and __FILE__ as arguments, but
you are right in that people probably wouldn't like to do that extra
>> * Parameterization of exception type.
>If it's only used for debugguing, it is worth the
I don't personally know, but included it because Bjarne says it is
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk