Template return values?

bearophile bearophileHUGS at lycos.com
Tue Dec 4 04:48:55 PST 2012


Era Scarecrow:

>  So then in theory
>
>  Variant v;
>  int i = v.getValue; //calls getValue!int()

I think this is not possible in D.

This seems possible:
auto i = v.getValue!int;

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list