Stop using the enum as a manifest constant.
evilrat
evilrat666 at gmail.com
Sun Jun 6 10:24:54 UTC 2021
On Sunday, 6 June 2021 at 10:09:03 UTC, Jack Applegame wrote:
> 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.
Nah, that enum arrays specifically, deprecating this specific
case is probably ok though.
More information about the Digitalmars-d
mailing list