Template alias parameter does not accept types

bearophile bearophileHUGS at lycos.com
Thu May 9 04:19:37 PDT 2013


ref2401:

> template GetString(alias Arg)
> {
> 	enum string GetString = Arg.stringof;
> }
...
> 	writeln(GetString!int); // Error: template instance

Template alias arguments don't yet accept built-in types as int. 
It will be fixed.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list