Avoid Shadowing warnings in the associative containers tests. Thanks to STL for the patch.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@272018 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2016-06-07 15:49:39 +00:00
parent fb59f5ce4d
commit 467eaf8269
4 changed files with 8 additions and 4 deletions

View File

@@ -98,6 +98,7 @@ int main()
assert(m1 == m2_save); assert(m1 == m2_save);
assert(m2 == m1_save); assert(m2 == m1_save);
} }
}
{ {
typedef test_allocator<V> A; typedef test_allocator<V> A;
typedef test_compare<std::less<int> > C; typedef test_compare<std::less<int> > C;
@@ -166,7 +167,6 @@ int main()
assert(m2.key_comp() == C(1)); assert(m2.key_comp() == C(1));
assert(m2.get_allocator() == A(1)); assert(m2.get_allocator() == A(1));
} }
}
#if __cplusplus >= 201103L #if __cplusplus >= 201103L
{ {
typedef std::map<int, double, std::less<int>, min_allocator<V>> M; typedef std::map<int, double, std::less<int>, min_allocator<V>> M;
@@ -242,6 +242,7 @@ int main()
assert(m1 == m2_save); assert(m1 == m2_save);
assert(m2 == m1_save); assert(m2 == m1_save);
} }
}
{ {
typedef min_allocator<V> A; typedef min_allocator<V> A;
typedef test_compare<std::less<int> > C; typedef test_compare<std::less<int> > C;
@@ -276,6 +277,5 @@ int main()
assert(m2.key_comp() == C(1)); assert(m2.key_comp() == C(1));
assert(m2.get_allocator() == A()); assert(m2.get_allocator() == A());
} }
}
#endif #endif
} }

View File

@@ -98,6 +98,7 @@ int main()
assert(m1 == m2_save); assert(m1 == m2_save);
assert(m2 == m1_save); assert(m2 == m1_save);
} }
}
{ {
typedef test_allocator<V> A; typedef test_allocator<V> A;
typedef test_compare<std::less<int> > C; typedef test_compare<std::less<int> > C;
@@ -166,7 +167,6 @@ int main()
assert(m2.key_comp() == C(1)); assert(m2.key_comp() == C(1));
assert(m2.get_allocator() == A(1)); assert(m2.get_allocator() == A(1));
} }
}
#if __cplusplus >= 201103L #if __cplusplus >= 201103L
{ {
typedef std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M; typedef std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
@@ -242,6 +242,7 @@ int main()
assert(m1 == m2_save); assert(m1 == m2_save);
assert(m2 == m1_save); assert(m2 == m1_save);
} }
}
{ {
typedef min_allocator<V> A; typedef min_allocator<V> A;
typedef test_compare<std::less<int> > C; typedef test_compare<std::less<int> > C;
@@ -276,6 +277,5 @@ int main()
assert(m2.key_comp() == C(1)); assert(m2.key_comp() == C(1));
assert(m2.get_allocator() == A()); assert(m2.get_allocator() == A());
} }
}
#endif #endif
} }

View File

@@ -21,6 +21,7 @@
int main() int main()
{ {
typedef int V; typedef int V;
{
typedef std::multiset<int> M; typedef std::multiset<int> M;
{ {
M m1; M m1;
@@ -94,6 +95,7 @@ int main()
assert(m1 == m2_save); assert(m1 == m2_save);
assert(m2 == m1_save); assert(m2 == m1_save);
} }
}
{ {
typedef test_allocator<V> A; typedef test_allocator<V> A;
typedef test_compare<std::less<int> > C; typedef test_compare<std::less<int> > C;

View File

@@ -21,6 +21,7 @@
int main() int main()
{ {
typedef int V; typedef int V;
{
typedef std::set<int> M; typedef std::set<int> M;
{ {
M m1; M m1;
@@ -94,6 +95,7 @@ int main()
assert(m1 == m2_save); assert(m1 == m2_save);
assert(m2 == m1_save); assert(m2 == m1_save);
} }
}
{ {
typedef test_allocator<V> A; typedef test_allocator<V> A;
typedef test_compare<std::less<int> > C; typedef test_compare<std::less<int> > C;