This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix std::experimental::any for small, non-trivial objects


2015-05-02 15:03 GMT+02:00 Jonathan Wakely <jwakely@redhat.com>:
> Here's a much smaller patch for the gcc5 branch, which just avoids the
> small-object optimisation for non-trivially-copyable types. This
> pessimises some types, but is safe.
>
> (Given that this stuff is all "experimental" anyway, maybe we could
> just backport the full fix from trunk, but this is OK for now.)
>
> Tested powerpc64le-linux, committed to gcc-5-branch.

Not related to the patch, but is the second template argument of
any::_Storage::_M_buffer really correct:

std::aligned_storage<sizeof(_M_ptr), sizeof(_M_ptr)>::type _M_buffer;

I would have expected to see this to be an alignment value.

- Daniel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]