🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: overloading and WP

#2117
From: Stefan Glass
Date: Thu, 05 Oct 1995 08:29
36 lines
1869 bytes
In article <AKV.95Sep29014218@srl03.cacs.usl.edu> akv@cacs.usl.edu writes:

>> Check out the third declaration of function "f". Is that supposed to
>> be an error -- I mean the comment?
>>
>>   13.1  Overloadable declarations                            [over.load]
>>   ....
>>  --Two parameter declarations that differ only in their  default  argu-
>>     ments are equivalent.  [Example: consider the following:
>>               void f (int i, int j);
>>               void f (int i, int j = 99);         // Ok: redeclaration of f (int, int)
>>               void f (int i = 88);                // Ok: redeclaration of f (int, int)
>>               void f ();                          // Ok: overloaded declaration of f

And Andrew Koenig (ark@att.research.com) replied:

> It's a typo: the line
>
>                void f (int i = 88);
>
> should read
> 
>                void f (int i = 88, j);

There's a typo in the correction. j isn't declared as an int, or as anything
for that matter. ( Or does this mean we're reintroducing the K&R C rule that
unspecified identifiers are ints %^)


Steve Glass
Canolfan Peirianneg Meddalwedd Caerdydd
BT
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <44tjgf$2mu@pheidippides.axion.bt.co.uk>
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
References: <AKV.95Sep29014218@srl03.cacs.usl.edu> <DFq393.Ew2@research.att.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
Date: 05 Oct 95 08:29:15 GMT
Approved: fjh@cs.mu.oz.au
From: Stefan Glass <glasss@boat.bt.com>
Newsgroups: comp.std.c++
Subject: Re: overloading and WP
X-Original-Date: 4 Oct 1995 09:18:07 GMT
Organization: BT Cardiff Software Engineering Centre
Message-ID: <44tjgf$2mu@pheidippides.axion.bt.co.uk>
References: <AKV.95Sep29014218@srl03.cacs.usl.edu> <DFq393.Ew2@research.att.com>
X-Mailer: Mozilla 1.2N (Windows; I; 16bit)