Boost logo

Boost :

Subject: Re: [boost] [system] Would it be possible to trial a breaking change to Boost.System and see what happens?
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2018-01-14 00:34:24


> `if( ec == errc::success )` is an interesting solution to the
> NTSTATUS/HRESULT problem.

Oh if we could redo Boost.System with hindsight ... but that's always
the case with any standardised Boost library bar none. A decade or two
always shows up things no human could have possibly predicted.

My colleagues on SG14 are keen to design a <system_error2> which does
not suffer from any of the problems in <system_error>. And that may be
the case we take in the end anyway.

I am actually in the unusual position of being one of the few voices to
feel that the existing <system_error> is serviceable, and that any of
the <system_error2> proposals I've seen so far do not contribute enough
effect on the *runtime* code quality as to be worth going through the
travails of WG21 standardisation for.

I mean, sure, you can make a much nicer for C++ <system_error2> using
all the hindsight we have now. But you're not going to be using error
codes unless you really care about performance, in which case runtime
codegen is what you really care about much more than C++ niceness.

And current <system_error> generates pretty optimally fast codegen, even
on MSVC with its fenced error category fetches. My proposal would
eliminate most of the remaining badness that I am aware of.

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