I have an enumeration called StackID
, and throughout my code I have to static_cast
it to int
quite a bit - e.g.
StackID somestack;
int id = static_cast<int>(somestack);
Is there a shorthand alternative to doing this cast over and over again ? I have heard of "implicit" conversions - is that something I can use here?
(Possibly related to this question)