[cfe-dev] [clang++][c++11] complier problems about "ranged-based for"

ZhangXiongpang zhangxiongpang at gmail.com
Fri Mar 8 02:32:15 PST 2013


James Dennett wrote
>> In case (1), where "begin" and "end" are looked up as class members,
>> C++ doesn't allow the syntax object.TypeName, 

I know C++ doesn't allow the syntax "object.TypeName", 
but the "object"(__begin) is a also a function object, 
it is callable. so why not treat the object as a function? 


James Dennett wrote
>> In case (2), "begin" and "end" are found via argument-dependent
>> lookup, which only finds function (and function template) names.

I'm confused that if standard only permit implement to find function,
why not explicitly saying that "begin" and "end" shall be functions?



--
View this message in context: http://clang-developers.42468.n3.nabble.com/clang-c-11-complier-problems-about-ranged-based-for-tp4030863p4030866.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list