Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Victor Lobanov
Mon, 02 Dec 1996 00:00
scope bug for a type defined within a class
Author: Victor Lobanov
Date: Mon, 02 Dec 1996 00:00
Date: Mon, 02 Dec 1996 00:00
31 lines
1054 bytes
1054 bytes
Hi!
I believe I've encontered a bug using gcc version 2.7.2.1 on Linux 2.0.18
Attemps to compile the following program:
class Bar {
public:
typedef int Type;
};
template<class T> class Foo {
public:
typedef T::Type fooType;
void dump(fooType x);
void dump2(fooType x) { cout << x; }
};
template<class T> void Foo<T>::dump(fooType x) { cout << x; }
int main()
{
Foo<Bar> foo;
foo.dump(1);
return 0;
}
produce an error "`fooType' was not declared in this scope" for the
function dump but not for the function dump2.
Sincerely,
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads