“Simple” enum to string
template <typename E>
requires std::is_enum_v<E>
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::name_of(e));
}
}
return "<unnamed>";
}
They have taken us for absolute fools.
Why the fuck does everything need to be a dragon?
You all watched too much shrek.