$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [review] Review of Outcome (starts Fri-19-May)
From: Peter Dimov (lists_at_[hidden])
Date: 2017-05-19 14:39:37
Niall Douglas wrote:
> > https://github.com/ned14/boost.outcome/blob/master/include/boost/outcome/v1.0/error_code_extended.hpp#L47
> The hack is the above. We cache the address of the canonical singleton,
> ...
Hm. I must be missing something.
BOOSTLITE_NOINLINE inline const std::error_category &_generic_category()
{
const std::error_category &c = stl11::generic_category();
return c;
}
This doesn't cache anything. It just calls stl11::generic_category() and
returns the result.
> The resulting assembler generated is greatly improved on MSVC, a single
> result<T> shrinks from ~260 opcodes to less than 5.
Would be nice if we could see that demonstrated on godbolt.org.