[C++0x] Range-based for statements and ADL

Jonathan Wakely jwakely.gcc@gmail.com
Tue Mar 29 18:57:00 GMT 2011


On 29 March 2011 17:41, Rodrigo Rivas wrote:
>
> Maybe a simpler error is better. such as:
> "expression is not valid as range in a range-based %<for%> loop
> because it lacks begin/end members or begin(int&) and end(int&)
> overloads." (I leave the wording to someone more skilled with
> English).

If you can prevent the full lookup error and print something different
I think users would be very grateful indeed.

How about "No suitable %<begin%> and %<end%> functions found for range
expression of type %qT in %<for%> statement" ?

That



More information about the Gcc-patches mailing list