🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #6227

error parsing templates

#6227
From: "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
Technical Details
Message-ID: <199601161555.KAA22015@michelangelo.cs.purdue.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113d02,8a59322b52f48c78,start
X-Google-Attributes: gid113d02,public
From: muckel@cs.purdue.edu ("Patrick A. Muckelbauer")
Subject: error parsing templates
Date: 1996/01/16
Message-ID: <199601161555.KAA22015@michelangelo.cs.purdue.edu>
X-Deja-AN: 135481182
distribution: gnu
sender: daemon@cis.ohio-state.edu
organization: GNUs Not Usenet
newsgroups: gnu.gcc.bug