stringof alias

John Colvin john.loughran.colvin at gmail.com
Fri Jul 19 01:08:26 PDT 2013


On Friday, 19 July 2013 at 08:02:45 UTC, JS wrote:
> I have a template
>
> template T(alias t)
> {
>   pragma(msg, t.stringof);
>   .... other stuff ...
> }
>
> which I use in a class and pass fields/members to.
>
> D complains that t does not have a this.
>
> I'd just like to print the literal text that was passed to T. 
> (which I actually do in ctfe) This is so I can have some sort 
> of debug output of what was passed to t.

that error is probably related to what you're passing as t, which 
leads to the obvious question: what sort of things are you 
passing as t?


More information about the Digitalmars-d-learn mailing list