Boost logo

Boost :

Subject: Re: [boost] [Bind] Interoperability of bind/mem_fn with transform_iterator
From: Daniel Walker (daniel.j.walker_at_[hidden])
Date: 2010-05-04 18:49:03


On Tue, May 4, 2010 at 1:49 PM, Peter Dimov <pdimov_at_[hidden]> wrote:
> Samuel Debionne:
>>
>> Anyway, in my opinion, using bind/mem_fn/lambda with transform_iterator
>> is a common use case. That would be great to have an option to add a
>> default constructor in those libs... or is it to risky ?
>
> The proper fix would be to make transform_iterator not require a
> default-constructible function object, by using boost::optional or an
> equivalent.

That's a great idea! I took a look at it, and the required changes
seem to be minor. I made a ticket and attached a patch.
https://svn.boost.org/trac/boost/ticket/4189
I ran Boost.Iterator regression tests with gcc 4.2 and it passed without error.

Daniel Walker


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