At 02:57 PM 2/3/2003, David Abrahams wrote:
>Beman Dawes <[EMAIL PROTECTED]> writes:
>
>> At 09:46 PM 2/2/2003, Howard Hinnant wrote:
>>
>> To me, a major benefit of a policy based design is to
>> be able to accommodate a wide range of features,
>> including those which find only limited use.
>>
>> If a policy based smart pointer can't accommodate a
>> wide range of features, I start to wonder if the design
>> itself is inflexible and flawed. That's why I worry a
>> lot about whether a given PBSP design can handle
>> apparently marginal uses.
>
>There's no reason we have to be restricted to a single idiom AFAICT.
>The GenVoca-style design we're using for the new iterator_adaptors is
>great for adding new interface in the most-derived class. A blend of
>techniques is often more effective than trying to cram everything into
>a single approach. If you want a smart_ptr with implicit conversion,
>one way might be:
>
> template <class T>
> struct legacy_ptr
> : smart_ptr<blah, blah, blah...>
> {
>
> legacy_ptr(T* p) : smart_ptr<blah...>(p) {}
> T* operator()() const { return this->get(); }
> };
Yes, that's a good point for add-on features that can be implemented on top
of smart_ptr.
--Beman
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
- Re: [boost] Array support [was SmartPtr (Loki) - auto_... Beman Dawes
- [boost] Re: Array support [was SmartPtr (Loki) - auto_... David B. Held
- [boost] Re: Array support [was SmartPtr (Loki) - auto_... David B. Held
- Re: [boost] Array support [was SmartPtr (Loki) - auto_... Howard Hinnant
- Re: [boost] Array support [was SmartPtr (Loki) - auto_... Beman Dawes
- Re: [boost] Array support [was SmartPtr (Loki) - auto_... Howard Hinnant
- Re: [boost] Array support [was SmartPtr (Loki) - auto_... Beman Dawes
- [boost] Re: Array support [was SmartPtr (Loki) - auto_... Andrei Alexandrescu
- Re: [boost] Re: Array support [was SmartPtr (Loki) - ... Beman Dawes
- Re: [boost] Array support [was SmartPtr (Loki) - auto_... David Abrahams
- [boost] Re: Array support [was SmartPtr (Loki) - auto_... Beman Dawes
- [boost] Re: Array support [was SmartPtr (Loki) - auto_... Andrei Alexandrescu
- Re: [boost] Re: Array support [was SmartPtr (Loki) -au... Peter Dimov
- [boost] Re: Array support [was SmartPtr (Loki) - auto_... Howard Hinnant
- [boost] Re: Array support [was SmartPtr (Loki) -auto_p... Andrei Alexandrescu
- [boost] Re: Array support [was SmartPtr (Loki) -auto_p... Howard Hinnant
- [boost] Re: Array support [was SmartPtr (Loki)-auto_pt... Andrei Alexandrescu
- Re: [boost] Re: Array support [was SmartPtr(Loki)-auto... Paul Mensonides
- Re: [boost] Re: Array support [was SmartPtr (Loki)-aut... Greg Colvin
- Re: [boost] Re: Array support [was SmartPtr(Loki)-auto... Paul Mensonides
- [boost] Re: Array support [was SmartPtr(Loki)-auto_ptr... Howard Hinnant