enum question

Eric eric at makechip.com
Tue Mar 18 13:40:35 PDT 2014


I would like to use enums with elements that are either a struct 
type
or a class type.  However, using struct type seems inefficient 
because
structs are pass by value.  Apparently you can't pass an enum as 
a reference,
so eliminating the pass by value for enums does not seem 
possible. I have read
on this forum that someday enums may be able to be made with 
class elements.
Can enums be made of classes yet, or is there a way to make the 
enum based
on structs more efficient?

Thanks,
Eric


More information about the Digitalmars-d-learn mailing list