I have basically two questions may be they are related so I'll put them into one.
Should we pass enum class in C++11 by reference or value when passing to function. It is sort of inheriting primitive type but is it the whole object that is passed? in since enum classes are type safe;
enum class MyEnumClass : unsigned short {
Flag1 = 0,
Flag2 = 1,
Flag3 = 2,
Flag4 = 4,
};
Now lets say we have function sig
const char* findVal(const MyEnumClass& enumClass);
^
should this be by const ref? __|
my other question is here -
SHOULD IT BE BY MOVE like (MyEnumClass&&) - I am still learning/understanding
move semantics and rvalue so I am not sure if move semantics are only for
constructors or can be for member or static funcs -