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 19:14:08

>> I feel no love for this design. What I want to do is construct an error
>> code from some C error code returned to me without additional logic. I
>> should not need to know whether the C error code is success or failure.
> Someone has to decide what code is a success and what is not. In my
> code, it is the creator of `error_code`, who is supposed to be familiar
> with the domain. It should usually be `make_error_code`, a facility
> coupled with the error category and error domain.

That *might* be the case. But it absolutely might also not be.

I'm not at all convinced that the constructor of an error_code will
always know if that code represents success or failure. Moreover, I see
no reason why it _should_ know. It's none of its business.


ned Productions Limited Consulting

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