Boost logo

Boost :

Subject: Re: [boost] Reforming Boost.System and <system_error> round 2
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2018-01-16 14:52:11


On 16/01/2018 13:55, Richard Hodges via Boost 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())
> {
> // ...
> }

Why can't those who really, really want to avoid any potential virtual
function call in `if(ec) ...` simply write:

if(ec.value() != 0) ...

No new member functions needed.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/

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