From 11112ee96fdc810848869c822b690fac55b95720 Mon Sep 17 00:00:00 2001
From: Jonathan Emmett <joemmett@microsoft.com>
Date: Thu, 1 Jul 2021 11:49:44 -0400
Subject: [PATCH] Fix missing std::get overload in MSVC

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
---
 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 529613890453..f0390df211f3 100644
--- a/include/fmt/ranges.h
+++ b/include/fmt/ranges.h
@@ -392,7 +392,8 @@ struct formatter<tuple_join_view<Char, T...>, Char> {
   auto format(const tuple_join_view<Char, T...>& value, FormatContext& ctx,
               detail::index_sequence<N...>) ->
       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>