Boost logo

Boost :

From: jsiek_at_[hidden]
Date: 2000-01-11 16:06:08


Kevlin Henney writes:
>
> 3) any type including proxies to the value type, such that any member
> access is OK.
>
> What this means in practice is that it is possible to write and use a
> generic smart reference for built-ins -- or indeed any type that has no
> operational requirements other than operator use.
>
> In the absence of overloading operator. it is not possible to write a fully
> generic smart reference class for types requiring member access, but it is
> certainly possible to write them on a case by case basis as necessary. So
> whilst you cannot have proxied_collection<> written as a template so that
> it works generically, you can still write your own foo_collection with your
> own foo_collection::reference and have it satisfy the Collection
> requirements.

This seems good to me.

So I'll word it, "if the value type has public members, then the
Collection's reference type must also provide the member access
operator"

Cheers,

Jeremy

P.S. There is one odd implication of this. A proxied_collection<>
template class could satisfy Collection or not depending on the
value type. Oh well.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk