Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by "Patrick A. Muckelbauer"
Tue, 16 Jan 1996 00:00
error parsing templates
Author: "Patrick A. Muckelbauer"
Date: Tue, 16 Jan 1996 00:00
Date: Tue, 16 Jan 1996 00:00
25 lines
956 bytes
956 bytes
It seems anyplace I use a template within a template the compiler
gets a parsing error. For example, the following program will not
compile:
template<class X> class T {
public:
X x;
};
typedef T<T<int>> t;
The error message produced is: "file.cc:5: parse error before `>'"
I tried version 2.6.3, 2.7.0, and 2.7.2 of the gcc compiler.
The following modified version of the program does work:
template<class X> class T {
public:
X x;
};
typedef T<int> TMP;
typedef T<TMP> t;
Andy
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