Boost logo

Boost :

Subject: Re: [boost] expected/result/etc
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2016-02-11 20:01:34


On 12/02/2016 13:50, Peter Dimov wrote:
>> Then why doesn't it throw a logic_error?
>
> Because throwing a logic_error is an oxymoron. Logic errors should not
> throw.

And yet it was defined in the standard library for that purpose. :)

>> Or call abort()?
>
> That's basically what it does. Or a crash when asserts are disabled.
>
>> 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. :)


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