Format.convert problme

Qian Xu quian.xu at stud.tu-ilmenau.de
Mon Apr 6 04:24:45 PDT 2009


grauzone wrote:

> mport tango.io.Stdout;
> 
> void main() {
> 
> int v = 55;
> int *pv = &v;
> 
> //pv (an int pointer) can be exchanged with v (an int),
> //and it still works
> auto i = pv;
> 
> alias typeof(i) T;
> static if (is(T T2 : T2*)) {
> T2 i2 = *i;
> Stdout.formatln("{}", i2);
> } else {
> Stdout.formatln("{}", i);
> }
> 
> }


Thanks. Now I understood your code. ^^)


More information about the Digitalmars-d-learn mailing list