Re: How to fix a program that depends on friend injection?
On Mar 13, 12:13 am, Gennaro Prota <clcppm-pos...@this.is.invalid>
wrote:
On Mon, 12 Mar 2007 08:21:14 CST, James Kanze wrote:
[...]
BTW: the Wikipedia article doesn't seem to be correct
technically (not really surprising, for Wikipedia): if memory
serves me correctly, you've always been able to overload
template functions.
I wrote that part. But I wasn't born (C++-wise :-)) at that time;
But you did verify it with the original documentation from
CFront, didn't you? That would seem a minimum for an
"Encyclopedia". (The fact, of course, that you didn't, and that
you could still write, or modify the article, is symptomatic of
the problem with Wikipedia.)
the claim comes for "C++ Templates: The Complete Guide". I'd
be very surprised if Daveed and Nico got this wrong. (Same
about you, in general, but in this case you say that you
haven't checked and are just recollecting)
Niether Daveed and Nico, nor myself, are infallible. In this
particular case, however, I'm very sure that some forms of
overloading was supported in CFront 3.0, which is the oldest
implementation of templates. It didn't work at all like what we
have today, but it was still overloading.
Are you sure that David and Nico didn't qualify their statement
with something like: "in its present form". You could definitly
write something like:
int f( int ) ;
template< class T > int f( T ) ;
but it wouldn't work at all like what we expect today.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient?e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S?mard, 78210 St.-Cyr-l'?cole, France, +33 (0)1 30 23 00 34
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]