|
Boost : |
Subject: Re: [boost] [filesystem] C++11 range-based for statement and BOOST_FOREACH support
From: Beman Dawes (bdawes_at_[hidden])
Date: 2012-07-14 08:34:35
On Fri, Jul 13, 2012 at 10:42 AM, Thorsten Ottosen
<thorsten.ottosen_at_[hidden]> wrote:
> 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
The implementation would be more elegant, but the user would have to write:
BOOST_FOREACH(directory_entry& x, directory_range(directory_iterator(".")))
instead of the simpler:
BOOST_FOREACH(directory_entry& x, directory_iterator("."))
I verified the above with an actual implementation and test.
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk