From 5f6fba8f14e8ff4ea2ace43fb1601266153fbbaa Mon Sep 17 00:00:00 2001 From: pmqtt <51272730+pmqtt@users.noreply.github.com> Date: Fri, 11 Aug 2023 22:54:47 +0200 Subject: [PATCH] Update format.h --- include/fmt/format.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index e5bd8b11..e65e34aa 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -4290,8 +4290,13 @@ auto join(Range&& range, string_view sep) template ::value)> inline auto to_string(const T& value) -> std::string { auto buffer = memory_buffer(); - detail::write(appender(buffer), value); - return {buffer.data(), buffer.size()}; + if constexpr (is_scoped_enum::value){ + detail::write(appender(buffer), static_cast::type>(value)); + return {buffer.data(), buffer.size()}; + }else{ + detail::write(appender(buffer), value); + return {buffer.data(), buffer.size()}; + } } template ::value)>