> On Mon, Dec 7, 2009 at 4:31 PM, Stephen Jackson <[email protected]> wrote:
> I'm going to hijack my own thread here, since I have another question
> about QSharedPointers. Is there a way to maintain polymorphism when
> using QSharedPointers?
Not too long ago I did a survey of smart pointer variants with respect to this
issue (for std::auto_ptr, std::unique_ptr, boost::unique_ptr, and
std::tr1::shared_ptr) and you might find it useful:
I didn't include QSharedPointer because I did not know about it at that time
(someone linked me to it after the post).
But I saw in Thiago's followup that it worked for him. So I'm not going to try
it just now until there's resolution on which compiler + Qt version doesn't do
it. But if that is resolved I'm happy to add a QSharedPointer example to the
article with whatever caveats are appropriate.
Qt-interest mailing list