Boost logo

Boost Users :

From: Jean-François Brouillet (verec_at_[hidden])
Date: 2005-05-08 07:54:25


On 2005-05-08 13:28:29 +0100, "Peter Dimov" <pdimov_at_[hidden]> said:

>> template<typename Y>
>> Bridge(Bridge<Y> const & r) : boost::shared_ptr<Y>(r) {
>> }

> That's because shared_ptr<Y> is not a base of Bridge<T>,
> shared_ptr<T> is . Change the templated copy constructor to:
>
> template<typename Y>
> Bridge(Bridge<Y> const & r) : boost::shared_ptr<T>(r) {
> }
>

<red faced>
I had to read "spot the changes" your definition three times before
I noticed that you had changed my Y with a T.

And *that* was it.

One thousand thanks, Peter!.
</red faced>

-- 
Do your users a favor: give them Style: http://www.uiwithstyle.org

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