July 04, 2013
On 07/04/13 16:46, Joseph Rushton Wakeling wrote:
> Suppose I've got a function that is conditional on a type:
> 
>     void foo(T)(/* input vars */) { ... }
> 
> How could I print out using writeln the name of that type?  So that if I call
> 
>     foo!double(...);
> 
> ... I would see:
> 
>     Today, Michael, I'm going to be a double!

    writeln("Today, Michael, I'm going to be a "~T.stringof~"!")

artur
July 04, 2013
On 07/04/2013 04:51 PM, Artur Skawina wrote:
>     writeln("Today, Michael, I'm going to be a "~T.stringof~"!")
> 
> artur

<facepalm>I used to know that, too.</facepalm>

Thanks very much! :-)