Skip to content

Commit

Permalink
Prevent ambiguity in name lookup
Browse files Browse the repository at this point in the history
Unqualified calls to 'make_format_args' may find the same name by ADL in <format> if this C++20 header happens to be directly or indirectly included in a translation unit. Do a qualified lookup instead.
  • Loading branch information
DanielaE authored and vitaut committed May 14, 2021
1 parent 5728076 commit ea94d6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/compile.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ template <typename Char, typename T, int N> struct spec_field {
constexpr FMT_INLINE OutputIt format(OutputIt out,
const Args&... args) const {
const auto& vargs =
make_format_args<basic_format_context<OutputIt, Char>>(args...);
fmt::make_format_args<basic_format_context<OutputIt, Char>>(args...);
basic_format_context<OutputIt, Char> ctx(out, vargs);
return fmt.format(get_arg_checked<T, N>(args...), ctx);
}
Expand Down

0 comments on commit ea94d6d

Please sign in to comment.