From 69cca8166276a6c6ccea404c0c3e6a5640b8d4d9 Mon Sep 17 00:00:00 2001 From: Matthias Moulin Date: Fri, 5 Apr 2024 10:13:20 +0200 Subject: [PATCH] Fixed MSVC C2661: no overloaded function takes 2 arguments Fixed Error C2661 'fmt::v10::vformat': no overloaded function takes 2 arguments for MSVC v17.9.5 (fmt module). --- include/fmt/format-inl.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index 5a9afd1ff35a..4c19bb50408e 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -147,12 +147,6 @@ FMT_API FMT_FUNC auto format_facet::do_put( } #endif -FMT_FUNC auto vsystem_error(int error_code, string_view fmt, format_args args) - -> std::system_error { - auto ec = std::error_code(error_code, std::generic_category()); - return std::system_error(ec, vformat(fmt, args)); -} - namespace detail { template @@ -1434,6 +1428,12 @@ FMT_FUNC auto vformat(string_view fmt, format_args args) -> std::string { return to_string(buffer); } +FMT_FUNC auto vsystem_error(int error_code, string_view fmt, format_args args) + -> std::system_error { + auto ec = std::error_code(error_code, std::generic_category()); + return std::system_error(ec, vformat(fmt, args)); +} + namespace detail { template struct span {