[Qt-interest] Const correctness with QSharedPointer
Colin Kern
colin.kern at gmail.com
Mon Dec 7 21:31:01 CET 2009
Hi everyone,
I want to pass a QSharedPointer to a function as a const pointer, so
that the compiler will enforce that I don't mutate the object the
shared pointer is pointing to. Can I do this with "void func(const
QSharedPointer<A> p);" or does that just enforce that I won't change
what the shared pointer is pointing to?
Thanks,
Colin
More information about the Qt-interest-old
mailing list