Subject: Re: [boost] Reforming Boost.System and <system_error> round 2
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2018-01-16 13:30:55


On 01/16/18 02:37, Robert Ramey via Boost wrote:
> On 1/15/18 1:18 PM, Niall Douglas via Boost wrote:
>
>> That leaves the request to fix "if(ec) ..." which right now returns true
>> if the value is 0, despite that much code writes "if(ec) ..." to mean
>> "if error then ...". There is also the issue of error coding schemes not
>> being able to have more than one success value, which usually must be 0.
>> That's the remaining discussion point.
>
> I apologize for parachuting into the discussion ...  But ...
>
> Can't one just have "if(ec) ..." invoke a syntax error?

Obviously, this will break lots of code for no good reason. I think, the
understanding of the meaning of such tests is more or less established.
The problem is to make it support additional use cases without
penalizing the existing code too much.