Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2002-05-02 21:53:29


"Beman Dawes" <bdawes_at_[hidden]> wrote in message
news:4.3.2.7.2.20020502221631.019ee500_at_mailhost.esva.net...
> At 03:19 PM 5/2/2002, Andrei Alexandrescu wrote:
> >[...]
> >Hey, I think it would be a great idea to use private inheritance.
> >That way, policies can enhance interface only through free
> >functions, which is my intent anyway. What do others think?
>
> Does that work for an array-based storage policy adding
> operator[] (if there is no conversion to T* operator)? And then
> for both non-array and array if there is a T* conversion?

I think it might be possible to define an outer-level operator[]
that forwards to a policy-specific function. Does that sound
reasonable?

Dave


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