|
Boost Users : |
From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2003-04-30 11:40:44
Dear Darin,
> boost::shared_ptr<int const> sp2(&a);
>
> The way const works with shared_ptr is similar to
> the way it works with
> plain pointers. You can have a constant pointer,
> which means the
> pointer can't be modified, or a pointer to constant,
> which means the
> object that's pointed to can't be modified.
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?
> Hope that helps.
Yes, it was.
Thanks a lot,
--Hossein
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net