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:
Jonathan Emmett 2021-07-01 13:55:46 -04:00 committed by GitHub
parent 5f8473914c
commit 889bbf27a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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>