This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24588] 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: 31 Oct 2005 00:53:16 -0000
- Subject: [Bug c++/24588] Fails to identify template using local classes
- References: <bug-24588-6594@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from igodard at pacbell dot net 2005-10-31 00:53 -------
Here's an example that shows that A<E>::iterator depends on E:
template<typename E>
class A {
public:
class iterator {
E dummy;
};
iterator iter;
};
int main( int argc, char *argv[] ) {
A<int> first;
A<bool> last;
first.iter = first.iter; // works
first.iter = last.iter; // fails
return 0;
}
If it did not depend on E then both assignments would work.
Ivan
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24588