summaryrefslogtreecommitdiffstats
path: root/googlemock
diff options
context:
space:
mode:
authorChristoph Strehle <Christoph.Strehle@teamviewer.com>2019-11-21 13:58:09 (GMT)
committerChristoph Strehle <Christoph.Strehle@teamviewer.com>2019-11-21 13:58:09 (GMT)
commit6a9d6d5c28a78bb0f1906d3a6bea5c04f584c24a (patch)
tree4349dd3bd925819d29fabe52f2180fc4ce88ed83 /googlemock
parentc27acebba3b3c7d94209e0467b0a801db4af73ed (diff)
downloadgoogletest-6a9d6d5c28a78bb0f1906d3a6bea5c04f584c24a.zip
googletest-6a9d6d5c28a78bb0f1906d3a6bea5c04f584c24a.tar.gz
googletest-6a9d6d5c28a78bb0f1906d3a6bea5c04f584c24a.tar.bz2
Fix compile break for Microsoft Visual Studio 2017 v141refs/pull/2583/head
This is a workaround, for those who have to compile with v141 build tools, for a bug in msvc that the compiler can't compile the WithArgsAction. see the following link for more details: https://developercommunityapi.westus.cloudapp.azure.com/content/problem/420339/googlemocks-withargs-doesnt-compile-with-permissiv.html
Diffstat (limited to 'googlemock')
-rw-r--r--googlemock/include/gmock/gmock-actions.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h
index b040004..2146907 100644
--- a/googlemock/include/gmock/gmock-actions.h
+++ b/googlemock/include/gmock/gmock-actions.h
@@ -916,7 +916,8 @@ struct WithArgsAction {
// We use the conversion operator to detect the signature of the inner Action.
template <typename R, typename... Args>
operator Action<R(Args...)>() const { // NOLINT
- Action<R(typename std::tuple_element<I, std::tuple<Args...>>::type...)>
+ using TupleType = std::tuple<Args...>;
+ Action<R(typename std::tuple_element<I, TupleType>::type...)>
converted(action);
return [converted](Args... args) -> R {