This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/30822] wrong choice of overloaded template functions in recursive call
- From: "Zarathustra at gentlemansclub dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 May 2007 12:27:31 -0000
- Subject: [Bug c++/30822] wrong choice of overloaded template functions in recursive call
- References: <bug-30822-14112@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from Zarathustra at gentlemansclub dot de 2007-05-17 13:27 -------
According to my current understanding, the compiler is right not to accept the
given example code:
Name resolution at the point of instantiation does only work for dependent
names.
Given a expression which looks like
"postfix-expression ( expression-listopt )"
"postfix-expression" is a dependent name if (and only if) some thing in
"expression-listopt" depends on a template parameter and "postfix-expression"
is an identifier. This holds for foo(...) but it does not hold for
foo<...>(...) or ::foo(...). Therefore I assume the compiler behaves
correctly. This is probably another case where the C++ standard is somehow
counterintuitive.
--
Zarathustra at gentlemansclub dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30822