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

Daniel Krügler daniel.kruegler@gmail.com
Sat May 2 17:51:00 GMT 2015


2015-05-02 19:33 GMT+02:00 Jonathan Wakely <jwakely@redhat.com>:
> Looking at it now, I think the _Internal alias template should also
> check that alignof(_Tp) <= alignof(void*) so that it can safely be
> stored in the _Storage.
>
> Otherwise a type with sizeof(T) <= sizeof(void*) but
> alignof(T) > alignof(void*) would not be correctly aligned when stored
> in the buffer.

Yes, I agree.

- Daniel



More information about the Gcc-patches mailing list