15 May 2002 18:42
Re: Re: Vertical vs. Lateral Policy implementations
Mat Marcus <mmarcus <at> adobe.com>
2002-05-15 16:42:22 GMT
2002-05-15 16:42:22 GMT
David, Back in January I tried to sketch a possible a C&E GenVoca (Vertical layers of Lateral policies) approach to Loki smart pointers/smart iterators, but it didn't seem to generate much interest. I talked to Dave Abrahams about it a little in Curacao. Perhaps someone will find it worth considering at this point in the discsussion. I would value any feedback on <http://lists.boost.org/MailArchives/boost/msg23625.php>. Of course, it's a little dated now... Thanks, Mat >> ----- Original Message ----- >> From: "David B. Held" <dheld <at> codelogicconsulting.com> It looks like what you're > suggesting is yet another class of designs that I might call a > "ring". > >> template <class Value, class Ptr = Value*> >> struct my_ptr >> : smart_ptr< >> com_refcounted< >> always_non_null< >> my_ptr<Value,Ptr> > > > >> {}; >> >> Incidentally, this basic approach was suggested to me by Mat >> Marcus at the C++ committee meeting; according to him it's >> straight GenVoca out of C&E. > > It looks pretty interesting. I still have a hard time > getting my head around > the idea of something inheriting from itself. However, I can > see how this would be pretty flexible, avoids a template > template policy param, eliminates an explicit pointee type > param (in the policies and the smart_ptr type), and gives all > the policies access to the base types, all in one fell swoop. > Of course, it never would have occurred to me that deriving > from a smart pointer type instead of instantiating it would > yield such benefits; but I guess it's just another example of > solving a problem by adding a layer of indirection, eh? I > suppose I should check out C&E. > _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
RSS Feed