C++ frequently questioned answers

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Mon Oct 29 03:21:20 PDT 2007


Regan Heath wrote:
> Ary Borenszweig wrote:
>> Try compiling and running these:
>>
[snip normal "static this" version]
>> 2.
>> ---
>> import std.stdio;
>>
>> class X {
>>     static {
>>             this() {
>>         writefln("static");
>>             }
>>     }
>> }
>>
>> void main() {
>> }
>> ---
> 
> Has this been reported as a bug?

IIRC Walter has said that "static this" needs to be two adjacent tokens 
for it to be parsed as such, and this is not a bug but working as designed.
I'm not sure whether this is a good thing or not, but it's the current 
state of affairs.



More information about the Digitalmars-d mailing list