Boost logo

Boost :

From: Joel de Guzman (djowel_at_[hidden])
Date: 2003-08-31 20:03:17


David Abrahams <dave_at_[hidden]> wrote:
> "Joel de Guzman" <djowel_at_[hidden]> writes:
>
>> What I am trying very hard to say is to stick to only *ONE* interface
>> and one concept.
>
> Optional is a container. I've never seen a container in C++ which didn't
> have both a value interface and an element-access interface. How do
> you propose to achieve that with optional?

Do it the ref, tuple and variant way: get(). But get(), as an element-access interface,
should return a reference, not a pointer, as it does currently.

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

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