From: Mat Marcus (mmarcus_at_[hidden])
Date: 2002-05-15 11:42:22
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
course, it's a little dated now...
>> ----- Original Message -----
>> From: "David B. Held" <dheld_at_[hidden]>
It looks like what you're
> suggesting is yet another class of designs that I might call a
>> template <class Value, class Ptr = Value*>
>> struct my_ptr
>> : smart_ptr<
>> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk