[C++-sig] Can QPointer be used as a smart pointer?

David Abrahams dave at boost-consulting.com
Fri Oct 21 14:49:26 CEST 2005

Eric Jardim <ericjardim at gmail.com> writes:

> Hi,
> The Qt4 library have a custom smart pointer type template, QPointer<...>:
> http://doc.trolltech.com/4.0/qt4-intro.html#qpointer-t
> http://doc.trolltech.com/4.0/qpointer.html
> Is it compatible with boost.python, like smart_ptr and auto_ptr are, or do I
> have to register (if possible) it?

You need to specialize pointee<QPointer<T> > so its nested ::type is
T.  Aside from that it should be exactly as compatible with
Boost.Python as auto_ptr is.

Dave Abrahams
Boost Consulting

More information about the Cplusplus-sig mailing list