Re: [PATCH] Changes to std::variant to reduce code size

2019-05-16 Thread Ville Voutilainen
On Thu, 16 May 2019 at 23:28, Jonathan Wakely wrote: > Here's what I've tested and am about to commit. Looks good to me.

Re: [PATCH] Changes to std::variant to reduce code size

2019-05-16 Thread Jonathan Wakely
On 16/05/19 12:43 +0100, Jonathan Wakely wrote: On 16/05/19 12:29 +0100, Jonathan Wakely wrote: These two changes both result in smaller code for std::variant. The first one means smaller tables of function pointers, because we don't generate an instantiation for the valueless state. Instead we

Re: [PATCH] Changes to std::variant to reduce code size

2019-05-16 Thread Jonathan Wakely
On 16/05/19 12:29 +0100, Jonathan Wakely wrote: These two changes both result in smaller code for std::variant. The first one means smaller tables of function pointers, because we don't generate an instantiation for the valueless state. Instead we do a runtime branch, marked [[unlikely]] to make

[PATCH] Changes to std::variant to reduce code size

2019-05-16 Thread Jonathan Wakely
These two changes both result in smaller code for std::variant. The first one means smaller tables of function pointers, because we don't generate an instantiation for the valueless state. Instead we do a runtime branch, marked [[unlikely]] to make _M_reset() a no-op if it's already valueless. In