Article View: comp.std.c++
Article #2081Re: overloading and WP
From: Andrew Koenig
Date: Sat, 30 Sep 1995 19:09
Date: Sat, 30 Sep 1995 19:09
31 lines
1505 bytes
1505 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 It's a typo: the line void f (int i = 88); should read void f (int i = 88, j); -- --Andrew Koenig ark@research.att.com --- [ 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:
<DFq393.Ew2@research.att.com>Path:
arc1-ca.pugleaf.net!howland.reston.ans.net!agate!agate!MattReferences:
<AKV.95Sep29014218@srl03.cacs.usl.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!howland.reston.ans.net!agate!agate!Matt From: ark@research.att.com (Andrew Koenig) Newsgroups: comp.std.c++ Subject: Re: overloading and WP Date: 30 Sep 1995 19:09:56 GMT Organization: AT&T Bell Laboratories, Murray Hill NJ Approved: Matt@Austern Message-ID: <DFq393.Ew2@research.att.com> References: <AKV.95Sep29014218@srl03.cacs.usl.edu> NNTP-Posting-Host: austern.hip.berkeley.edu