On Fri, Mar 25, 2011 at 1:33 PM, Jonathan Wakely <[email protected]> wrote:
> Yes but it's too late to specify it in C++0x.
>
> Boost.Range is the best place to work on that idea at present.
> If/when it's fully baked I hope we'll see something like that in a
> future TR or standard.
Agreed.
But just now, how would you explain if the following to loops behave
differently?
template<typename T> void foo(T &t)
{
for (auto i : t)
;
for (auto i : boost::any_range(t))
;
}
Because the boost::any_range constructor is unable to replicate the
logic from the range-for?