On Fri, Mar 25, 2011 at 9:22 AM, Rodrigo Rivas
<rodrigorivasco...@gmail.com> wrote:
> On Fri, Mar 25, 2011 at 1:33 PM, Jonathan Wakely <jwakely....@gmail.com> 
> 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?
>

Why does it need to?  And why is that GCC problem, not Boost problem
or ISO C++ problem?

Reply via email to