__FUNCTION__

Christopher Wright dhasenan at gmail.com
Sat Feb 28 19:04:37 PST 2009


Andrei Alexandrescu wrote:
> grauzone wrote:
>> For classes and structs, this is already possible: typeof(this).stringof
> 
> Not outside of a member function. This is crippling my Visitor 
> implementation.

I use it in static constructors. If it doesn't work, well, that's news 
to me.

I don't know about "typeof(this) property;", though. I never tried it.

>> Now we only need a way to get some kind of compile time object for 
>> functions and modules (like the type for classes/structs). Then you 
>> simply can use .stringof on them.
> 
> There's much more to reflection that we need to define.

Runtime as well as compile time.



More information about the Digitalmars-d mailing list