🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1286

Re: Pointer comparisons and templates

#1286
From: John MAX Skaller
Date: Thu, 17 Dec 1992 21:41
27 lines
1435 bytes
In article <1992Dec15.222952.17059@lth.se> dag@bellman.control.lth.se (Dag Bruck) writes:
>
>The first error I made, and the fact that nobody found it, is a strong
>indication that specialization of templates is a real complication.
>

	Partly because the type system is not so hot either.
When you instantiate a template

	int i;
	f(i);

what get generated? f(int)? f(const int)? f(int&)? f(const int&)?
(and 4 more cases involving volatile)

IMHO all 8 of these functions should be considered redefintions:

	f(int);
	f(int&); // error, redefinition
	f( .. ) // as above for all the 6 other cases


-- 
;----------------------------------------------------------------------
        JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
	Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
Technical Details
Message-ID: <1992Dec17.214138.9122@ucc.su.OZ.AU>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal
References: <1992Dec14.075853.3399@lth.se> <1992Dec15.164854.13070@ucc.su.OZ.AU> <1992Dec15.222952.17059@lth.se>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal
From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Subject: Re: Pointer comparisons and templates
Message-ID: <1992Dec17.214138.9122@ucc.su.OZ.AU>
Sender: news@ucc.su.OZ.AU
Nntp-Posting-Host: extro.ucc.su.oz.au
Organization: MAXTAL P/L C/- University Computing Centre, Sydney
References: <1992Dec14.075853.3399@lth.se> <1992Dec15.164854.13070@ucc.su.OZ.AU> <1992Dec15.222952.17059@lth.se>
Date: Thu, 17 Dec 1992 21:41:38 GMT
Lines: 27