Why are multiple instances of the single enum created?

Per Nordlöw per.nordlow at gmail.com
Mon Feb 1 09:40:20 UTC 2021


An enum only exists at compile-time, and does not occupy any
space. Each time it's referenced, a new instance of the value
is created. Why is that? Seems like a waste of resources to the 
compiler.


More information about the Digitalmars-d-learn mailing list