diff --git a/test/std/containers/associative/multimap/multimap.special/non_member_swap.pass.cpp b/test/std/containers/associative/multimap/multimap.special/non_member_swap.pass.cpp index 1dfb62105..cef658bab 100644 --- a/test/std/containers/associative/multimap/multimap.special/non_member_swap.pass.cpp +++ b/test/std/containers/associative/multimap/multimap.special/non_member_swap.pass.cpp @@ -121,17 +121,17 @@ int main() V(11, 11), V(12, 12) }; - M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0]), C(1), A(1)); - M m2(ar2, ar2+sizeof(ar2)/sizeof(ar2[0]), C(2), A(2)); + M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0]), C(1), A(1, 1)); + M m2(ar2, ar2+sizeof(ar2)/sizeof(ar2[0]), C(2), A(1, 2)); M m1_save = m1; M m2_save = m2; swap(m1, m2); assert(m1 == m2_save); assert(m2 == m1_save); assert(m1.key_comp() == C(2)); - assert(m1.get_allocator() == A(1)); + assert(m1.get_allocator().get_id() == 1); assert(m2.key_comp() == C(1)); - assert(m2.get_allocator() == A(2)); + assert(m2.get_allocator().get_id() == 2); } { typedef other_allocator A; @@ -155,17 +155,17 @@ int main() V(11, 11), V(12, 12) }; - M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0]), C(1), A(1, 1)); - M m2(ar2, ar2+sizeof(ar2)/sizeof(ar2[0]), C(2), A(1, 2)); + M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0]), C(1), A(1)); + M m2(ar2, ar2+sizeof(ar2)/sizeof(ar2[0]), C(2), A(2)); M m1_save = m1; M m2_save = m2; swap(m1, m2); assert(m1 == m2_save); assert(m2 == m1_save); assert(m1.key_comp() == C(2)); - assert(m1.get_allocator().get_id() == 1); // not swapped + assert(m1.get_allocator() == A(2)); assert(m2.key_comp() == C(1)); - assert(m2.get_allocator().get_id() == 2); + assert(m2.get_allocator() == A(1)); } #if TEST_STD_VER >= 11 { diff --git a/test/std/containers/unord/unord.multimap/swap_member.pass.cpp b/test/std/containers/unord/unord.multimap/swap_member.pass.cpp index 9c4e3946b..0f898f1b7 100644 --- a/test/std/containers/unord/unord.multimap/swap_member.pass.cpp +++ b/test/std/containers/unord/unord.multimap/swap_member.pass.cpp @@ -35,8 +35,8 @@ int main() typedef test_allocator > Alloc; typedef std::unordered_multimap C; typedef std::pair P; - C c1(0, Hash(1), Compare(1), Alloc(1)); - C c2(0, Hash(2), Compare(2), Alloc(2)); + C c1(0, Hash(1), Compare(1), Alloc(1, 1)); + C c2(0, Hash(2), Compare(2), Alloc(1, 2)); c2.max_load_factor(2); c1.swap(c2); @@ -75,8 +75,8 @@ int main() P(70, "seventy"), P(80, "eighty"), }; - C c1(0, Hash(1), Compare(1), Alloc(1)); - C c2(std::begin(a2), std::end(a2), 0, Hash(2), Compare(2), Alloc(2)); + C c1(0, Hash(1), Compare(1), Alloc(1, 1)); + C c2(std::begin(a2), std::end(a2), 0, Hash(2), Compare(2), Alloc(1, 2)); c2.max_load_factor(2); c1.swap(c2); @@ -121,8 +121,8 @@ int main() P(1, "four"), P(2, "four"), }; - C c1(std::begin(a1), std::end(a1), 0, Hash(1), Compare(1), Alloc(1)); - C c2(0, Hash(2), Compare(2), Alloc(2)); + C c1(std::begin(a1), std::end(a1), 0, Hash(1), Compare(1), Alloc(1, 1)); + C c2(0, Hash(2), Compare(2), Alloc(1, 2)); c2.max_load_factor(2); c1.swap(c2); @@ -176,8 +176,8 @@ int main() P(70, "seventy"), P(80, "eighty"), }; - C c1(std::begin(a1), std::end(a1), 0, Hash(1), Compare(1), Alloc(1)); - C c2(std::begin(a2), std::end(a2), 0, Hash(2), Compare(2), Alloc(2)); + C c1(std::begin(a1), std::end(a1), 0, Hash(1), Compare(1), Alloc(1, 1)); + C c2(std::begin(a2), std::end(a2), 0, Hash(2), Compare(2), Alloc(1, 2)); c2.max_load_factor(2); c1.swap(c2);