Behaviour of const KSharedPtrs

Stephan Kulow coolo at
Mon Nov 15 10:02:56 GMT 2004

On Saturday 13 November 2004 00:45, Richard Smith wrote:

> Now, is this a bug? I think so. KSharedPtr<T> is, after all, supposed to to
> have pointer-like semantics. Pointers don't behave this way.
> boost::shared_ptr doesn't behave this way. And if I really want this
> behaviour I can use a KSharedPtr<const T> instead.
I guess, const correctness went wild. So I guess you have to add this to the
API documentation and then fix it for KDE4. Meanwhile you will have to 
const_cast the returned value.

Greetings, Stephan

Pace Peace Paix Paz Frieden Pax Pokój Friður Fred Béke 和平
Hasiti Lapé Hetep Malu Mир Wolakota Santiphap Irini Peoch
Shanti Vrede Baris Rój Mír Taika Rongo Sulh Py'guapy 평화

More information about the kde-core-devel mailing list