Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-10-18 22:13:33


Hamish Mackenzie <hamish_at_[hidden]> writes:

> From: Hamish Mackenzie <hamish_at_[hidden]>
> Subject: Re: Report from Mont Tremblant C++ Committee meeting
> Newsgroups: gmane.comp.lib.boost.devel
> Date: Tue, 18 Oct 2005 23:49:07 +0100
> Reply-To: boost_at_[hidden]
>
> On Tue, 2005-10-18 at 12:43 -0400, David Abrahams wrote:
>> Hamish Mackenzie <hamish_at_[hidden]> writes:
>> > 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>
>>
>> ?
>
> Sold!
>
> But now I am worried that I wanted to buy a car (container max size 1)
> and instead I am getting a the back half of a bicycle (deep copy
> pointer) welded to the front half of a car. Would I be better off with
> a bicycle instead?

Whatever. All of these odd cases you pose are distractions from the
the fact that having such a common interface can be useful.

-- 
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