Boost logo

Boost :

Subject: Re: [boost] [system] Would it be possible to trial a breaking change to Boost.System and see what happens?
From: Peter Dimov (lists_at_[hidden])
Date: 2018-01-13 00:20:25


Niall Douglas wrote:
> > A principled approach would be to ask the category whether a code is
> > `true` or `false`, but that might be complexity and overhead nobody
> > needs.
>
> I think it unavoidable myself (and hardly complex to implement). Only an
> error category knows if some value or other means success or not.
>
> There would be not much overhead if the category implementation marks the
> function used final, as I expect it would.

I'm not sure it would matter much in the general case whether the category
implementation has marked the function final or not; if the compiler doesn't
know the dynamic type of error_code::category(), it would need to issue the
virtual call.


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