#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