[Interest] QVector / std::vector and memory alignment

Thiago Macieira thiago.macieira at intel.com
Thu Dec 29 13:03:03 CET 2016


Em quinta-feira, 29 de dezembro de 2016, às 09:32:19 BRST, Giuseppe D'Angelo 
escreveu:
> Il 29/12/2016 06:56, Philippe ha scritto:
> > Sometimes there are discussions about what is best QVector vs
> > std::vector, and here we have a good "plus" for QVector.
> 
> In C++17 std::vector (well, std::allocator) must honour overly-aligned
> 
> types:
> > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0035r4.html
> 
> GCC 7 and Clang 4 already implement it.
> 
> Before C++17 you could've used an aligned allocator like Boost.Align.
> QVector doesn't allow custom allocators, so here we have a win for
> std::vector.

How is it ia win for std::vector to achieve next year what QVector has done 
for the past 7 or 8?

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




More information about the Interest mailing list