Boost logo

Boost :

Subject: Re: [boost] Reforming Boost.System and <system_error> round 2
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2018-01-16 01:38:39

On 16/01/2018 10:18, Niall Douglas wrote:
> To summarise what the mock up demonstrates:
> 1. error_category() gains a new virtual function called `bool
> failure(int code)` which is now called by error_code's operator bool.

As I hinted in another post but didn't quite actually state, rather than
adding a new method, wouldn't it be sufficient to make operator bool do
something like:

    return *this == error_condition(0, generic_category());

(Using generic_category() is more correct, but given the default
constructor it might perhaps lead to less/zero code breakage to use
system_category() instead.)

Boost list run by bdawes at, gregod at, cpdaniel at, john at