30 Apr
2003
30 Apr
'03
4:50 p.m.
On Wednesday, April 30, 2003, at 09:40 AM, Hossein Haeri wrote:
OK! Now what are the "cast" guarantees? I mean something such as this:
boost::shared_ptr<int> sp3(&a); boost::shared_ptr<const int> sp4(sp3);
Is the above code legal? What is the result then?
Yes, it's legal. Both sp3 and sp4 point to a, and sp3 can be used to modify the value of a, but sp4 can't. -- Darin