Alias Vs. Enum?
Rubn
where at is.this
Sat Jan 6 21:33:46 UTC 2018
Is there a reason for the differences between Enum and Alias? For
the most part enums are only used for things that have a value,
but alias is used more for types. But with templates you can get
around this and you basically get the funcitonality of Enum for
alias. Oddly enough from the template parameter being "alias".
template valueOf(alias v)
{
}
alias aa = AliasSeq!(10 == 10);
enum ee = 10 == 10;
alias err = 10 == 10; // error
What are the actually differences here with aa and ee?
More information about the Digitalmars-d
mailing list