Boost logo

Boost :

Subject: Re: [boost] expected/result/etc
From: Peter Dimov (lists_at_[hidden])
Date: 2016-02-11 20:26:29


Gavin Lambert wrote:
> >> Again, an assert is a useful tool in debug mode but it disappears in
> >> release mode. The only reason to elide this check is for performance.
> >
> > That's correct.
>
> Then it appears we are in violent agreement after all. :)

No, we aren't. Performance is a legitimate reason to elide the check, but
it's not the reason that op* doesn't throw (by contract). Again, throwing on
a logic error is an oxymoron. If the function is specified to throw under
such-and-such conditions, it's not an error to call it under those
conditions.

All that seems to deviate a bit from the actual topic of the thread though.


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