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?
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".
- Alias Vs. Enum? Rubn via Digitalmars-d
- Re: Alias Vs. Enum? Rubn via Digitalmars-d
- Re: Alias Vs. Enum? Timon Gehr via Digitalmars-d
- Re: Alias Vs. Enum? Stefan Koch via Digitalmars-d
- Re: Alias Vs. Enum? Simen Kjærås via Digitalmars-d
- Re: Alias Vs. Enum? sarn via Digitalmars-d