forked from fmtlib/fmt
Fix missing std::get overload in MSVC (#2407)
This replaces the `std::get` call with an unqualified equivalent to allow it to be treated as a dependent call. ranges.h needs std::get overloads from `<tuple>` but does not directly include it. This causes compilation failures in MSVC with /permissive-. On other platforms `<tuple>` is included as a dependency from other headers (specifically from `<memory>`), but there is no such implicit dependency in MSVC's STL. Fixes #2401
This commit is contained in:
@@ -392,7 +392,8 @@ struct formatter<tuple_join_view<Char, T...>, Char> {
|
|||||||
auto format(const tuple_join_view<Char, T...>& value, FormatContext& ctx,
|
auto format(const tuple_join_view<Char, T...>& value, FormatContext& ctx,
|
||||||
detail::index_sequence<N...>) ->
|
detail::index_sequence<N...>) ->
|
||||||
typename FormatContext::iterator {
|
typename FormatContext::iterator {
|
||||||
return format_args(value, ctx, std::get<N>(value.tuple)...);
|
using std::get;
|
||||||
|
return format_args(value, ctx, get<N>(value.tuple)...);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
|
Reference in New Issue
Block a user