@@ -2425,7 +2425,6 @@ class ContainerEqMatcher {
2425
2425
typedef internal::StlContainerView<
2426
2426
typename std::remove_const<LhsContainer>::type>
2427
2427
LhsView;
2428
- typedef typename LhsView::type LhsStlContainer;
2429
2428
StlContainerReference lhs_stl_container = LhsView::ConstReference (lhs);
2430
2429
if (lhs_stl_container == expected_)
2431
2430
return true ;
@@ -2434,8 +2433,7 @@ class ContainerEqMatcher {
2434
2433
if (os != nullptr ) {
2435
2434
// Something is different. Check for extra values first.
2436
2435
bool printed_header = false ;
2437
- for (typename LhsStlContainer::const_iterator it =
2438
- lhs_stl_container.begin ();
2436
+ for (auto it = lhs_stl_container.begin ();
2439
2437
it != lhs_stl_container.end (); ++it) {
2440
2438
if (internal::ArrayAwareFind (expected_.begin (), expected_.end (), *it) ==
2441
2439
expected_.end ()) {
@@ -2451,7 +2449,7 @@ class ContainerEqMatcher {
2451
2449
2452
2450
// Now check for missing values.
2453
2451
bool printed_header2 = false ;
2454
- for (typename StlContainer::const_iterator it = expected_.begin ();
2452
+ for (auto it = expected_.begin ();
2455
2453
it != expected_.end (); ++it) {
2456
2454
if (internal::ArrayAwareFind (
2457
2455
lhs_stl_container.begin (), lhs_stl_container.end (), *it) ==
@@ -2635,8 +2633,8 @@ class PointwiseMatcher {
2635
2633
return false ;
2636
2634
}
2637
2635
2638
- typename LhsStlContainer::const_iterator left = lhs_stl_container.begin ();
2639
- typename RhsStlContainer::const_iterator right = rhs_.begin ();
2636
+ auto left = lhs_stl_container.begin ();
2637
+ auto right = rhs_.begin ();
2640
2638
for (size_t i = 0 ; i != actual_size; ++i, ++left, ++right) {
2641
2639
if (listener->IsInterested ()) {
2642
2640
StringMatchResultListener inner_listener;
@@ -2699,7 +2697,7 @@ class QuantifierMatcherImpl : public MatcherInterface<Container> {
2699
2697
MatchResultListener* listener) const {
2700
2698
StlContainerReference stl_container = View::ConstReference (container);
2701
2699
size_t i = 0 ;
2702
- for (typename StlContainer::const_iterator it = stl_container.begin ();
2700
+ for (auto it = stl_container.begin ();
2703
2701
it != stl_container.end (); ++it, ++i) {
2704
2702
StringMatchResultListener inner_listener;
2705
2703
const bool matches = inner_matcher_.MatchAndExplain (*it, &inner_listener);
@@ -3400,7 +3398,7 @@ class ElementsAreMatcherImpl : public MatcherInterface<Container> {
3400
3398
// explanations[i] is the explanation of the element at index i.
3401
3399
::std::vector<std::string> explanations (count ());
3402
3400
StlContainerReference stl_container = View::ConstReference (container);
3403
- typename StlContainer::const_iterator it = stl_container.begin ();
3401
+ auto it = stl_container.begin ();
3404
3402
size_t exam_pos = 0 ;
3405
3403
bool mismatch_found = false ; // Have we found a mismatched element yet?
3406
3404
@@ -3593,7 +3591,6 @@ class UnorderedElementsAreMatcherImpl
3593
3591
typedef internal::StlContainerView<RawContainer> View;
3594
3592
typedef typename View::type StlContainer;
3595
3593
typedef typename View::const_reference StlContainerReference;
3596
- typedef typename StlContainer::const_iterator StlContainerConstIterator;
3597
3594
typedef typename StlContainer::value_type Element;
3598
3595
3599
3596
template <typename InputIter>
@@ -4760,7 +4757,7 @@ UnorderedPointwise(const Tuple2Matcher& tuple2_matcher,
4760
4757
4761
4758
// Create a matcher for each element in rhs_container.
4762
4759
::std::vector<internal::BoundSecondMatcher<Tuple2Matcher, Second> > matchers;
4763
- for (typename RhsStlContainer::const_iterator it = rhs_stl_container.begin ();
4760
+ for (auto it = rhs_stl_container.begin ();
4764
4761
it != rhs_stl_container.end (); ++it) {
4765
4762
matchers.push_back (
4766
4763
internal::MatcherBindSecond (tuple2_matcher, *it));
0 commit comments