This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g++ 2.95.2 parse error in qualified member name lookup


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 `::'

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]