http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55727



--- Comment #2 from Matthias Kretz <kretz at kde dot org> 2012-12-18 09:11:41 
UTC ---

(In reply to comment #0)

> Right now it does not even suffice to reimplement new/delete inside Foo to 
> make

> std::vector<Foo> work.



Sorry, this statement seems to be wrong. The issue that I actually have is of

the form:



from my library:

  struct alignas(32) A { ... }; //overloads new/delete for correct alignment



different library:

  template<typename T> struct B { T x; };



application code:

  std::vector<B<A>>



The members of the vector are now misaligned because obviously the new/delete

overloads in A are not used. But the alignment information from A is passed on

to B so it could be used in the allocator of std::vector.

Reply via email to