Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-10-18 11:43:27


Hamish Mackenzie <hamish_at_[hidden]> writes:

> On Tue, 2005-10-18 at 10:50 -0300, Fernando Cacciola wrote:
>> The problems with optional<bool> are totally unrelated to the choice of
>> operators * and ->.
>
> True and I think if you could fix it you would find it much easier to
> sell me on using * and ->. The issue I have with * and -> is that they
> do not make it clear that the type in question is supposed to be an
> optional (to someone reading the code). I still can't think of an
> example where it is desirable to have X * and optional< Y > use the same
> interface.

How about

  indirect_iterator<std::vector<optional<T> >::iterator>

?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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