Boost logo

Boost :

Subject: Re: [boost] Proposed SG14 <system_error2> ready for feedback
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2018-03-05 21:59:30


On 5/03/2018 22:13, Niall Douglas wrote:
>> In any case intptr_t is either larger than needed to preserve the value
>> bits (in 64-bit applications) or smaller than needed to preserve the
>> value and sign (in 32-bit applications), so this seems like an
>> inappropriate choice.
>
> Structure alignment would align any int to the pointer, so same space in
> any case. Two CPU registers.

Perhaps, but the difference between value bits and padding bits is
significant, and it seems pointless (and prone to compiler warnings
about losing significant bits if you then try to assign the value back
to its "real" type) to misrepresent its size.

> In private discussions with some on WG21, it is felt that status code
> needs to always be two CPU registers exactly. So I'll be bumping that to
> intptr_t on all platforms.

Why? What benefit does this provide?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk