diff --git a/include/essence/meta/enum.hpp b/include/essence/meta/enum.hpp index 9a9f47f..5ed943d 100644 --- a/include/essence/meta/enum.hpp +++ b/include/essence/meta/enum.hpp @@ -56,12 +56,19 @@ namespace essence::meta { constexpr auto min = range.first; constexpr auto max = range.second; + struct dummy { + static constexpr auto copy(std::string_view str) noexcept { + // ReSharper disable once CppDFALocalValueEscapesFunction + return str; + } + }; + auto origin = [&](std::index_sequence) -> generator> { - (co_yield std::pair{get_literal_string_v(min + Is), + (co_yield std::pair{dummy::copy(get_literal_string_v(min + Is), identifier_param{ .shortened = Short, .ensure_correctness = false, - }>(), + }>()), static_cast(min + Is)}, ...); }(std::make_index_sequence{});