Boost logo

Boost :

Subject: Re: [boost] Reforming Boost.System and <system_error> round 2
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2018-01-16 19:06:23

> Also, a small technical detail. I believe carefully adding the flag to
> `error_code` doesn't increase its size. On 64-bit systems it fits nicely
> in the padding area. On 32-bit systems it could be merged into the
> category pointer, if we really wanted. Not sure `result<void>` does that.

I've taken great care to ensure Outcomes fit into the ABI stack spill
size (32 bytes) where possible. Layout is always:

T value;
unsigned flags;
E error;

So if T were an int and E an error_code, size on 64 bit would be 24
bytes (error_code is 16 bytes), but just 16 bytes on 32 bit.

result<void> is also 24 bytes, rather than 20 bytes, due to the
error_code containing a pointer forcing alignment to the next 8 byte


ned Productions Limited Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at