Prevent ambiguity in name lookup

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.
This commit is contained in:
Daniela Engert 2021-05-14 10:49:41 +02:00 committed by Victor Zverovich
parent 57280762b6
commit ea94d6d93c

View File

@ -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);
}