From b79ed4105ab2ee268cfdf056aed5b7fb4c09dcb8 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 1 Sep 2022 16:14:53 -0700 Subject: [PATCH] Remove unnecessary type_identity --- include/fmt/core.h | 13 +++++++------ include/fmt/format.h | 7 +++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 86828332..354377f6 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -17,7 +17,7 @@ #include // The fmt library version in the form major * 10000 + minor * 100 + patch. -#define FMT_VERSION 90100 +#define FMT_VERSION 90101 #if defined(__clang__) && !defined(__ibmxl__) # define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__) @@ -3012,11 +3012,11 @@ void check_format_string(S format_str) { ignore_unused(invalid_format); } +// Don't use type_identity for args to simplify symbols. template -void vformat_to( - buffer& buf, basic_string_view fmt, - basic_format_args)> args, - locale_ref loc = {}); +void vformat_to(buffer& buf, basic_string_view fmt, + basic_format_args args, + locale_ref loc = {}); FMT_API void vprint_mojibake(std::FILE*, string_view, format_args); #ifndef _WIN32 @@ -3275,7 +3275,8 @@ template FMT_NODISCARD FMT_INLINE auto formatted_size(format_string fmt, T&&... args) -> size_t { auto buf = detail::counting_buffer<>(); - detail::vformat_to(buf, string_view(fmt), fmt::make_format_args(args...), {}); + detail::vformat_to(buf, string_view(fmt), + format_args(fmt::make_format_args(args...)), {}); return buf.count(); } diff --git a/include/fmt/format.h b/include/fmt/format.h index d96c9012..cd5755cf 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -4075,10 +4075,9 @@ FMT_NODISCARD auto to_string(const basic_memory_buffer& buf) FMT_BEGIN_DETAIL_NAMESPACE template -void vformat_to( - buffer& buf, basic_string_view fmt, - basic_format_args)> args, - locale_ref loc) { +void vformat_to(buffer& buf, basic_string_view fmt, + basic_format_args args, + locale_ref loc) { // workaround for msvc bug regarding name-lookup in module // link names into function scope using detail::arg_formatter;