std C/C++ patch

David Scott Page page at cs.utexas.edu
Wed Apr 24 15:49:54 EDT 2002


Eddie,

> I was going to write how this
> 
> > redundant default argument in method definition,
> 
> was actually legal C++ -- page 153 of my Stroustrup v3: "A default argument
> can be repeated in a subsequent declaration in the same scope but not
> changed." -- but then the standard text disagrees. Crap. I like repeating
> default arguments.

I think Stroustrup might, too (I find it convenient when copy/pasting
declarations to/from definitions).

http://www.research.att.com/~bs/3rd_printing6.html :

pg 153 s/A default argument can be repeated in a subsequent
declaration in the same scope but not changed./A default argument
cannot be repeated or changed in a subsequent declaration in the same
scope./ (unnoticed standards change).

I'll send some more, less trivial, changes your way in a bit.  I hope
you don't mind: I like to solicit opinions from KCC, gcc, and Sun CC,
before declaring victory and moving on. You probably don't have the
time to squander, but Intel has a no-cost no-support license for their
EDG based C++ v5 compiler on Linux. Unfortunately (for my purposes),
it lacks template template-parameter support, like the Sun compiler.

-- Scott Page



More information about the click mailing list