Boost logo

Boost :

Subject: Re: [boost] [range] for_each and std::map of std::list
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2011-04-07 06:56:09


Den 07-04-2011 11:37, Mathias Gaunard skrev:
> On 06/04/2011 19:55, Thorsten Ottosen wrote:

>> I suggest the syntax
>>
>> rngOfContainers | boost::adaptors::flattened
>>
>> and the underlying iterator should be up to bidirectional (if the
>> underlying two container types support it).
>>
>> Anyone interested in implementing this?
>
> I have an implementation of this somewhere.
>
> One annoying thing is that you cannot detect that a type is a range
> reliably.

Well, that is only a problem if you want to avoid manually applying the
adaptor twice (or more), right?

If so, I think that is a limitation we can live with. A simple solution
covers most cases IMO.

-Thorsten


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