Alias Vs. Enum?

Rubn where at is.this
Sat Jan 6 21:36:22 UTC 2018


Tab + Enter + No Delete/Edit = :/


template valueOf(alias v) // <-- alias
{
     alias valueOf = v;
}

alias aa = valueOf!(10 == 10);
enum  ee = 10 == 10;

alias err = 10 == 10; // error


Can't alias just be extended to support enum values as well 
instead of having this workaround with templates? Is there any 
reason this hasn't already been done?





More information about the Digitalmars-d mailing list