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(); } }; -Ddave -- David Abrahams [EMAIL PROTECTED] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost