[Qt-interest] On overriding qMalloc in QVector

Thiago Macieira thiago at kde.org
Fri Oct 23 08:47:41 CEST 2009


Em Sexta-feira 23. Outubro 2009, às 01.14.55, Benoit Jacob escreveu:
> 2009/10/22 Benoit Jacob <jacob.benoit.1 at gmail.com>:
> > 2009/10/22 Thiago Macieira <thiago at kde.org>:
> >> Em Quinta-feira 22. Outubro 2009, às 21.49.25, Benoit Jacob escreveu:
> >>> Sure that logic seems correct, but i don't understand, how do you get
> >>> the type alignment? Some compiler extensions? The alignof keyword is
> >>> only coming in c++1x...
> >>
> >> Many compilers already have that keyword. Search for Q_ALIGNOF in
> >> qglobal.h.
> >
> > Indeed, I didn't know, it seems like gcc has it since 2.95!
> >
> > I guess that i was confused as on the other hand alignas is only
> > coming in c++1x.
> 
> By the way, not that it matters, but in this line
> 
> #  if __GNUC__ >= 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
> 
> you probably meant the first >= to be > .

Indeed.

Not that any GCC 2 version is supported, but...

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091023/d045b9f0/attachment.bin 


More information about the Qt-interest-old mailing list