🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: bug in GNU C++ 2.2.2 (template bug)

#926
From: Joe Buck
Date: Wed, 09 Sep 1992 05:02
27 lines
1563 bytes
In article <9209082052.AA10566@idiap.ch> tmb@idiap.CH (Thomas M. Breuel) writes:
>GNU C++ 2.2.2 fails on the following template class definition (which
>is legal according to BS):
>
>	template <class K,K x>
>	struct Foo {
>		K y;
>		Foo() { y = x; }
>	};

Yes, Dr. Stroustrup said it's legal, but I'll be damned if I can find out
where in the ARM it says that (assuming no definition for K precedes this
line).  Has the ANSI committee cleaned this stuff up yet?  We need more of
a standard than "see what cfront does" or "ask Bjarne".

For this to be legal, the declaration of the first argument would need to
introduce a scope that includes the second argument, and matching
templates will get really fun .

I'm not just being a pain here -- I want to see a specification for
templates that is far more complete than the existing one.  One of the
main reasons for the problems with g++ templates, I've been told, is the
extreme vagueness of the specification.


--
Joe Buck	jbuck@ohm.berkeley.edu
Technical Details
Message-ID: <18k0geINNnm2@agate.berkeley.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!cs.utexas.edu!sun-barr!ames!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!ohm.berkeley.edu!jbuck
References: <9209082052.AA10566@idiap.ch>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!cs.utexas.edu!sun-barr!ames!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!ohm.berkeley.edu!jbuck
From: jbuck@ohm.berkeley.edu (Joe Buck)
Newsgroups: gnu.g++.bug
Subject: Re: bug in GNU C++ 2.2.2 (template bug)
Message-ID: <18k0geINNnm2@agate.berkeley.edu>
Date: 9 Sep 92 05:02:06 GMT
References: <9209082052.AA10566@idiap.ch>
Sender: gnulists@ai.mit.edu
Distribution: gnu
Organization: U. C. Berkeley
Lines: 27
Approved: bug-g++@prep.ai.mit.edu