diff options
author | Mark Barolak <mbar@google.com> | 2019-12-05 19:41:50 (GMT) |
---|---|---|
committer | Mark Barolak <mbar@google.com> | 2019-12-05 19:41:50 (GMT) |
commit | 1d563578c86fe64e70910e3b720600f10c48df73 (patch) | |
tree | 44aa6ab46c789e6bd5a04fdc7fe9c87b91d3bad2 /googlemock/include | |
parent | cf75d4b92ecc20bb44ec33aa44eee6685b7595dd (diff) | |
parent | 6748df1eab1dd741a6deffcdd5012d521c1d3a46 (diff) | |
download | googletest-1d563578c86fe64e70910e3b720600f10c48df73.zip googletest-1d563578c86fe64e70910e3b720600f10c48df73.tar.gz googletest-1d563578c86fe64e70910e3b720600f10c48df73.tar.bz2 |
Merge pull request #2594 from kuzkry:remove-workaround_msvc-unneeded-const-dropping
PiperOrigin-RevId: 283979494
Diffstat (limited to 'googlemock/include')
-rw-r--r-- | googlemock/include/gmock/gmock-matchers.h | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index 99f1774..317d2c9 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -4044,11 +4044,7 @@ template <typename Container> inline PolymorphicMatcher<internal::ContainerEqMatcher< typename std::remove_const<Container>::type>> ContainerEq(const Container& rhs) { - // This following line is for working around a bug in MSVC 8.0, - // which causes Container to be a const type sometimes. - typedef typename std::remove_const<Container>::type RawContainer; - return MakePolymorphicMatcher( - internal::ContainerEqMatcher<RawContainer>(rhs)); + return MakePolymorphicMatcher(internal::ContainerEqMatcher<Container>(rhs)); } // Returns a matcher that matches a container that, when sorted using @@ -4081,12 +4077,8 @@ template <typename TupleMatcher, typename Container> inline internal::PointwiseMatcher<TupleMatcher, typename std::remove_const<Container>::type> Pointwise(const TupleMatcher& tuple_matcher, const Container& rhs) { - // This following line is for working around a bug in MSVC 8.0, - // which causes Container to be a const type sometimes (e.g. when - // rhs is a const int[]).. - typedef typename std::remove_const<Container>::type RawContainer; - return internal::PointwiseMatcher<TupleMatcher, RawContainer>( - tuple_matcher, rhs); + return internal::PointwiseMatcher<TupleMatcher, Container>(tuple_matcher, + rhs); } @@ -4117,14 +4109,9 @@ inline internal::UnorderedElementsAreArrayMatcher< typename std::remove_const<RhsContainer>::type>::type::value_type>> UnorderedPointwise(const Tuple2Matcher& tuple2_matcher, const RhsContainer& rhs_container) { - // This following line is for working around a bug in MSVC 8.0, - // which causes RhsContainer to be a const type sometimes (e.g. when - // rhs_container is a const int[]). - typedef typename std::remove_const<RhsContainer>::type RawRhsContainer; - // RhsView allows the same code to handle RhsContainer being a // STL-style container and it being a native C-style array. - typedef typename internal::StlContainerView<RawRhsContainer> RhsView; + typedef typename internal::StlContainerView<RhsContainer> RhsView; typedef typename RhsView::type RhsStlContainer; typedef typename RhsStlContainer::value_type Second; const RhsStlContainer& rhs_stl_container = |