🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.help
Article #943

template bug?

#943
From: Eric
Date: Fri, 19 Apr 1996 14:46
29 lines
757 bytes
Given the following code:


	template <class T>
	class C {
	      typedef C<T>* CPTR;
	   public:
	      int func( CPTR );
	};

	template <class T>
	int C<T>::func( C<T>::CPTR cp )
	{
	   return 0;
	}


I get the following warnings/errors:

	test.cc:10: incomplete type `C<...>' does not have member `CPTR'
	test.cc:10: parse error before `)'


The same code compiles fine without the template stuff removed.

What gives?

--
Eric
Technical Details
Message-ID: <4l890f$177@taco.cc.ncsu.edu>
Path: arc1-ca.pugleaf.net!taco.cc.ncsu.edu!easchwei

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!taco.cc.ncsu.edu!easchwei
From: easchwei@unity.ncsu.edu (Eric)
Newsgroups: gnu.g++.help,comp.lang.c++
Subject: template bug?
Date: 19 Apr 1996 14:46:39 GMT
Organization: North Carolina State University
Message-ID: <4l890f$177@taco.cc.ncsu.edu>
NNTP-Posting-Host: styx.csc.ncsu.edu