Affected subclause: [temp.names]
Change: An
unqualified-id
that is followed by a
<
and for which name lookup
finds nothing or finds a function
will be treated as a
template-name
in order to potentially cause argument-dependent lookup to be performed
. Rationale: It was problematic to call a function template
with an explicit template argument list
via argument-dependent lookup
because of the need to have a template with the same name
visible via normal lookup
. Effect on original feature: Previously valid code that uses a function name
as the left operand of a
< operator
would become ill-formed
. [
Example 1:
struct A {};
bool operator<(void (*fp)(), A);
void f() {}
int main() {
A a;
f < a;
(f) < a;
}
—
end example]