It is not possible to create enums of class references. Enums must be compile-time constants, which references are not.
Create Enum of Class References
-
01-07-2022 - |
Question
How would I create an enum of class references in D? (They all implement the same interface)
This is what I have tried:
enum byteCommands : ByteCommand*
{
END_OF_CODE = null,
PRINT_VAR = PrintVarCommand*
}
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow