Skip to content

Commit

Permalink
Googletest export
Browse files Browse the repository at this point in the history
Explicitly default copy constructor in BoundSecondMatcher

Since C++11, implicit defaulting of copy constructors is deprecated for types
with user-defined copy assignment operators, so we should explicitly default the
copy constructor of BoundSecondMatcher.

PiperOrigin-RevId: 287587847
  • Loading branch information
Abseil Team authored and Andy Soffer committed Jan 2, 2020
1 parent 07ab939 commit 306f375
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions googlemock/include/gmock/gmock-matchers.h
Original file line number Diff line number Diff line change
Expand Up @@ -3169,6 +3169,8 @@ class BoundSecondMatcher {
BoundSecondMatcher(const Tuple2Matcher& tm, const Second& second)
: tuple2_matcher_(tm), second_value_(second) {}

BoundSecondMatcher(const BoundSecondMatcher& other) = default;

template <typename T>
operator Matcher<T>() const {
return MakeMatcher(new Impl<T>(tuple2_matcher_, second_value_));
Expand Down

0 comments on commit 306f375

Please # to comment.