This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24588] New: Fails to identify template using local classes
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Oct 2005 20:42:14 -0000
- Subject: [Bug c++/24588] New: Fails to identify template using local classes
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
#include <iostream>
template<typename E>
class A {
public:
class iterator {
E dummy;
};
iterator iter;
};
template< typename E>
void sort( typename A<E>::iterator& first, typename A<E>::iterator& last ) {
std::cout << "sort" << std::endl;
}
int main( int argc, char *argv[] ) {
A<int> first, last;
sort(first.iter,last.iter);
return 0;
}
gets you:
~/ootbc/members/src$ g++ foo.cc
foo.cc: In function 'int main(int, char**)':
foo.cc:19: error: no matching function for call to 'sort(A<int>::iterator&,
A<int>::iterator&)'
Also fails on 4.0.2
--
Summary: Fails to identify template using local classes
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24588