diff --git a/include/config.hpp b/include/config.hpp index 18ff0b5..3df4c8c 100644 --- a/include/config.hpp +++ b/include/config.hpp @@ -8,6 +8,7 @@ #endif #include +#include #include @@ -74,6 +75,11 @@ inline std::istream &operator>>(std::istream &is, name &en) {\ std::string input;\ is >> input;\ + if (isInt(input)) {\ + en = static_cast(std::stoul(input));\ + return is;\ + }\ + toUpper(input);\ FOR_EACH(ENUM_FROM_STRING, name, __VA_ARGS__)\ return is;\ }