summaryrefslogtreecommitdiffstats
path: root/googlemock/include/gmock/internal
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2022-10-12 17:30:15 (GMT)
committerCopybara-Service <copybara-worker@google.com>2022-10-12 17:31:07 (GMT)
commitd29b143bda80baad6fd3f5b523ed54f10eb0eea3 (patch)
treefd21972572d498eecb90f2963810b3f0fc108303 /googlemock/include/gmock/internal
parentd9bb8412d60b993365abb53f00b6dad9b2c01b62 (diff)
downloadgoogletest-d29b143bda80baad6fd3f5b523ed54f10eb0eea3.zip
googletest-d29b143bda80baad6fd3f5b523ed54f10eb0eea3.tar.gz
googletest-d29b143bda80baad6fd3f5b523ed54f10eb0eea3.tar.bz2
Workaround for Visual C++ error C2039 with std::tuple_element_t.
Fixes #3931 PiperOrigin-RevId: 480659507 Change-Id: I6fabef63b1285189a06375227273d9de2456e37a
Diffstat (limited to 'googlemock/include/gmock/internal')
-rw-r--r--googlemock/include/gmock/internal/gmock-internal-utils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h
index 92d8eb9..2678920 100644
--- a/googlemock/include/gmock/internal/gmock-internal-utils.h
+++ b/googlemock/include/gmock/internal/gmock-internal-utils.h
@@ -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