mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-16 04:12:47 +00:00
Use qualified name lookup rather than ADL. (#2239)
Name lookup within exported templates cannot find non-exported entities by ADL when instantiation takes place outside the module.
This commit is contained in:
parent
9260114162
commit
d8910af80d
@ -3459,7 +3459,7 @@ struct formatter<T, Char,
|
|||||||
auto type = detail::type_constant<T, Char>::value;
|
auto type = detail::type_constant<T, Char>::value;
|
||||||
detail::specs_checker<handler_type> handler(handler_type(specs_, ctx),
|
detail::specs_checker<handler_type> handler(handler_type(specs_, ctx),
|
||||||
type);
|
type);
|
||||||
auto it = parse_format_specs(begin, end, handler);
|
auto it = detail::parse_format_specs(begin, end, handler);
|
||||||
auto eh = ctx.error_handler();
|
auto eh = ctx.error_handler();
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case detail::type::none_type:
|
case detail::type::none_type:
|
||||||
@ -3477,7 +3477,7 @@ struct formatter<T, Char,
|
|||||||
detail::check_int_type_spec(specs_.type, eh);
|
detail::check_int_type_spec(specs_.type, eh);
|
||||||
break;
|
break;
|
||||||
case detail::type::char_type:
|
case detail::type::char_type:
|
||||||
handle_char_specs(
|
detail::handle_char_specs(
|
||||||
specs_, detail::char_specs_checker<decltype(eh)>(specs_.type, eh));
|
specs_, detail::char_specs_checker<decltype(eh)>(specs_.type, eh));
|
||||||
break;
|
break;
|
||||||
case detail::type::float_type:
|
case detail::type::float_type:
|
||||||
@ -3603,7 +3603,7 @@ template <typename Char = char> class dynamic_formatter {
|
|||||||
format_str_ = ctx.begin();
|
format_str_ = ctx.begin();
|
||||||
// Checks are deferred to formatting time when the argument type is known.
|
// Checks are deferred to formatting time when the argument type is known.
|
||||||
detail::dynamic_specs_handler<ParseContext> handler(specs_, ctx);
|
detail::dynamic_specs_handler<ParseContext> handler(specs_, ctx);
|
||||||
return parse_format_specs(ctx.begin(), ctx.end(), handler);
|
return detail::parse_format_specs(ctx.begin(), ctx.end(), handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, typename FormatContext>
|
template <typename T, typename FormatContext>
|
||||||
|
Loading…
Reference in New Issue
Block a user