Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-12-15 16:54:12


Brian Hassink wrote:

> My question is why conversion of the shared_ptr reference does not
> work if it is not declared const?

A non-const reference doesn't bind to temporaries, it needs to bind directly
to the argument (this a bit oversimplified but correct for our case). So the
shared_ptr<B> argument is not converted to a temporary shared_ptr<A> in the
non-const case.


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