From 6748df1eab1dd741a6deffcdd5012d521c1d3a46 Mon Sep 17 00:00:00 2001 From: Krystian Kuzniarek Date: Sun, 17 Nov 2019 18:50:37 +0100 Subject: remove MSVC workaround: cease const dropping --- googlemock/include/gmock/gmock-matchers.h | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'googlemock/include/gmock/gmock-matchers.h') diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index b8ec24dd..133033bc 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -4057,11 +4057,8 @@ template inline PolymorphicMatcher::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::type RawContainer; return MakePolymorphicMatcher( - internal::ContainerEqMatcher(rhs)); + internal::ContainerEqMatcher(rhs)); } // Returns a matcher that matches a container that, when sorted using @@ -4094,11 +4091,7 @@ template inline internal::PointwiseMatcher::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::type RawContainer; - return internal::PointwiseMatcher( + return internal::PointwiseMatcher( tuple_matcher, rhs); } @@ -4130,14 +4123,10 @@ inline internal::UnorderedElementsAreArrayMatcher< typename std::remove_const::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::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 RhsView; + typedef typename internal::StlContainerView RhsView; typedef typename RhsView::type RhsStlContainer; typedef typename RhsStlContainer::value_type Second; const RhsStlContainer& rhs_stl_container = -- cgit v1.2.3