This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50828] New: class template parameter not printed for member function template in candidate list
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 22 Oct 2011 13:20:37 +0000
- Subject: [Bug c++/50828] New: class template parameter not printed for member function template in candidate list
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50828
Bug #: 50828
Summary: class template parameter not printed for member
function template in candidate list
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: redi@gcc.gnu.org
template<typename T>
struct A {
template<typename U>
void f() { }
};
int main() {
A<void> a;
a.f(0);
}
With -fpretty-templates this gives:
f.C: In function âint main()â:
f.C:9:8: error: no matching function for call to âA<void>::f(int)â
f.C:9:8: note: candidate is:
f.C:4:12: note: template<class U> void A::f() [with U = U, T = void]
T is shown in the argument list, but not the signature. It should be:
f.C:4:12: note: template<class U> void A<T>::f() [with U = U, T = void]
^^^
For a non-template member function the class template parameter is shown
correctly.