[patch] Fix std::experimental::any for small, non-trivial objects
Daniel Krügler
daniel.kruegler@gmail.com
Sat May 2 17:05:00 GMT 2015
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
More information about the Libstdc++
mailing list