Using enum types

Adam D. Ruppe destructionator at gmail.com
Mon Dec 4 22:37:07 UTC 2017


On Monday, 4 December 2017 at 22:34:41 UTC, helxi wrote:
> enum Waves
> {
> 	Sin = Wave(Positivity.Positive),
> 	Cos = Wave(Positivity.Negative)
> }
> 	writeln(nth_value!(Waves.Sin)(1));
> }

Sin and Cos there are actually values, not types...


More information about the Digitalmars-d-learn mailing list