|
Boost : |
From: Larry Evans (jcampbell3_at_[hidden])
Date: 2002-10-02 21:03:52
Eric Woodruff wrote:
>As I said, there is abiguity, and now a superfluous class that provides no
>functional benefit.
>
>"Larry Evans" <jcampbell3_at_[hidden]> wrote in message
>news:3D9B3E08.70909_at_prodigy.net...
>
[snip]
-------------------------------------------------------------------------------
Does the following reflect what you mean by "ambiguous"?
shared_ptr_const<T> is more "ambiguous" compared to shared_ptr<const T>
because in the latter, the "const" qualifier is explicitly next to the T.
IOW, the template argument prefixed to & should be the type of
operator*, i.e. it should be as in:
const T& share_ptr<const T>::operator*(void)const
rather than:
const T& shared_ptr_const<T>::operator*(void)const
-------------------------------------------------------------------------------
Does the following reflect what you mean by "superfluous"?
void g(shared_ptr<const T> p)
can be called with a shared_ptr<T> argument (just as Held
showed in his 3ird code example) ; therefore, there's
no need for the shared_ptr_const<T> class. This is of course
David Abraham's argument. The only reason I didn't use it was
because Held wanted to avoid the extra copy constructor call.
However, I guess you regard this as a "performance desire"
rather than a "functional requirement".
Does the above accurately reflect your meaning?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk