Stop using the enum as a manifest constant.

Jack Applegame japplegame at gmail.com
Sun Jun 6 10:09:03 UTC 2021


On Sunday, 6 June 2021 at 09:53:09 UTC, evilrat wrote:
> On Sunday, 6 June 2021 at 09:49:11 UTC, Jack Applegame wrote:
>
> What did you expected from an enum array?

The same output as when using a `static const` array.

> It is known to allocate every time you reference it (except 
> maybe for strings), have you just noticed this?

It's a well-known "feature" of enum. And it's one of the reasons 
why we should ban such use of it.





More information about the Digitalmars-d mailing list