Re: [PATCH] libstdc++/77686 use may_alias for std::function storage

2016-09-28 Thread Jonathan Wakely
On 28/09/16 13:14 +0200, Richard Biener wrote: On Wed, Sep 28, 2016 at 12:57 PM, Jonathan Wakely wrote: std::function::swap does swap(_M_functor, x._M_functor) which exchanges the underlying bytes of the two _Any_data PODs using that type's implicit assignment operator. However, unlike using pl

Re: [PATCH] libstdc++/77686 use may_alias for std::function storage

2016-09-28 Thread Richard Biener
On Wed, Sep 28, 2016 at 12:57 PM, Jonathan Wakely wrote: > std::function::swap does swap(_M_functor, x._M_functor) which > exchanges the underlying bytes of the two _Any_data PODs using that > type's implicit assignment operator. However, unlike using placement > new to construct an object in the

[PATCH] libstdc++/77686 use may_alias for std::function storage

2016-09-28 Thread Jonathan Wakely
std::function::swap does swap(_M_functor, x._M_functor) which exchanges the underlying bytes of the two _Any_data PODs using that type's implicit assignment operator. However, unlike using placement new to construct an object in the storage, simply memcpying the bytes doesn't change the effective