change 'this' pointer for structs to reference type
Denis Koroskin
2korden at gmail.com
Sun Nov 2 11:18:03 PST 2008
On Sun, 02 Nov 2008 21:59:50 +0300, Frits van Bommel
<fvbommel at remwovexcapss.nl> wrote:
> Walter Bright wrote:
>> Frits van Bommel wrote:
>>> I think "typeof(this) == S*" is the current situation. What they're
>>> suggesting is "typeof(this) == ref S".
>> Not exactly, ref is not a type constructor. typeof(this)==S
>
> As long as it's still a reference, that's close enough for 'this' :).
Will the following code:
typeof(this) foo = new typeof(this);
work as expected?
More information about the Digitalmars-d
mailing list