diff options
Diffstat (limited to 'googlemock/include/gmock/gmock-matchers.h')
-rw-r--r-- | googlemock/include/gmock/gmock-matchers.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index 473b3aa8..7d136af9 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -470,10 +470,12 @@ class MatcherBaseImpl<Derived<Ts...>> { // conversions. template <typename E = std::enable_if<sizeof...(Ts) == 1>, typename E::type* = nullptr> - explicit MatcherBaseImpl(Ts... params) : params_(std::move(params)...) {} + explicit MatcherBaseImpl(Ts... params) + : params_(std::forward<Ts>(params)...) {} template <typename E = std::enable_if<sizeof...(Ts) != 1>, typename = typename E::type> - MatcherBaseImpl(Ts... params) : params_(std::move(params)...) {} // NOLINT + MatcherBaseImpl(Ts... params) // NOLINT + : params_(std::forward<Ts>(params)...) {} template <typename F> operator ::testing::Matcher<F>() const { // NOLINT(runtime/explicit) |