class scope virtual template functions

Jason House jason.james.house at gmail.com
Thu May 29 14:15:53 PDT 2008


Walter Bright Wrote:
> 
> True, but now you have the issue that minor, seemingly innocuous changes 
> to a template function can have dramatic changes to its behavior. It's a 
> lot easier to understand "template functions are not virtual" than 
> "template functions are not virtual except in these rather complex 
> scenarios."

I'd prefer the compiler to require non-virtual functions to be declared final or private. This then allows the compiler to nority the programmer of limitations instead of the spec. It'd also open the door for proposals like this one...



More information about the Digitalmars-d mailing list