Boost logo

Boost :

Subject: Re: [boost] [filesystem] C++11 range-based for statement and BOOST_FOREACH support
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2012-07-13 10:42:33


On 13-07-2012 13:38, Beman Dawes wrote:
> On Fri, Jul 13, 2012 at 4:45 AM, Thorsten Ottosen
> <thorsten.ottosen_at_[hidden]> wrote:
>> On 12-07-2012 16:10, Beman Dawes wrote:
>>>
>>> Support for the C++11 range-based for statement and BOOST_FOREACH for
>>> directory_iterator and recursive_directory_iterator has been added to
>>> trunk. This clears feature requests 5896 and 6521.
>>>
>>> The range-based for has been tested against gcc 4.6, which works, and
>>> against VC++2012 RC, which ICEs the compiler. The ICE has been
>>> reported to Microsoft.
>>>
>>> If anyone gives either C++11 range-based for or BOOST_FOREACH a try,
>>> I'd appreciate hearing about any problems. Both of these are new to
>>> me, and I'm nervous about getting the enabler free functions right.
>>
>>
>> Well, if you post the code, I'll take a look.
>
> See below for my implementation.

Hm.

Why not follow this design:

http://www.boost.org/doc/libs/1_50_0/libs/range/doc/html/range/reference/ranges/istream_range.html

-Thorsten


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