Steven Sharp wrote: >>From: "Rich, Dave" <Dave_Rich@mentor.com> > > >>Maybe we need to >>say the presence of a default needs to match, but not the expression >>itself. > > > A little thought shows that this part is required. The caller can > leave out an argument only when there is a default. How can the > compiler determine whether it is legal for the caller to leave out > an argument to a virtual method, when it doesn't know which > implementation will be called until runtime, unless all of them > must match? Surely you aren't suggesting that this be a runtime > check? No, the presence of defaults must be (at latest) an elab time check. Note that it can be as late as elaboration, as can the check as to whether a virtual function override is valid. I've noticed a few places where the LRM uses "compile/compiler" for checks (like this) that are really checks that must be done "no later than elaboration" but certainly can't always be done at initial analysis time (i.e. "compile"). Gord > Steven Sharp > sharp@cadence.com > -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.comReceived on Mon Jan 23 06:47:05 2006
This archive was generated by hypermail 2.1.8 : Mon Jan 23 2006 - 06:47:59 PST