|
Boost : |
Subject: Re: [boost] Reforming Boost.System and <system_error> round 2
From: Peter Dimov (lists_at_[hidden])
Date: 2018-01-16 14:06:03
Richard Hodges wrote:
> Rather than change the meaning of the (ambiguous but no doubt ubiquitous)
> bool conversion, might it not be better to offer a new method?
>
> if (ec.is_error())
...
Or ec.failed().
I doubt that we'll be able to change the meaning of `if(ec)` in the
standard. Although who knows, it's a compatible change in the case nobody
overrides error_category::failed. Which they don't because it doesn't exist
yet.
I don't much like `if(ec)`, it's a bit counter-intuitive that it means
"failed" and not "succeeded". But it's short and idiomatic.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk