Skip to content

Commit

Permalink
Fixed MSVC C2661: no overloaded function takes 2 arguments
Browse files Browse the repository at this point in the history
Fixed Error C2661 'fmt::v10::vformat': no overloaded function takes 2 arguments for MSVC v17.9.5 (fmt module).
  • Loading branch information
matt77hias authored Apr 5, 2024
1 parent 4e8640e commit 69cca81
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/fmt/format-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,6 @@ FMT_API FMT_FUNC auto format_facet<std::locale>::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 <typename F>
Expand Down Expand Up @@ -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 <typename T> struct span {
Expand Down

0 comments on commit 69cca81

Please sign in to comment.