DIP69 - Implement scope for escape proof references
Manu via Digitalmars-d
digitalmars-d at puremagic.com
Fri Dec 5 23:03:47 PST 2014
On 5 December 2014 at 07:14, Walter Bright via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On 12/4/2014 10:45 AM, H. S. Teoh via Digitalmars-d wrote:
>>
>> However, AFAIK, template *classes* trigger attribute inference on its
>> (non-template) member functions, so this would be problematic:
>>
>> class Base(T) {
>> T data;
>> void method(ref T); // inferred to be scope
>> }
>>
>> class Derived : Base!int {
>> override void method(ref T); // oops, cannot override
>> }
>
>
> I agree, it's a good point. Scope inference cannot be done for virtual
> functions. I amended the DIP.
No comment...
More information about the Digitalmars-d
mailing list