From 889bbf27a2fb258085de5e993e5907b3edeb4a40 Mon Sep 17 00:00:00 2001 From: Jonathan Emmett Date: Thu, 1 Jul 2021 13:55:46 -0400 Subject: [PATCH] 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 `` but does not directly include it. This causes compilation failures in MSVC with /permissive-. On other platforms `` is included as a dependency from other headers (specifically from ``), but there is no such implicit dependency in MSVC's STL. Fixes #2401 --- include/fmt/ranges.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h index 52961389..f0390df2 100644 --- a/include/fmt/ranges.h +++ b/include/fmt/ranges.h @@ -392,7 +392,8 @@ struct formatter, Char> { auto format(const tuple_join_view& value, FormatContext& ctx, detail::index_sequence) -> typename FormatContext::iterator { - return format_args(value, ctx, std::get(value.tuple)...); + using std::get; + return format_args(value, ctx, get(value.tuple)...); } template