$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] Reforming Boost.System and <system_error> round 2
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2018-01-16 19:02:56
On 01/16/18 21:41, Niall Douglas via Boost wrote:
>>> Can't the is_error bool be stored in the ec object itself, at
>>> construction time?
>>
>> Actually, I like this idea. I've modified my benchmark accordingly and
>> it shows nearly identical performance as the current `std::error_code`:
>>
>> Experimental test: 253654 usec, 394237820.022550 tests per second
>> Experimental2 test: 46353 usec, 2157357668.327832 tests per second
>> std test: 45981 usec, 2174811335.116679 tests per second
>
> Are you still calling the virtual function, but now in the constructor?
No, the flag is initialized in the `error_code` constructor. By default
it is inferred from the error code value, but the user can specify the
flag explicitly.
> I didn't see you post any source code anywhere.
I posted an excerpt later in the discussion. For convenience, I'm
attaching the full code here.