🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1089

Re: Template Trouble

#1089
From: Mike Stump
Date: Fri, 06 Nov 1992 08:31
50 lines
1450 bytes
This problem has been fixed, and should not exist in the next release
of gcc.

> Date: Wed, 26 Aug 92 17:05:51 MDT
> From: sullivan@mathcom.com (S. Sullivan)
> Message-Id: <9208262305.AA00468@thurber.Mathcom.com>
> To: bug-g++@prep.ai.mit.edu

> I'm running gcc 2.2.2 on Sunos 4.1.1 on a sparc 2.

> Compiling the following file with g++ gives:

> > g++ -c -o testd.o testd.cc
> testd.cc: In function `int  main ()':
> testd.cc:9: template for method `print' doesn't match any in class `QI<int>'
> Exit 1

> Why?

> Many thanks for your help ...

> Steve Sullivan
> sullivan@mathcom.com


> ------------------ cut here -------------------------
> template <class T>
> class QI {
> public:
>   QI();
>   void print() const;
> private:
>   T item;
>   QI *next;
>   };



> template <class T>
> QI<T>::QI() {}


> template <class T>
> void QI<T>::print() const {};


> main () {
>    QI<int> alpha();
>    }
> ------------------ cut here -------------------------
Technical Details
Message-ID: <9211060831.AA01585@cygnus.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!hp-cv!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!mrs

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!hp-cv!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!mrs
From: mrs@cygnus.com (Mike Stump)
Newsgroups: gnu.g++.bug
Subject: Re:  Template Trouble
Message-ID: <9211060831.AA01585@cygnus.com>
Date: 6 Nov 92 08:31:02 GMT
Article-I.D.: cygnus.9211060831.AA01585
Sender: gnulists@ai.mit.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 50
Approved: bug-g++@prep.ai.mit.edu