This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Since the sub-expression `&print' is not a call expression,
the overload resolution mechanism will not select the non-template version first.
And the function templates can be instantiated without <>, so the C++ compiler is confused.
========== void foo() { } template<class T> void foo() { }
int main() { &foo; } ==========
It can help you to understand what's happend.
Thanks, Rodolfo Lima.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |