Boost logo

Boost :

From: Valentin Bonnard (Bonnard.V_at_[hidden])
Date: 2000-03-20 11:18:03


Kevlin Henney wrote:
>
> In message <B4F8848D.2F5E%abrahams_at_[hidden]>, Dave Abrahams
> <abrahams_at_[hidden]> writes
> [...]
> >Finally, I worry that allowing the implicit conversion will break this
> >smart_ptr<Derived> -> smart_ptr<Base> conversion or others like it:
> >
> >void f(smart_ptr<Derived> d)
> >{
> > smart_ptr<Base> b(d); // ambiguous?
> >}
> >
> >at least that would be true for auto_ptr, since conversions proceed through
> >auto_ptr_ref.
>
> Except that unfortunately they don't: auto_ptr_ref is private and is not
> befriended by all auto_ptr templates, so such conversions are not
> possible at the moment anyway. One of the "features" of the standard :-}

How the privateness of auto_ptr_ref has anything to do with
this problem is beyond me.

-- 
Valentin Bonnard

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk