change 'this' pointer for structs to reference type

BCS ao at pathlink.com
Mon Nov 3 17:38:10 PST 2008


Reply to Walter,

> Denis Koroskin wrote:
> 
>> Will the following code:
>> typeof(this) foo = new typeof(this);
>> work as expected?
>> 
> No, because new will still return a typeof(this)*.
> 

In struct, yes, but not in classes I wouldn't think?





More information about the Digitalmars-d mailing list