🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by "Patrick A. Muckelbauer" Tue, 16 Jan 1996 00:00
error parsing templates
#6227
Author: "Patrick A. Muckelbauer"
Date: Tue, 16 Jan 1996 00:00
25 lines
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