16 Jan
2018
16 Jan
'18
7:08 p.m.
On 01/16/18 22:00, Niall Douglas via Boost wrote:
For the record, I was thinking of (and testing) a different implementation that does not involve the `failed` call. Instead, I changed the `error_code` constructors:
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.