StateEnum state,
const std::array<std::string_view, 3>& arr) {
return arr[static_cast<size_t>(state)];
}
or directly?
arr[static_cast<size_t>(state)];
but if take plain enum then i can get by without all of it, how better to do, refuse scoping && type safety to easy accsses to elements?
Is this incomprehensible to me because I don't know C++ enough or what
Why not just slap a method on the enum class
tic tac toe
Обсуждают сегодня