https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110057
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I am not 100% sure the all of the objects in the vector<C> has to be in type of C. Because you could do some tricks dealing with inplacement new. >if this applies to raw arrays It does applies to raw arrays.