aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Strehle <Christoph.Strehle@teamviewer.com>2019-11-21 14:58:09 +0100
committerChristoph Strehle <Christoph.Strehle@teamviewer.com>2019-11-21 14:58:09 +0100
commit6a9d6d5c28a78bb0f1906d3a6bea5c04f584c24a (patch)
tree4349dd3bd925819d29fabe52f2180fc4ce88ed83
parentc27acebba3b3c7d94209e0467b0a801db4af73ed (diff)
downloadgoogletest-6a9d6d5c28a78bb0f1906d3a6bea5c04f584c24a.tar.gz
googletest-6a9d6d5c28a78bb0f1906d3a6bea5c04f584c24a.tar.bz2
googletest-6a9d6d5c28a78bb0f1906d3a6bea5c04f584c24a.zip
Fix compile break for Microsoft Visual Studio 2017 v141
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
-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 b040004a..21469070 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 {