[Bug c++/50828] New: class template parameter not printed for member function template in candidate list
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Oct 22 13:20:00 GMT 2011
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.
More information about the Gcc-bugs
mailing list