STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits.
Slightly rearrange scopes in order to avoid shadowing M typedefs. Fixes MSVC warning C4456 "declaration of 'M' hides previous local declaration". http://reviews.llvm.org/D20921 Files: test/std/containers/associative/map/map.special/non_member_swap.pass.cpp test/std/containers/associative/multimap/multimap.special/non_member_swap.pass.cpp test/std/containers/associative/multiset/multiset.special/non_member_swap.pass.cpp test/std/containers/associative/set/set.special/non_member_swap.pass.cpp
Index: test/std/containers/associative/set/set.special/non_member_swap.pass.cpp =================================================================== --- test/std/containers/associative/set/set.special/non_member_swap.pass.cpp +++ test/std/containers/associative/set/set.special/non_member_swap.pass.cpp @@ -21,6 +21,7 @@ int main() { typedef int V; + { typedef std::set<int> M; { M m1; @@ -94,6 +95,7 @@ assert(m1 == m2_save); assert(m2 == m1_save); } + } { typedef test_allocator<V> A; typedef test_compare<std::less<int> > C; Index: test/std/containers/associative/multiset/multiset.special/non_member_swap.pass.cpp =================================================================== --- test/std/containers/associative/multiset/multiset.special/non_member_swap.pass.cpp +++ test/std/containers/associative/multiset/multiset.special/non_member_swap.pass.cpp @@ -21,6 +21,7 @@ int main() { typedef int V; + { typedef std::multiset<int> M; { M m1; @@ -94,6 +95,7 @@ assert(m1 == m2_save); assert(m2 == m1_save); } + } { typedef test_allocator<V> A; typedef test_compare<std::less<int> > C; Index: test/std/containers/associative/multimap/multimap.special/non_member_swap.pass.cpp =================================================================== --- test/std/containers/associative/multimap/multimap.special/non_member_swap.pass.cpp +++ test/std/containers/associative/multimap/multimap.special/non_member_swap.pass.cpp @@ -98,6 +98,7 @@ assert(m1 == m2_save); assert(m2 == m1_save); } + } { typedef test_allocator<V> A; typedef test_compare<std::less<int> > C; @@ -166,7 +167,6 @@ assert(m2.key_comp() == C(1)); assert(m2.get_allocator() == A(1)); } - } #if __cplusplus >= 201103L { typedef std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M; @@ -242,6 +242,7 @@ assert(m1 == m2_save); assert(m2 == m1_save); } + } { typedef min_allocator<V> A; typedef test_compare<std::less<int> > C; @@ -276,6 +277,5 @@ assert(m2.key_comp() == C(1)); assert(m2.get_allocator() == A()); } - } #endif } Index: test/std/containers/associative/map/map.special/non_member_swap.pass.cpp =================================================================== --- test/std/containers/associative/map/map.special/non_member_swap.pass.cpp +++ test/std/containers/associative/map/map.special/non_member_swap.pass.cpp @@ -98,6 +98,7 @@ assert(m1 == m2_save); assert(m2 == m1_save); } + } { typedef test_allocator<V> A; typedef test_compare<std::less<int> > C; @@ -166,7 +167,6 @@ assert(m2.key_comp() == C(1)); assert(m2.get_allocator() == A(1)); } - } #if __cplusplus >= 201103L { typedef std::map<int, double, std::less<int>, min_allocator<V>> M; @@ -242,6 +242,7 @@ assert(m1 == m2_save); assert(m2 == m1_save); } + } { typedef min_allocator<V> A; typedef test_compare<std::less<int> > C; @@ -276,6 +277,5 @@ assert(m2.key_comp() == C(1)); assert(m2.get_allocator() == A()); } - } #endif }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits