|
Boost : |
From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-03-18 03:08:53
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 :-}
____________________________________________________________
Kevlin Henney Curbralan Ltd
kevlin_at_[hidden] +44 (0) 7801 073 508
____________________________________________________________
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk