|
Boost : |
Subject: Re: [boost] Proposed SG14 <system_error2> ready for feedback
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2018-03-03 22:27:14
On 03/03/2018 21:11, mike via Boost wrote:
> I don't claim to understand all the implementation details, so sorry if this is dumb question:
>
> What happened to the idea to encode failure or success in a single bit in the status_code_domain pointer, thus making the check if an operation succeeded trivial even in the type-erased case?
That was a potential workaround for Boost.System to not break existing code.
A complete rebuild like <system_error2> doesn't need such hacks. It has
a formal empty state for those users who won't risk the cost of a
virtual function call. For everybody else, it costs one virtual function
call at worst, usually not even that as the compiler will have
speculatively inlined the implementation and/or the linker will have
implemented the 'final' modifier.
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