diff options
-rw-r--r-- | googlemock/include/gmock/gmock-actions.h | 3 | ||||
-rw-r--r-- | googlemock/include/gmock/gmock-more-actions.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h index 26272e9..2c4ce36 100644 --- a/googlemock/include/gmock/gmock-actions.h +++ b/googlemock/include/gmock/gmock-actions.h @@ -1077,7 +1077,8 @@ struct ReturnNewAction { template <size_t k> struct ReturnArgAction { - template <typename... Args> + template <typename... Args, + typename = typename std::enable_if<(k < sizeof...(Args))>::type> auto operator()(Args&&... args) const -> decltype(std::get<k>( std::forward_as_tuple(std::forward<Args>(args)...))) { return std::get<k>(std::forward_as_tuple(std::forward<Args>(args)...)); diff --git a/googlemock/include/gmock/gmock-more-actions.h b/googlemock/include/gmock/gmock-more-actions.h index 87307f0..148ac01 100644 --- a/googlemock/include/gmock/gmock-more-actions.h +++ b/googlemock/include/gmock/gmock-more-actions.h @@ -600,7 +600,8 @@ auto InvokeArgument(F f, Args... args) -> decltype(f(args...)) { template <std::size_t index, typename... Params> struct InvokeArgumentAction { - template <typename... Args> + template <typename... Args, + typename = typename std::enable_if<(index < sizeof...(Args))>::type> auto operator()(Args&&... args) const -> decltype(internal::InvokeArgument( std::get<index>(std::forward_as_tuple(std::forward<Args>(args)...)), std::declval<const Params&>()...)) { |