[Development] HEADS UP: Don't use QList, use Q_DECLARE_TYPEINFO

Thiago Macieira thiago.macieira at intel.com
Wed Jul 22 17:12:58 CEST 2015


On Wednesday 22 July 2015 17:10:38 Giuseppe D'Angelo wrote:
> Il 22/07/2015 16:52, Thiago Macieira ha scritto:
> > Allocators is a feature we've never supported and I don't see us
> > supporting.
> > 
> > I don't see a problem with the alignment. QArrayData is allocated with
> > alignment of min(alignof(QArrayData), alignof(T)), then we find the proper
> > alignment for T inside the buffer and that should be enough.
> 
> It might not be enough for things like SIMD, though? (cf.
> boost::simd::allocator and similar things)

It's enough because alignof(__m128i) == 16, alignof(__m256i) == 32 and 
alignof(__m512i) == 64.

I don't know why you'd want to put one of those in a QVector in the first 
place, but if you have a reason, it will work.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list