I wanted to change an old-style enum to enum class : int because of its own scope.
enum
enum class : int
But the compiler complains about using the values in integer
You can convert them explicitly via a static_cast.
int id = (static_cast(MsgType::Input) << 16) + (static_cast(MsgSender::A)) ;