Why typedef's shouldn't have been removed :(
Gor Gyolchanyan
gor.f.gyolchanyan at gmail.com
Tue May 8 06:43:35 PDT 2012
There's an _is_ expression, which allows one to determine the
underlying type of a enum:
template EnumType(T)
if(is(T U = enum))
{
alias U EnumType;
}
It would be awesome if the same mechanism was implemented for aliased types:
template AliasType(T)
if(is(T U = alias))
{
enum string AliasType = U;
}
which would return a string, containing the alias name.
More information about the Digitalmars-d
mailing list