I was looking at the Wikipedia entry on argument-dependent lookup, and (on Jan 04, 2014) the following example was given:
#include<iostream>
int main()
{
std::cout << "Hello World, where did operator<<() come from?" << std::endl;
}
... with the following comment:
Note that std::endl is a function but it needs full qualification, since it is used as an argument to operator<< (std::endl is a function pointer, not a function call).
My thought is that the comment is incorrect (or simply unclear). I am considering changing the comment to say, instead
Note that std::endl needs full qualification, because ADL does not apply to the arguments of a function call; it only applies to the function name itself.
Am I correct that the Wikipedia comment is incorrect? Is my proposed change correct? (I.e., is my understanding of ADL correct in this example?)