Код: Выделить всё
template
requires std::is_enum_v
constexpr std::string enum_to_string(E value) {
template for (constexpr auto e : std::meta::enumerators_of(^^E)) {
if (value == [:e:]) {
return std::string(std::meta::identifier_of(e));
}
}
return "";
}
Код: Выделить всё
end()Код: Выделить всё
end()Подробнее здесь: https://stackoverflow.com/questions/796 ... ork-in-c26
Мобильная версия