coala wrote:
In Smart Pointer class, we have a piece of code:
inline void release(void) const { if (mPtr) mPtr->release(); mPtr = 0;
}
It can set mPtr but it is still const?
How is 'mPtr' declared?
Why could this work and why it can be compiled? We have used it for
years.
You've used it for years and haven't looked at the declaration? Post
the complete program distilled from your "Smart Pointer class", with
the declaration of 'mPtr' (I presume it's a data member) visible, then
we can talk.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask