diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h index 12296c89..0d6f3d3d 100644 --- a/include/fmt/ranges.h +++ b/include/fmt/ranges.h @@ -601,12 +601,12 @@ struct formatter< template , context>::value)> static auto map(T&& value) -> T&& { - return (T &&) value; + return static_cast(value); } template , context>::value)> - static auto map(T&& value) -> decltype(mapper().map((T &&) value)) { - return mapper().map((T &&) value); + static auto map(T&& value) -> decltype(mapper().map(static_cast(value))) { + return mapper().map(static_cast(value)); } using formatter_type = conditional_t<