[Bug libstdc++/65122] std::vector doesn't honor element alignment
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Sep 25 08:36:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65122
--- Comment #19 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #17)
> I think this is fixed for GCC 7 with -std=c++17 support.
No, it isn't. new T[10] will give suitably aligned memory, but not
std::allocator<T>. Only the core part of alignment support was added in C++17,
we are expecting a corresponding library part in C++20. On the other hand,
providing it as an extension in C++17-mode (gnu++17?) might be ok (requires a
discussion).
More information about the Gcc-bugs
mailing list