[Qt-interest] QList: Force a deep copy?
Thiago Macieira
thiago.macieira at trolltech.com
Thu Jul 2 08:48:00 CEST 2009
Eric Clark wrote:
>else if (QTypeInfo<T>::isComplex) new (n) T(t);
>
>Qt is using the placement new operator here. We do not overload this
> operator in our stuff. What does Qt expect it to do? Does it expect
> realloc to get called, or does it just expect "n" to be returned?
We expect it to work exactly like it's supposed to. From
/usr/include/c++/4.4.0/new:
// Default placement versions of operator new.
inline void* operator new(std::size_t, void* __p) throw() { return __p; }
inline void* operator new[](std::size_t, void* __p) throw() { return __p;
}
--
Thiago Macieira - thiago.macieira (AT) nokia.com
Senior Product Manager - Nokia, Qt Software
Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090702/e7b435f3/attachment.bin
More information about the Qt-interest-old
mailing list