[Development] QVector now has rvalue push_back (was: Re: HEADS UP: potential trouble from a recent QVector change)

Thiago Macieira thiago.macieira at intel.com
Tue Jul 21 17:59:29 CEST 2015


On Tuesday 21 July 2015 08:55:42 Thiago Macieira wrote:
> In my version of QVector, this is already implemented. Movable and trivial 
> types are simply realloc()ed, so no copy takes place.

Oops, no, sorry, this only works for types that also don't require special 
alignment (less than alignof(void*)). That happens because realloc() does not 
guarantee alignment on output.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list