Workaround for Visual C++ error C2039 with std::tuple_element_t.

Fixes #3931

PiperOrigin-RevId: 480659507
Change-Id: I6fabef63b1285189a06375227273d9de2456e37a
This commit is contained in:
Abseil Team
2022-10-12 10:30:15 -07:00
committed by Copybara-Service
parent d9bb8412d6
commit d29b143bda
2 changed files with 15 additions and 4 deletions

View File

@@ -453,6 +453,13 @@ struct Function<R(Args...)> {
template <typename R, typename... Args>
constexpr size_t Function<R(Args...)>::ArgumentCount;
// Workaround for MSVC error C2039: 'type': is not a member of 'std'
// when std::tuple_element is used.
// See: https://github.com/google/googletest/issues/3931
// Can be replaced with std::tuple_element_t in C++14.
template <size_t I, typename T>
using TupleElement = typename std::tuple_element<I, T>::type;
bool Base64Unescape(const std::string& encoded, std::string* decoded);
#ifdef _MSC_VER