Fixed assertion failure in VS debug mode
Partially reverted 1317063b21c7ec35f5f1d552a8698068dfef4537. enum class is not part of the common subset of supported C++11 functions of the compilers supported by cppcheck. (Fixes #5745)