__FUNCTION__
Jarrett Billingsley
jarrett.billingsley at gmail.com
Sat Feb 28 13:16:08 PST 2009
On Sat, Feb 28, 2009 at 4:10 PM, grauzone <none at example.net> wrote:
>
> For classes and structs, this is already possible: typeof(this).stringof
>
> 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.
Oh, that'd be nice. It'd be even nicer if .stringof had any more
documentation than "returns a string representation of something."
Like what format it's supposed to be in, what you're supposed to get
when you get the string of something like:
struct S { int x; } pragma(msg, S.x.stringof);
that kind of stuff. As it is I have *no* idea if any of my uses of
stringof are legal, and it worries me even more that other compilers
will freely implement it any way they choose, breaking my code on
anything but DMDFE.
More information about the Digitalmars-d
mailing list