This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
g++ 2.95.2 parse error in qualified member name lookup
- To: gcc bug list <gcc-bugs at gcc dot gnu dot org>
- Subject: g++ 2.95.2 parse error in qualified member name lookup
- From: Martin Sebor <sebor at roguewave dot com>
- Date: Sun, 30 Apr 2000 18:04:32 -0600
Hi,
I believe this should compile according to 3.4.3.1. It fails with g++ 2.95.2.
The compiler has no problem if A is not a template or if the call is fully
qualified (i.e., with N::A<int>::foo()).
Thanks
Martin
$ cat test.cpp
namespace N {
template <class T>
struct A
{
int foo () const;
};
template <class T>
struct B: A<T>
{
int foo () const;
};
}
int main ()
{
return N::B<int>().A<int>::foo ();
}
$ g++ test.cpp
test.cpp: In function `int main()':
test.cpp:21: `struct N::B<int>' has no member named `A'
test.cpp:21: parse error before `::'