My general rule is to pass by value for primitive types and pass by reference for objects (obviously const'd if need be). However, I'm not sure what route to take with enumerated types. I'd assume that pass by value is preferred since they are seemingly small, but I'd like to hear others thoughts.
No other thoughts. An enum is just an integral value in a fancy dress (or suit, if you prefer). It has no internal structure and will travel in a register given a chance. If you'd pass an int by value, pass an enum that way, too.
Enum have a underlying representation type which is an integer types. There are no more reasons (and no less) to pass them by reference that there are reasons to pass integer types by reference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With