下のようにenumにint値を入れたりintにenum値を入れるのって問題ありますか?


enum Keyname { keyShift, keyCtrl, keyAlt };
int k = 1;
Keyname optionkey = static_cast<Keyname>(k);