[sv-ec] Default arguments on virtual methods

From: Steven Sharp <sharp_at_.....>
Date: Wed Aug 13 2008 - 14:39:32 PDT
The LRM allows virtual methods in derived classes to have default
argument values that do not match the base class.  They are only
required to match in having or not having a default value.  It is
not clear what the behavior should be when they do not match.

Possible interpretations:

A. Assume that the values were required to match, but it was too
   hard to specify that in a reasonable way.  Implementations can
   use the value from whichever declaration is convenient, and produce
   an error or warning if the value in a derived class does not match.

B. Use the default value from the static class type of the handle.

C. Use the default value from the actual class type of the handle,
   which is the one from the virtual method that is actually called.
   This makes these defaults "virtual", like the methods.  If it was
   intended that the values could differ, then I would expect this to
   be the desired behavior.
   
I know this has been brought up before, but it has never been resolved.
Given that the behaviors are quite different, it needs to be.

Steven Sharp
sharp@cadence.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Aug 13 14:44:41 2008

This archive was generated by hypermail 2.1.8 : Wed Aug 13 2008 - 14:45:26 PDT