16 Jan
2018
16 Jan
'18
2:06 p.m.
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.