aboutsummaryrefslogtreecommitdiff
path: root/test/std/containers
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-09-06 18:46:46 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-09-06 18:46:46 +0000
commit61b9a7258a7693d7f3674a5a1daf7b036ff1d382 (patch)
treeec41ed70ffca97240e76f9a78bb2dedba28f310c /test/std/containers
parentf857581820d15e410e9945d2fcd5f7163be25a96 (diff)
downloadsrc-61b9a7258a7693d7f3674a5a1daf7b036ff1d382.tar.gz
src-61b9a7258a7693d7f3674a5a1daf7b036ff1d382.zip
Import libc++ 3.7.0 release (r246257).vendor/libc++/libc++-release_370-r246257
Notes
Notes: svn path=/vendor/libc++/dist/; revision=287518 svn path=/vendor/libc++/libc++-release_370-r246257/; revision=287519; tag=vendor/libc++/libc++-release_370-r246257
Diffstat (limited to 'test/std/containers')
-rw-r--r--test/std/containers/Copyable.h18
-rw-r--r--test/std/containers/Emplaceable.h54
-rw-r--r--test/std/containers/NotConstructible.h39
-rw-r--r--test/std/containers/associative/map/compare.pass.cpp32
-rw-r--r--test/std/containers/associative/map/map.access/at.pass.cpp154
-rw-r--r--test/std/containers/associative/map/map.access/empty.pass.cpp43
-rw-r--r--test/std/containers/associative/map/map.access/index_key.pass.cpp105
-rw-r--r--test/std/containers/associative/map/map.access/index_rv_key.pass.cpp58
-rw-r--r--test/std/containers/associative/map/map.access/index_tuple.pass.cpp33
-rw-r--r--test/std/containers/associative/map/map.access/iterator.pass.cpp227
-rw-r--r--test/std/containers/associative/map/map.access/max_size.pass.cpp35
-rw-r--r--test/std/containers/associative/map/map.access/size.pass.cpp59
-rw-r--r--test/std/containers/associative/map/map.cons/alloc.pass.cpp42
-rw-r--r--test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp75
-rw-r--r--test/std/containers/associative/map/map.cons/compare.pass.cpp40
-rw-r--r--test/std/containers/associative/map/map.cons/compare_alloc.pass.cpp45
-rw-r--r--test/std/containers/associative/map/map.cons/copy.pass.cpp131
-rw-r--r--test/std/containers/associative/map/map.cons/copy_alloc.pass.cpp95
-rw-r--r--test/std/containers/associative/map/map.cons/copy_assign.pass.cpp182
-rw-r--r--test/std/containers/associative/map/map.cons/default.pass.cpp40
-rw-r--r--test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp53
-rw-r--r--test/std/containers/associative/map/map.cons/default_recursive.pass.cpp29
-rw-r--r--test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp51
-rw-r--r--test/std/containers/associative/map/map.cons/initializer_list.pass.cpp67
-rw-r--r--test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp69
-rw-r--r--test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp100
-rw-r--r--test/std/containers/associative/map/map.cons/iter_iter.pass.cpp68
-rw-r--r--test/std/containers/associative/map/map.cons/iter_iter_comp.pass.cpp73
-rw-r--r--test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp108
-rw-r--r--test/std/containers/associative/map/map.cons/move.pass.cpp120
-rw-r--r--test/std/containers/associative/map/map.cons/move_alloc.pass.cpp234
-rw-r--r--test/std/containers/associative/map/map.cons/move_assign.pass.cpp190
-rw-r--r--test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp53
-rw-r--r--test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp51
-rw-r--r--test/std/containers/associative/map/map.modifiers/clear.pass.cpp63
-rw-r--r--test/std/containers/associative/map/map.modifiers/emplace.pass.cpp165
-rw-r--r--test/std/containers/associative/map/map.modifiers/emplace_hint.pass.cpp160
-rw-r--r--test/std/containers/associative/map/map.modifiers/erase_iter.pass.cpp259
-rw-r--r--test/std/containers/associative/map/map.modifiers/erase_iter_iter.pass.cpp157
-rw-r--r--test/std/containers/associative/map/map.modifiers/erase_key.pass.cpp275
-rw-r--r--test/std/containers/associative/map/map.modifiers/insert_cv.pass.cpp89
-rw-r--r--test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp71
-rw-r--r--test/std/containers/associative/map/map.modifiers/insert_iter_cv.pass.cpp81
-rw-r--r--test/std/containers/associative/map/map.modifiers/insert_iter_iter.pass.cpp77
-rw-r--r--test/std/containers/associative/map/map.modifiers/insert_iter_rv.pass.cpp87
-rw-r--r--test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp192
-rw-r--r--test/std/containers/associative/map/map.modifiers/insert_rv.pass.cpp93
-rw-r--r--test/std/containers/associative/map/map.modifiers/try.emplace.pass.cpp189
-rw-r--r--test/std/containers/associative/map/map.ops/count.pass.cpp193
-rw-r--r--test/std/containers/associative/map/map.ops/count0.pass.cpp34
-rw-r--r--test/std/containers/associative/map/map.ops/count1.fail.cpp39
-rw-r--r--test/std/containers/associative/map/map.ops/count2.fail.cpp39
-rw-r--r--test/std/containers/associative/map/map.ops/count3.fail.cpp39
-rw-r--r--test/std/containers/associative/map/map.ops/equal_range.pass.cpp490
-rw-r--r--test/std/containers/associative/map/map.ops/equal_range0.pass.cpp34
-rw-r--r--test/std/containers/associative/map/map.ops/equal_range1.fail.cpp39
-rw-r--r--test/std/containers/associative/map/map.ops/equal_range2.fail.cpp39
-rw-r--r--test/std/containers/associative/map/map.ops/equal_range3.fail.cpp39
-rw-r--r--test/std/containers/associative/map/map.ops/find.pass.cpp260
-rw-r--r--test/std/containers/associative/map/map.ops/find0.pass.cpp34
-rw-r--r--test/std/containers/associative/map/map.ops/find1.fail.cpp39
-rw-r--r--test/std/containers/associative/map/map.ops/find2.fail.cpp39
-rw-r--r--test/std/containers/associative/map/map.ops/find3.fail.cpp39
-rw-r--r--test/std/containers/associative/map/map.ops/lower_bound.pass.cpp372
-rw-r--r--test/std/containers/associative/map/map.ops/lower_bound0.pass.cpp34
-rw-r--r--test/std/containers/associative/map/map.ops/lower_bound1.fail.cpp39
-rw-r--r--test/std/containers/associative/map/map.ops/lower_bound2.fail.cpp39
-rw-r--r--test/std/containers/associative/map/map.ops/lower_bound3.fail.cpp39
-rw-r--r--test/std/containers/associative/map/map.ops/upper_bound.pass.cpp335
-rw-r--r--test/std/containers/associative/map/map.ops/upper_bound0.pass.cpp34
-rw-r--r--test/std/containers/associative/map/map.ops/upper_bound1.fail.cpp39
-rw-r--r--test/std/containers/associative/map/map.ops/upper_bound2.fail.cpp39
-rw-r--r--test/std/containers/associative/map/map.ops/upper_bound3.fail.cpp39
-rw-r--r--test/std/containers/associative/map/map.special/member_swap.pass.cpp176
-rw-r--r--test/std/containers/associative/map/map.special/non_member_swap.pass.cpp281
-rw-r--r--test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp148
-rw-r--r--test/std/containers/associative/map/types.pass.cpp70
-rw-r--r--test/std/containers/associative/map/version.pass.cpp20
-rw-r--r--test/std/containers/associative/multimap/empty.pass.cpp43
-rw-r--r--test/std/containers/associative/multimap/iterator.pass.cpp231
-rw-r--r--test/std/containers/associative/multimap/max_size.pass.cpp35
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/alloc.pass.cpp42
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp85
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/compare.pass.cpp40
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/compare_alloc.pass.cpp45
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/copy.pass.cpp104
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/copy_alloc.pass.cpp77
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/copy_assign.pass.cpp125
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/default.pass.cpp40
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp53
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/default_recursive.pass.cpp29
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp51
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp83
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp91
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp129
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/iter_iter.pass.cpp112
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/iter_iter_comp.pass.cpp86
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/iter_iter_comp_alloc.pass.cpp91
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/move.pass.cpp132
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp234
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp190
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp53
-rw-r--r--test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp51
-rw-r--r--test/std/containers/associative/multimap/multimap.modifiers/clear.pass.cpp63
-rw-r--r--test/std/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp150
-rw-r--r--test/std/containers/associative/multimap/multimap.modifiers/emplace_hint.pass.cpp160
-rw-r--r--test/std/containers/associative/multimap/multimap.modifiers/erase_iter.pass.cpp301
-rw-r--r--test/std/containers/associative/multimap/multimap.modifiers/erase_iter_iter.pass.cpp157
-rw-r--r--test/std/containers/associative/multimap/multimap.modifiers/erase_key.pass.cpp153
-rw-r--r--test/std/containers/associative/multimap/multimap.modifiers/insert_cv.pass.cpp81
-rw-r--r--test/std/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp91
-rw-r--r--test/std/containers/associative/multimap/multimap.modifiers/insert_iter_cv.pass.cpp81
-rw-r--r--test/std/containers/associative/multimap/multimap.modifiers/insert_iter_iter.pass.cpp101
-rw-r--r--test/std/containers/associative/multimap/multimap.modifiers/insert_iter_rv.pass.cpp87
-rw-r--r--test/std/containers/associative/multimap/multimap.modifiers/insert_rv.pass.cpp85
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/count.pass.cpp175
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp34
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp37
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp37
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp37
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/equal_range.pass.cpp287
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp34
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp37
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp39
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp39
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/find.pass.cpp223
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp34
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp39
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp39
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp39
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/lower_bound.pass.cpp237
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp34
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp39
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp39
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp39
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/upper_bound.pass.cpp236
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp34
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp39
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp39
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp39
-rw-r--r--test/std/containers/associative/multimap/multimap.special/member_swap.pass.cpp176
-rw-r--r--test/std/containers/associative/multimap/multimap.special/non_member_swap.pass.cpp281
-rw-r--r--test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp148
-rw-r--r--test/std/containers/associative/multimap/scary.pass.cpp24
-rw-r--r--test/std/containers/associative/multimap/size.pass.cpp59
-rw-r--r--test/std/containers/associative/multimap/types.pass.cpp70
-rw-r--r--test/std/containers/associative/multiset/clear.pass.cpp63
-rw-r--r--test/std/containers/associative/multiset/count.pass.cpp160
-rw-r--r--test/std/containers/associative/multiset/emplace.pass.cpp83
-rw-r--r--test/std/containers/associative/multiset/emplace_hint.pass.cpp83
-rw-r--r--test/std/containers/associative/multiset/empty.pass.cpp43
-rw-r--r--test/std/containers/associative/multiset/equal_range.pass.cpp263
-rw-r--r--test/std/containers/associative/multiset/erase_iter.pass.cpp203
-rw-r--r--test/std/containers/associative/multiset/erase_iter_iter.pass.cpp141
-rw-r--r--test/std/containers/associative/multiset/erase_key.pass.cpp129
-rw-r--r--test/std/containers/associative/multiset/find.pass.cpp240
-rw-r--r--test/std/containers/associative/multiset/insert_cv.pass.cpp73
-rw-r--r--test/std/containers/associative/multiset/insert_initializer_list.pass.cpp61
-rw-r--r--test/std/containers/associative/multiset/insert_iter_cv.pass.cpp73
-rw-r--r--test/std/containers/associative/multiset/insert_iter_iter.pass.cpp85
-rw-r--r--test/std/containers/associative/multiset/insert_iter_rv.pass.cpp76
-rw-r--r--test/std/containers/associative/multiset/insert_rv.pass.cpp76
-rw-r--r--test/std/containers/associative/multiset/iterator.pass.cpp215
-rw-r--r--test/std/containers/associative/multiset/lower_bound.pass.cpp223
-rw-r--r--test/std/containers/associative/multiset/max_size.pass.cpp35
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/alloc.pass.cpp29
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp57
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/compare.pass.cpp28
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/compare_alloc.pass.cpp31
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/copy.pass.cpp118
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/copy_alloc.pass.cpp68
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp138
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/default.pass.cpp40
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp53
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp51
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp73
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp38
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp41
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/iter_iter.pass.cpp83
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/iter_iter_alloc.pass.cpp92
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/iter_iter_comp.pass.cpp53
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/move.pass.cpp119
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp187
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp186
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp53
-rw-r--r--test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp51
-rw-r--r--test/std/containers/associative/multiset/multiset.special/member_swap.pass.cpp177
-rw-r--r--test/std/containers/associative/multiset/multiset.special/non_member_swap.pass.cpp165
-rw-r--r--test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp148
-rw-r--r--test/std/containers/associative/multiset/scary.pass.cpp24
-rw-r--r--test/std/containers/associative/multiset/size.pass.cpp59
-rw-r--r--test/std/containers/associative/multiset/types.pass.cpp70
-rw-r--r--test/std/containers/associative/multiset/upper_bound.pass.cpp222
-rw-r--r--test/std/containers/associative/set/clear.pass.cpp63
-rw-r--r--test/std/containers/associative/set/count.pass.cpp168
-rw-r--r--test/std/containers/associative/set/emplace.pass.cpp90
-rw-r--r--test/std/containers/associative/set/emplace_hint.pass.cpp83
-rw-r--r--test/std/containers/associative/set/empty.pass.cpp43
-rw-r--r--test/std/containers/associative/set/equal_range.pass.cpp370
-rw-r--r--test/std/containers/associative/set/erase_iter.pass.cpp203
-rw-r--r--test/std/containers/associative/set/erase_iter_iter.pass.cpp141
-rw-r--r--test/std/containers/associative/set/erase_key.pass.cpp203
-rw-r--r--test/std/containers/associative/set/find.pass.cpp240
-rw-r--r--test/std/containers/associative/set/insert_cv.pass.cpp81
-rw-r--r--test/std/containers/associative/set/insert_initializer_list.pass.cpp61
-rw-r--r--test/std/containers/associative/set/insert_iter_cv.pass.cpp73
-rw-r--r--test/std/containers/associative/set/insert_iter_iter.pass.cpp73
-rw-r--r--test/std/containers/associative/set/insert_iter_rv.pass.cpp76
-rw-r--r--test/std/containers/associative/set/insert_rv.pass.cpp84
-rw-r--r--test/std/containers/associative/set/iterator.pass.cpp211
-rw-r--r--test/std/containers/associative/set/lower_bound.pass.cpp337
-rw-r--r--test/std/containers/associative/set/max_size.pass.cpp35
-rw-r--r--test/std/containers/associative/set/set.cons/alloc.pass.cpp29
-rw-r--r--test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp57
-rw-r--r--test/std/containers/associative/set/set.cons/compare.pass.cpp28
-rw-r--r--test/std/containers/associative/set/set.cons/compare_alloc.pass.cpp31
-rw-r--r--test/std/containers/associative/set/set.cons/copy.pass.cpp94
-rw-r--r--test/std/containers/associative/set/set.cons/copy_alloc.pass.cpp56
-rw-r--r--test/std/containers/associative/set/set.cons/copy_assign.pass.cpp109
-rw-r--r--test/std/containers/associative/set/set.cons/default.pass.cpp40
-rw-r--r--test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp53
-rw-r--r--test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp51
-rw-r--r--test/std/containers/associative/set/set.cons/initializer_list.pass.cpp55
-rw-r--r--test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp38
-rw-r--r--test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp63
-rw-r--r--test/std/containers/associative/set/set.cons/iter_iter.pass.cpp71
-rw-r--r--test/std/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp84
-rw-r--r--test/std/containers/associative/set/set.cons/iter_iter_comp.pass.cpp47
-rw-r--r--test/std/containers/associative/set/set.cons/move.pass.cpp107
-rw-r--r--test/std/containers/associative/set/set.cons/move_alloc.pass.cpp188
-rw-r--r--test/std/containers/associative/set/set.cons/move_assign.pass.cpp186
-rw-r--r--test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp53
-rw-r--r--test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp51
-rw-r--r--test/std/containers/associative/set/set.special/member_swap.pass.cpp177
-rw-r--r--test/std/containers/associative/set/set.special/non_member_swap.pass.cpp165
-rw-r--r--test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp148
-rw-r--r--test/std/containers/associative/set/size.pass.cpp59
-rw-r--r--test/std/containers/associative/set/types.pass.cpp70
-rw-r--r--test/std/containers/associative/set/upper_bound.pass.cpp336
-rw-r--r--test/std/containers/associative/set/version.pass.cpp20
-rw-r--r--test/std/containers/associative/tree_balance_after_insert.pass.cpp1616
-rw-r--r--test/std/containers/associative/tree_left_rotate.pass.cpp98
-rw-r--r--test/std/containers/associative/tree_remove.pass.cpp1648
-rw-r--r--test/std/containers/associative/tree_right_rotate.pass.cpp98
-rw-r--r--test/std/containers/container.adaptors/nothing_to_do.pass.cpp12
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp48
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp48
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_cont_alloc.pass.cpp62
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_rcont_alloc.pass.cpp61
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_copy_alloc.pass.cpp58
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp68
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/assign_copy.pass.cpp36
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/assign_move.pass.cpp42
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp.pass.cpp27
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_container.pass.cpp34
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_rcontainer.pass.cpp40
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_copy.pass.cpp35
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_default.pass.cpp27
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter.pass.cpp25
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp.pass.cpp27
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_cont.pass.cpp27
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_rcont.pass.cpp32
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp41
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp31
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/dtor_noexcept.pass.cpp27
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/move_assign_noexcept.pass.cpp31
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.cons/move_noexcept.pass.cpp31
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.members/emplace.pass.cpp32
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.members/empty.pass.cpp27
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.members/pop.pass.cpp34
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.members/push.pass.cpp28
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.members/push_rvalue.pass.cpp32
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.members/size.pass.cpp27
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.members/swap.pass.cpp30
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.members/top.pass.cpp28
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.special/swap.pass.cpp32
-rw-r--r--test/std/containers/container.adaptors/priority.queue/priqueue.special/swap_noexcept.pass.cpp32
-rw-r--r--test/std/containers/container.adaptors/priority.queue/types.pass.cpp60
-rw-r--r--test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp38
-rw-r--r--test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp57
-rw-r--r--test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_queue_alloc.pass.cpp52
-rw-r--r--test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp59
-rw-r--r--test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp60
-rw-r--r--test/std/containers/container.adaptors/queue/queue.cons/ctor_container.pass.cpp37
-rw-r--r--test/std/containers/container.adaptors/queue/queue.cons/ctor_copy.pass.cpp32
-rw-r--r--test/std/containers/container.adaptors/queue/queue.cons/ctor_default.pass.cpp28
-rw-r--r--test/std/containers/container.adaptors/queue/queue.cons/ctor_move.pass.cpp41
-rw-r--r--test/std/containers/container.adaptors/queue/queue.cons/ctor_rcontainer.pass.cpp39
-rw-r--r--test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp30
-rw-r--r--test/std/containers/container.adaptors/queue/queue.cons/dtor_noexcept.pass.cpp27
-rw-r--r--test/std/containers/container.adaptors/queue/queue.cons/move_assign_noexcept.pass.cpp30
-rw-r--r--test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp30
-rw-r--r--test/std/containers/container.adaptors/queue/queue.defn/assign_copy.pass.cpp33
-rw-r--r--test/std/containers/container.adaptors/queue/queue.defn/assign_move.pass.cpp42
-rw-r--r--test/std/containers/container.adaptors/queue/queue.defn/back.pass.cpp26
-rw-r--r--test/std/containers/container.adaptors/queue/queue.defn/back_const.pass.cpp27
-rw-r--r--test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp30
-rw-r--r--test/std/containers/container.adaptors/queue/queue.defn/empty.pass.cpp25
-rw-r--r--test/std/containers/container.adaptors/queue/queue.defn/front.pass.cpp26
-rw-r--r--test/std/containers/container.adaptors/queue/queue.defn/front_const.pass.cpp27
-rw-r--r--test/std/containers/container.adaptors/queue/queue.defn/pop.pass.cpp37
-rw-r--r--test/std/containers/container.adaptors/queue/queue.defn/push.pass.cpp32
-rw-r--r--test/std/containers/container.adaptors/queue/queue.defn/push_rv.pass.cpp36
-rw-r--r--test/std/containers/container.adaptors/queue/queue.defn/size.pass.cpp23
-rw-r--r--test/std/containers/container.adaptors/queue/queue.defn/swap.pass.cpp36
-rw-r--r--test/std/containers/container.adaptors/queue/queue.defn/types.pass.cpp58
-rw-r--r--test/std/containers/container.adaptors/queue/queue.ops/eq.pass.cpp40
-rw-r--r--test/std/containers/container.adaptors/queue/queue.ops/lt.pass.cpp45
-rw-r--r--test/std/containers/container.adaptors/queue/queue.special/swap.pass.cpp37
-rw-r--r--test/std/containers/container.adaptors/queue/queue.special/swap_noexcept.pass.cpp31
-rw-r--r--test/std/containers/container.adaptors/queue/version.pass.cpp20
-rw-r--r--test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp38
-rw-r--r--test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp57
-rw-r--r--test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_copy_alloc.pass.cpp52
-rw-r--r--test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp59
-rw-r--r--test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp60
-rw-r--r--test/std/containers/container.adaptors/stack/stack.cons/ctor_container.pass.cpp37
-rw-r--r--test/std/containers/container.adaptors/stack/stack.cons/ctor_copy.pass.cpp32
-rw-r--r--test/std/containers/container.adaptors/stack/stack.cons/ctor_default.pass.cpp28
-rw-r--r--test/std/containers/container.adaptors/stack/stack.cons/ctor_move.pass.cpp41
-rw-r--r--test/std/containers/container.adaptors/stack/stack.cons/ctor_rcontainer.pass.cpp39
-rw-r--r--test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp30
-rw-r--r--test/std/containers/container.adaptors/stack/stack.cons/dtor_noexcept.pass.cpp27
-rw-r--r--test/std/containers/container.adaptors/stack/stack.cons/move_assign_noexcept.pass.cpp30
-rw-r--r--test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp30
-rw-r--r--test/std/containers/container.adaptors/stack/stack.defn/assign_copy.pass.cpp33
-rw-r--r--test/std/containers/container.adaptors/stack/stack.defn/assign_move.pass.cpp42
-rw-r--r--test/std/containers/container.adaptors/stack/stack.defn/emplace.pass.cpp29
-rw-r--r--test/std/containers/container.adaptors/stack/stack.defn/empty.pass.cpp25
-rw-r--r--test/std/containers/container.adaptors/stack/stack.defn/pop.pass.cpp34
-rw-r--r--test/std/containers/container.adaptors/stack/stack.defn/push.pass.cpp29
-rw-r--r--test/std/containers/container.adaptors/stack/stack.defn/push_rv.pass.cpp33
-rw-r--r--test/std/containers/container.adaptors/stack/stack.defn/size.pass.cpp23
-rw-r--r--test/std/containers/container.adaptors/stack/stack.defn/swap.pass.cpp36
-rw-r--r--test/std/containers/container.adaptors/stack/stack.defn/top.pass.cpp26
-rw-r--r--test/std/containers/container.adaptors/stack/stack.defn/top_const.pass.cpp27
-rw-r--r--test/std/containers/container.adaptors/stack/stack.defn/types.pass.cpp59
-rw-r--r--test/std/containers/container.adaptors/stack/stack.ops/eq.pass.cpp40
-rw-r--r--test/std/containers/container.adaptors/stack/stack.ops/lt.pass.cpp45
-rw-r--r--test/std/containers/container.adaptors/stack/stack.special/swap.pass.cpp37
-rw-r--r--test/std/containers/container.adaptors/stack/stack.special/swap_noexcept.pass.cpp31
-rw-r--r--test/std/containers/container.adaptors/stack/version.pass.cpp20
-rw-r--r--test/std/containers/container.requirements/associative.reqmts/associative.reqmts.except/nothing_to_do.pass.cpp12
-rw-r--r--test/std/containers/container.requirements/associative.reqmts/nothing_to_do.pass.cpp12
-rw-r--r--test/std/containers/container.requirements/container.requirements.dataraces/nothing_to_do.pass.cpp12
-rw-r--r--test/std/containers/container.requirements/container.requirements.general/nothing_to_do.pass.cpp12
-rw-r--r--test/std/containers/container.requirements/nothing_to_do.pass.cpp12
-rw-r--r--test/std/containers/container.requirements/sequence.reqmts/nothing_to_do.pass.cpp12
-rw-r--r--test/std/containers/container.requirements/unord.req/nothing_to_do.pass.cpp12
-rw-r--r--test/std/containers/container.requirements/unord.req/unord.req.except/nothing_to_do.pass.cpp12
-rw-r--r--test/std/containers/containers.general/nothing_to_do.pass.cpp12
-rw-r--r--test/std/containers/nothing_to_do.pass.cpp12
-rw-r--r--test/std/containers/sequences/array/array.cons/default.pass.cpp31
-rw-r--r--test/std/containers/sequences/array/array.cons/initializer_list.pass.cpp34
-rw-r--r--test/std/containers/sequences/array/array.data/data.pass.cpp35
-rw-r--r--test/std/containers/sequences/array/array.data/data_const.pass.cpp35
-rw-r--r--test/std/containers/sequences/array/array.fill/fill.pass.cpp36
-rw-r--r--test/std/containers/sequences/array/array.size/size.pass.cpp53
-rw-r--r--test/std/containers/sequences/array/array.special/swap.pass.cpp43
-rw-r--r--test/std/containers/sequences/array/array.swap/swap.pass.cpp43
-rw-r--r--test/std/containers/sequences/array/array.tuple/get.fail.cpp25
-rw-r--r--test/std/containers/sequences/array/array.tuple/get.pass.cpp52
-rw-r--r--test/std/containers/sequences/array/array.tuple/get_const.pass.cpp37
-rw-r--r--test/std/containers/sequences/array/array.tuple/get_rv.pass.cpp30
-rw-r--r--test/std/containers/sequences/array/array.tuple/tuple_element.pass.cpp54
-rw-r--r--test/std/containers/sequences/array/array.tuple/tuple_size.pass.cpp42
-rw-r--r--test/std/containers/sequences/array/array.zero/tested_elsewhere.pass.cpp18
-rw-r--r--test/std/containers/sequences/array/at.pass.cpp67
-rw-r--r--test/std/containers/sequences/array/begin.pass.cpp32
-rw-r--r--test/std/containers/sequences/array/contiguous.pass.cpp31
-rw-r--r--test/std/containers/sequences/array/front_back.pass.cpp62
-rw-r--r--test/std/containers/sequences/array/indexing.pass.cpp60
-rw-r--r--test/std/containers/sequences/array/iterators.pass.cpp110
-rw-r--r--test/std/containers/sequences/array/types.pass.cpp62
-rw-r--r--test/std/containers/sequences/array/version.pass.cpp20
-rw-r--r--test/std/containers/sequences/deque/deque.capacity/access.pass.cpp91
-rw-r--r--test/std/containers/sequences/deque/deque.capacity/resize_size.pass.cpp86
-rw-r--r--test/std/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp86
-rw-r--r--test/std/containers/sequences/deque/deque.capacity/shrink_to_fit.pass.cpp77
-rw-r--r--test/std/containers/sequences/deque/deque.cons/alloc.pass.cpp38
-rw-r--r--test/std/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp43
-rw-r--r--test/std/containers/sequences/deque/deque.cons/assign_iter_iter.pass.cpp109
-rw-r--r--test/std/containers/sequences/deque/deque.cons/assign_size_value.pass.cpp85
-rw-r--r--test/std/containers/sequences/deque/deque.cons/copy.pass.cpp61
-rw-r--r--test/std/containers/sequences/deque/deque.cons/copy_alloc.pass.cpp51
-rw-r--r--test/std/containers/sequences/deque/deque.cons/default.pass.cpp41
-rw-r--r--test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp50
-rw-r--r--test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp52
-rw-r--r--test/std/containers/sequences/deque/deque.cons/initializer_list.pass.cpp41
-rw-r--r--test/std/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp44
-rw-r--r--test/std/containers/sequences/deque/deque.cons/iter_iter.pass.cpp62
-rw-r--r--test/std/containers/sequences/deque/deque.cons/iter_iter_alloc.pass.cpp51
-rw-r--r--test/std/containers/sequences/deque/deque.cons/move.pass.cpp72
-rw-r--r--test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp87
-rw-r--r--test/std/containers/sequences/deque/deque.cons/move_assign.pass.cpp91
-rw-r--r--test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp52
-rw-r--r--test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp50
-rw-r--r--test/std/containers/sequences/deque/deque.cons/op_equal.pass.cpp63
-rw-r--r--test/std/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp43
-rw-r--r--test/std/containers/sequences/deque/deque.cons/size.pass.cpp113
-rw-r--r--test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp51
-rw-r--r--test/std/containers/sequences/deque/deque.cons/size_value_alloc.pass.cpp67
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/emplace.pass.cpp112
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp87
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp87
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/erase_iter.invalidation.pass.cpp70
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/erase_iter.pass.cpp90
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.invalidation.pass.cpp78
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.pass.cpp96
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp63
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp295
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/insert_rvalue.pass.cpp118
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/insert_size_value.pass.cpp159
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/insert_value.pass.cpp139
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/pop_back.invalidation.pass.cpp49
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/pop_back.pass.cpp84
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/pop_front.invalidation.pass.cpp49
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/pop_front.pass.cpp84
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/push_back.pass.cpp73
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp101
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/push_back_rvalue.pass.cpp80
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/push_front.pass.cpp83
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp101
-rw-r--r--test/std/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp90
-rw-r--r--test/std/containers/sequences/deque/deque.special/copy.pass.cpp88
-rw-r--r--test/std/containers/sequences/deque/deque.special/copy_backward.pass.cpp87
-rw-r--r--test/std/containers/sequences/deque/deque.special/move.pass.cpp87
-rw-r--r--test/std/containers/sequences/deque/deque.special/move_backward.pass.cpp87
-rw-r--r--test/std/containers/sequences/deque/deque.special/swap.pass.cpp110
-rw-r--r--test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp90
-rw-r--r--test/std/containers/sequences/deque/iterators.pass.cpp79
-rw-r--r--test/std/containers/sequences/deque/types.pass.cpp90
-rw-r--r--test/std/containers/sequences/deque/version.pass.cpp20
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.access/front.pass.cpp61
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/alloc.fail.cpp30
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/alloc.pass.cpp41
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/assign_copy.pass.cpp146
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp70
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp199
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp70
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/assign_range.pass.cpp78
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/assign_size_value.pass.cpp68
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/copy.pass.cpp69
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/copy_alloc.pass.cpp67
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/default.pass.cpp41
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp50
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/default_recursive.pass.cpp25
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp52
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp43
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp48
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp73
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/move_alloc.pass.cpp73
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp52
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp50
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/range.pass.cpp48
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/range_alloc.pass.cpp54
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/size.fail.cpp35
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/size.pass.cpp66
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/size_value.pass.cpp45
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.cons/size_value_alloc.pass.cpp50
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.iter/before_begin.pass.cpp104
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.iter/iterators.pass.cpp145
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/clear.pass.cpp62
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp89
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp50
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_many.pass.cpp155
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_one.pass.cpp97
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_const.pass.cpp87
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp75
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_range.pass.cpp80
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp90
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_size_value.pass.cpp73
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp78
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_const.pass.cpp47
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_exception_safety.pass.cpp73
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp50
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size.pass.cpp114
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp84
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.ops/merge.pass.cpp48
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.ops/merge_pred.pass.cpp49
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.ops/remove.pass.cpp155
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp155
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.ops/reverse.pass.cpp42
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.ops/sort.pass.cpp47
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.ops/sort_pred.pass.cpp48
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_flist.pass.cpp75
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp140
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_range.pass.cpp169
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.ops/unique.pass.cpp120
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.ops/unique_pred.pass.cpp125
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.spec/equal.pass.cpp60
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.spec/member_swap.pass.cpp259
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.spec/non_member_swap.pass.cpp260
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.spec/relational.pass.cpp65
-rw-r--r--test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp90
-rw-r--r--test/std/containers/sequences/forwardlist/max_size.pass.cpp35
-rw-r--r--test/std/containers/sequences/forwardlist/types.pass.cpp62
-rw-r--r--test/std/containers/sequences/forwardlist/version.pass.cpp20
-rw-r--r--test/std/containers/sequences/list/db_back.pass.cpp56
-rw-r--r--test/std/containers/sequences/list/db_cback.pass.cpp52
-rw-r--r--test/std/containers/sequences/list/db_cfront.pass.cpp52
-rw-r--r--test/std/containers/sequences/list/db_front.pass.cpp56
-rw-r--r--test/std/containers/sequences/list/db_iterators_6.pass.cpp58
-rw-r--r--test/std/containers/sequences/list/db_iterators_7.pass.cpp58
-rw-r--r--test/std/containers/sequences/list/db_iterators_8.pass.cpp54
-rw-r--r--test/std/containers/sequences/list/db_iterators_9.pass.cpp67
-rw-r--r--test/std/containers/sequences/list/iterators.pass.cpp159
-rw-r--r--test/std/containers/sequences/list/list.capacity/resize_size.pass.cpp81
-rw-r--r--test/std/containers/sequences/list/list.capacity/resize_size_value.pass.cpp53
-rw-r--r--test/std/containers/sequences/list/list.cons/assign_copy.pass.cpp44
-rw-r--r--test/std/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp45
-rw-r--r--test/std/containers/sequences/list/list.cons/assign_move.pass.cpp82
-rw-r--r--test/std/containers/sequences/list/list.cons/copy.pass.cpp54
-rw-r--r--test/std/containers/sequences/list/list.cons/copy_alloc.pass.cpp42
-rw-r--r--test/std/containers/sequences/list/list.cons/default.pass.cpp58
-rw-r--r--test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp50
-rw-r--r--test/std/containers/sequences/list/list.cons/default_stack_alloc.pass.cpp48
-rw-r--r--test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp52
-rw-r--r--test/std/containers/sequences/list/list.cons/initializer_list.pass.cpp43
-rw-r--r--test/std/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp46
-rw-r--r--test/std/containers/sequences/list/list.cons/input_iterator.pass.cpp77
-rw-r--r--test/std/containers/sequences/list/list.cons/move.pass.cpp74
-rw-r--r--test/std/containers/sequences/list/list.cons/move_alloc.pass.cpp78
-rw-r--r--test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp52
-rw-r--r--test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp50
-rw-r--r--test/std/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp44
-rw-r--r--test/std/containers/sequences/list/list.cons/size_type.pass.cpp103
-rw-r--r--test/std/containers/sequences/list/list.cons/size_value_alloc.pass.cpp79
-rw-r--r--test/std/containers/sequences/list/list.modifiers/clear.pass.cpp35
-rw-r--r--test/std/containers/sequences/list/list.modifiers/emplace.pass.cpp88
-rw-r--r--test/std/containers/sequences/list/list.modifiers/emplace_back.pass.cpp66
-rw-r--r--test/std/containers/sequences/list/list.modifiers/emplace_front.pass.cpp66
-rw-r--r--test/std/containers/sequences/list/list.modifiers/erase_iter.pass.cpp65
-rw-r--r--test/std/containers/sequences/list/list.modifiers/erase_iter_db1.pass.cpp51
-rw-r--r--test/std/containers/sequences/list/list.modifiers/erase_iter_db2.pass.cpp53
-rw-r--r--test/std/containers/sequences/list/list.modifiers/erase_iter_iter.pass.cpp84
-rw-r--r--test/std/containers/sequences/list/list.modifiers/erase_iter_iter_db1.pass.cpp51
-rw-r--r--test/std/containers/sequences/list/list.modifiers/erase_iter_iter_db2.pass.cpp51
-rw-r--r--test/std/containers/sequences/list/list.modifiers/erase_iter_iter_db3.pass.cpp51
-rw-r--r--test/std/containers/sequences/list/list.modifiers/erase_iter_iter_db4.pass.cpp49
-rw-r--r--test/std/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp67
-rw-r--r--test/std/containers/sequences/list/list.modifiers/insert_iter_iter_iter.pass.cpp185
-rw-r--r--test/std/containers/sequences/list/list.modifiers/insert_iter_rvalue.pass.cpp68
-rw-r--r--test/std/containers/sequences/list/list.modifiers/insert_iter_size_value.pass.cpp106
-rw-r--r--test/std/containers/sequences/list/list.modifiers/insert_iter_value.pass.cpp112
-rw-r--r--test/std/containers/sequences/list/list.modifiers/pop_back.pass.cpp55
-rw-r--r--test/std/containers/sequences/list/list.modifiers/pop_front.pass.cpp43
-rw-r--r--test/std/containers/sequences/list/list.modifiers/push_back.pass.cpp37
-rw-r--r--test/std/containers/sequences/list/list.modifiers/push_back_exception_safety.pass.cpp73
-rw-r--r--test/std/containers/sequences/list/list.modifiers/push_back_rvalue.pass.cpp46
-rw-r--r--test/std/containers/sequences/list/list.modifiers/push_front.pass.cpp37
-rw-r--r--test/std/containers/sequences/list/list.modifiers/push_front_exception_safety.pass.cpp73
-rw-r--r--test/std/containers/sequences/list/list.modifiers/push_front_rvalue.pass.cpp46
-rw-r--r--test/std/containers/sequences/list/list.ops/merge.pass.cpp41
-rw-r--r--test/std/containers/sequences/list/list.ops/merge_comp.pass.cpp42
-rw-r--r--test/std/containers/sequences/list/list.ops/remove.pass.cpp69
-rw-r--r--test/std/containers/sequences/list/list.ops/remove_if.pass.cpp64
-rw-r--r--test/std/containers/sequences/list/list.ops/reverse.pass.cpp37
-rw-r--r--test/std/containers/sequences/list/list.ops/sort.pass.cpp37
-rw-r--r--test/std/containers/sequences/list/list.ops/sort_comp.pass.cpp38
-rw-r--r--test/std/containers/sequences/list/list.ops/splice_pos_list.pass.cpp803
-rw-r--r--test/std/containers/sequences/list/list.ops/splice_pos_list_iter.pass.cpp357
-rw-r--r--test/std/containers/sequences/list/list.ops/splice_pos_list_iter_iter.pass.cpp237
-rw-r--r--test/std/containers/sequences/list/list.ops/unique.pass.cpp37
-rw-r--r--test/std/containers/sequences/list/list.ops/unique_pred.pass.cpp42
-rw-r--r--test/std/containers/sequences/list/list.special/db_swap_1.pass.cpp59
-rw-r--r--test/std/containers/sequences/list/list.special/swap.pass.cpp146
-rw-r--r--test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp90
-rw-r--r--test/std/containers/sequences/list/types.pass.cpp48
-rw-r--r--test/std/containers/sequences/list/version.pass.cpp20
-rw-r--r--test/std/containers/sequences/nothing_to_do.pass.cpp12
-rw-r--r--test/std/containers/sequences/vector.bool/assign_copy.pass.cpp44
-rw-r--r--test/std/containers/sequences/vector.bool/assign_initializer_list.pass.cpp43
-rw-r--r--test/std/containers/sequences/vector.bool/assign_move.pass.cpp81
-rw-r--r--test/std/containers/sequences/vector.bool/capacity.pass.cpp44
-rw-r--r--test/std/containers/sequences/vector.bool/construct_default.pass.cpp70
-rw-r--r--test/std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp48
-rw-r--r--test/std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp55
-rw-r--r--test/std/containers/sequences/vector.bool/construct_size.pass.cpp64
-rw-r--r--test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp37
-rw-r--r--test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp39
-rw-r--r--test/std/containers/sequences/vector.bool/copy.pass.cpp65
-rw-r--r--test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp62
-rw-r--r--test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp49
-rw-r--r--test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp51
-rw-r--r--test/std/containers/sequences/vector.bool/emplace.pass.cpp68
-rw-r--r--test/std/containers/sequences/vector.bool/emplace_back.pass.cpp57
-rw-r--r--test/std/containers/sequences/vector.bool/erase_iter.pass.cpp65
-rw-r--r--test/std/containers/sequences/vector.bool/erase_iter_iter.pass.cpp85
-rw-r--r--test/std/containers/sequences/vector.bool/find.pass.cpp40
-rw-r--r--test/std/containers/sequences/vector.bool/initializer_list.pass.cpp41
-rw-r--r--test/std/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp44
-rw-r--r--test/std/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp65
-rw-r--r--test/std/containers/sequences/vector.bool/insert_iter_iter_iter.pass.cpp126
-rw-r--r--test/std/containers/sequences/vector.bool/insert_iter_size_value.pass.cpp81
-rw-r--r--test/std/containers/sequences/vector.bool/insert_iter_value.pass.cpp77
-rw-r--r--test/std/containers/sequences/vector.bool/iterators.pass.cpp123
-rw-r--r--test/std/containers/sequences/vector.bool/move.pass.cpp64
-rw-r--r--test/std/containers/sequences/vector.bool/move_alloc.pass.cpp77
-rw-r--r--test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp51
-rw-r--r--test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp54
-rw-r--r--test/std/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp43
-rw-r--r--test/std/containers/sequences/vector.bool/push_back.pass.cpp48
-rw-r--r--test/std/containers/sequences/vector.bool/reserve.pass.cpp54
-rw-r--r--test/std/containers/sequences/vector.bool/resize_size.pass.cpp50
-rw-r--r--test/std/containers/sequences/vector.bool/resize_size_value.pass.cpp52
-rw-r--r--test/std/containers/sequences/vector.bool/shrink_to_fit.pass.cpp38
-rw-r--r--test/std/containers/sequences/vector.bool/swap.pass.cpp98
-rw-r--r--test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp90
-rw-r--r--test/std/containers/sequences/vector.bool/types.pass.cpp72
-rw-r--r--test/std/containers/sequences/vector.bool/vector_bool.pass.cpp52
-rw-r--r--test/std/containers/sequences/vector/asan.pass.cpp52
-rw-r--r--test/std/containers/sequences/vector/asan_throw.pass.cpp232
-rw-r--r--test/std/containers/sequences/vector/const_value_type.pass.cpp22
-rw-r--r--test/std/containers/sequences/vector/contiguous.pass.cpp52
-rw-r--r--test/std/containers/sequences/vector/db_back.pass.cpp56
-rw-r--r--test/std/containers/sequences/vector/db_cback.pass.cpp52
-rw-r--r--test/std/containers/sequences/vector/db_cfront.pass.cpp52
-rw-r--r--test/std/containers/sequences/vector/db_cindex.pass.cpp54
-rw-r--r--test/std/containers/sequences/vector/db_front.pass.cpp56
-rw-r--r--test/std/containers/sequences/vector/db_index.pass.cpp56
-rw-r--r--test/std/containers/sequences/vector/db_iterators_2.pass.cpp54
-rw-r--r--test/std/containers/sequences/vector/db_iterators_3.pass.cpp54
-rw-r--r--test/std/containers/sequences/vector/db_iterators_4.pass.cpp56
-rw-r--r--test/std/containers/sequences/vector/db_iterators_5.pass.cpp60
-rw-r--r--test/std/containers/sequences/vector/db_iterators_6.pass.cpp58
-rw-r--r--test/std/containers/sequences/vector/db_iterators_7.pass.cpp58
-rw-r--r--test/std/containers/sequences/vector/db_iterators_8.pass.cpp54
-rw-r--r--test/std/containers/sequences/vector/iterators.pass.cpp165
-rw-r--r--test/std/containers/sequences/vector/types.pass.cpp86
-rw-r--r--test/std/containers/sequences/vector/vector.capacity/capacity.pass.cpp48
-rw-r--r--test/std/containers/sequences/vector/vector.capacity/reserve.pass.cpp69
-rw-r--r--test/std/containers/sequences/vector/vector.capacity/resize_size.pass.cpp83
-rw-r--r--test/std/containers/sequences/vector/vector.capacity/resize_size_value.pass.cpp76
-rw-r--r--test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp62
-rw-r--r--test/std/containers/sequences/vector/vector.capacity/swap.pass.cpp50
-rw-r--r--test/std/containers/sequences/vector/vector.cons/assign_copy.pass.cpp44
-rw-r--r--test/std/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp55
-rw-r--r--test/std/containers/sequences/vector/vector.cons/assign_move.pass.cpp101
-rw-r--r--test/std/containers/sequences/vector/vector.cons/assign_size_value.pass.cpp54
-rw-r--r--test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp90
-rw-r--r--test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp56
-rw-r--r--test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp71
-rw-r--r--test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp73
-rw-r--r--test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp40
-rw-r--r--test/std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp39
-rw-r--r--test/std/containers/sequences/vector/vector.cons/copy.pass.cpp78
-rw-r--r--test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp64
-rw-r--r--test/std/containers/sequences/vector/vector.cons/default.recursive.pass.cpp23
-rw-r--r--test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp51
-rw-r--r--test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp52
-rw-r--r--test/std/containers/sequences/vector/vector.cons/initializer_list.pass.cpp43
-rw-r--r--test/std/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp47
-rw-r--r--test/std/containers/sequences/vector/vector.cons/move.pass.cpp103
-rw-r--r--test/std/containers/sequences/vector/vector.cons/move_alloc.pass.cpp99
-rw-r--r--test/std/containers/sequences/vector/vector.cons/move_assign_noexcept.pass.cpp52
-rw-r--r--test/std/containers/sequences/vector/vector.cons/move_noexcept.pass.cpp55
-rw-r--r--test/std/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp46
-rw-r--r--test/std/containers/sequences/vector/vector.data/data.pass.cpp44
-rw-r--r--test/std/containers/sequences/vector/vector.data/data_const.pass.cpp44
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/emplace.pass.cpp160
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/emplace_back.pass.cpp107
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/emplace_extra.pass.cpp62
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp75
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/erase_iter_db1.pass.cpp51
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/erase_iter_db2.pass.cpp53
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp128
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter_db1.pass.cpp51
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter_db2.pass.cpp51
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter_db3.pass.cpp51
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter_db4.pass.cpp49
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp68
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp190
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/insert_iter_rvalue.pass.cpp86
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/insert_iter_size_value.pass.cpp132
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/insert_iter_value.pass.cpp116
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/pop_back.pass.cpp55
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/push_back.pass.cpp108
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/push_back_exception_safety.pass.cpp86
-rw-r--r--test/std/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp111
-rw-r--r--test/std/containers/sequences/vector/vector.special/db_swap_1.pass.cpp56
-rw-r--r--test/std/containers/sequences/vector/vector.special/swap.pass.cpp188
-rw-r--r--test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp91
-rw-r--r--test/std/containers/sequences/vector/version.pass.cpp20
-rw-r--r--test/std/containers/stack_allocator.h66
-rw-r--r--test/std/containers/test_compare.h36
-rw-r--r--test/std/containers/test_hash.h32
-rw-r--r--test/std/containers/unord/next_prime.pass.cpp51
-rw-r--r--test/std/containers/unord/unord.map/bucket.pass.cpp77
-rw-r--r--test/std/containers/unord/unord.map/bucket_count.pass.cpp80
-rw-r--r--test/std/containers/unord/unord.map/bucket_size.pass.cpp81
-rw-r--r--test/std/containers/unord/unord.map/compare.pass.cpp42
-rw-r--r--test/std/containers/unord/unord.map/count.pass.cpp65
-rw-r--r--test/std/containers/unord/unord.map/db_iterators_7.pass.cpp60
-rw-r--r--test/std/containers/unord/unord.map/db_iterators_8.pass.cpp56
-rw-r--r--test/std/containers/unord/unord.map/db_local_iterators_7.pass.cpp57
-rw-r--r--test/std/containers/unord/unord.map/db_local_iterators_8.pass.cpp54
-rw-r--r--test/std/containers/unord/unord.map/eq.pass.cpp163
-rw-r--r--test/std/containers/unord/unord.map/equal_range_const.pass.cpp75
-rw-r--r--test/std/containers/unord/unord.map/equal_range_non_const.pass.cpp75
-rw-r--r--test/std/containers/unord/unord.map/find_const.pass.cpp71
-rw-r--r--test/std/containers/unord/unord.map/find_non_const.pass.cpp71
-rw-r--r--test/std/containers/unord/unord.map/iterators.pass.cpp128
-rw-r--r--test/std/containers/unord/unord.map/load_factor.pass.cpp77
-rw-r--r--test/std/containers/unord/unord.map/local_iterators.pass.cpp421
-rw-r--r--test/std/containers/unord/unord.map/max_bucket_count.pass.cpp43
-rw-r--r--test/std/containers/unord/unord.map/max_load_factor.pass.cpp71
-rw-r--r--test/std/containers/unord/unord.map/max_size.pass.cpp36
-rw-r--r--test/std/containers/unord/unord.map/rehash.pass.cpp91
-rw-r--r--test/std/containers/unord/unord.map/reserve.pass.cpp91
-rw-r--r--test/std/containers/unord/unord.map/swap_member.pass.cpp572
-rw-r--r--test/std/containers/unord/unord.map/types.pass.cpp72
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/allocator.pass.cpp111
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/assign_copy.pass.cpp185
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp97
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp229
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/copy.pass.cpp151
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/copy_alloc.pass.cpp110
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/default.pass.cpp78
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/default_noexcept.pass.cpp70
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/dtor_noexcept.pass.cpp67
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/init.pass.cpp162
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp100
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp102
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp105
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp107
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/move.pass.cpp199
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp157
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp69
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/move_noexcept.pass.cpp66
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/range.pass.cpp170
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/range_size.pass.cpp105
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/range_size_hash.pass.cpp108
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/range_size_hash_equal.pass.cpp110
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/range_size_hash_equal_allocator.pass.cpp113
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/size.fail.cpp69
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/size.pass.cpp69
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/size_hash.pass.cpp73
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_equal.pass.cpp75
-rw-r--r--test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_equal_allocator.pass.cpp77
-rw-r--r--test/std/containers/unord/unord.map/unord.map.elem/at.pass.cpp134
-rw-r--r--test/std/containers/unord/unord.map/unord.map.elem/index.pass.cpp115
-rw-r--r--test/std/containers/unord/unord.map/unord.map.elem/index_tuple.pass.cpp41
-rw-r--r--test/std/containers/unord/unord.map/unord.map.swap/db_swap_1.pass.cpp44
-rw-r--r--test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp199
-rw-r--r--test/std/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp572
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/clear.pass.cpp61
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/emplace.pass.cpp80
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/emplace_hint.pass.cpp93
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/erase_const_iter.pass.cpp92
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/erase_iter_db1.pass.cpp39
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/erase_iter_db2.pass.cpp42
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/erase_iter_iter_db1.pass.cpp41
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/erase_iter_iter_db2.pass.cpp41
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/erase_iter_iter_db3.pass.cpp41
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/erase_iter_iter_db4.pass.cpp40
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/erase_key.pass.cpp177
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/erase_range.pass.cpp99
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/insert_const_lvalue.pass.cpp86
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/insert_hint_const_lvalue.pass.cpp97
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/insert_hint_rvalue.pass.cpp156
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/insert_init.pass.cpp72
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/insert_or_assign.pass.cpp198
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/insert_range.pass.cpp71
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/insert_rvalue.pass.cpp152
-rw-r--r--test/std/containers/unord/unord.map/unorder.map.modifiers/try.emplace.pass.cpp195
-rw-r--r--test/std/containers/unord/unord.map/version.pass.cpp20
-rw-r--r--test/std/containers/unord/unord.multimap/bucket.pass.cpp77
-rw-r--r--test/std/containers/unord/unord.multimap/bucket_count.pass.cpp49
-rw-r--r--test/std/containers/unord/unord.multimap/bucket_size.pass.cpp85
-rw-r--r--test/std/containers/unord/unord.multimap/count.pass.cpp71
-rw-r--r--test/std/containers/unord/unord.multimap/db_iterators_7.pass.cpp60
-rw-r--r--test/std/containers/unord/unord.multimap/db_iterators_8.pass.cpp56
-rw-r--r--test/std/containers/unord/unord.multimap/db_local_iterators_7.pass.cpp57
-rw-r--r--test/std/containers/unord/unord.multimap/db_local_iterators_8.pass.cpp54
-rw-r--r--test/std/containers/unord/unord.multimap/eq.pass.cpp181
-rw-r--r--test/std/containers/unord/unord.multimap/equal_range_const.pass.cpp97
-rw-r--r--test/std/containers/unord/unord.multimap/equal_range_non_const.pass.cpp97
-rw-r--r--test/std/containers/unord/unord.multimap/find_const.pass.cpp71
-rw-r--r--test/std/containers/unord/unord.multimap/find_non_const.pass.cpp71
-rw-r--r--test/std/containers/unord/unord.multimap/iterators.fail.cpp69
-rw-r--r--test/std/containers/unord/unord.multimap/iterators.pass.cpp134
-rw-r--r--test/std/containers/unord/unord.multimap/load_factor.pass.cpp77
-rw-r--r--test/std/containers/unord/unord.multimap/local_iterators.fail.cpp286
-rw-r--r--test/std/containers/unord/unord.multimap/local_iterators.pass.cpp549
-rw-r--r--test/std/containers/unord/unord.multimap/max_bucket_count.pass.cpp43
-rw-r--r--test/std/containers/unord/unord.multimap/max_load_factor.pass.cpp71
-rw-r--r--test/std/containers/unord/unord.multimap/max_size.pass.cpp36
-rw-r--r--test/std/containers/unord/unord.multimap/rehash.pass.cpp119
-rw-r--r--test/std/containers/unord/unord.multimap/reserve.pass.cpp93
-rw-r--r--test/std/containers/unord/unord.multimap/scary.pass.cpp24
-rw-r--r--test/std/containers/unord/unord.multimap/swap_member.pass.cpp585
-rw-r--r--test/std/containers/unord/unord.multimap/types.pass.cpp72
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp111
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_copy.pass.cpp227
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp146
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp306
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy.pass.cpp193
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy_alloc.pass.cpp138
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default.pass.cpp78
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default_noexcept.pass.cpp70
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp67
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init.pass.cpp254
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp144
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp146
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp149
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp151
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp243
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp228
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp69
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_noexcept.pass.cpp66
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range.pass.cpp263
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size.pass.cpp149
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash.pass.cpp152
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal.pass.cpp154
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range_size_hash_equal_allocator.pass.cpp157
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size.fail.cpp69
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size.pass.cpp69
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash.pass.cpp73
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_equal.pass.cpp75
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_equal_allocator.pass.cpp77
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/clear.pass.cpp61
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace.pass.cpp74
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp109
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_const_iter.pass.cpp140
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db1.pass.cpp39
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_db2.pass.cpp42
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db1.pass.cpp41
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db2.pass.cpp41
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db3.pass.cpp41
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_iter_iter_db4.pass.cpp40
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_key.pass.cpp388
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/erase_range.pass.cpp179
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_const_lvalue.pass.cpp78
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_hint_const_lvalue.pass.cpp97
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_hint_rvalue.pass.cpp156
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp122
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_range.pass.cpp121
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_rvalue.pass.cpp136
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.swap/db_swap_1.pass.cpp44
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp198
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp584
-rw-r--r--test/std/containers/unord/unord.multiset/bucket.pass.cpp76
-rw-r--r--test/std/containers/unord/unord.multiset/bucket_count.pass.cpp79
-rw-r--r--test/std/containers/unord/unord.multiset/bucket_size.pass.cpp84
-rw-r--r--test/std/containers/unord/unord.multiset/clear.pass.cpp60
-rw-r--r--test/std/containers/unord/unord.multiset/count.pass.cpp70
-rw-r--r--test/std/containers/unord/unord.multiset/db_iterators_7.pass.cpp58
-rw-r--r--test/std/containers/unord/unord.multiset/db_iterators_8.pass.cpp54
-rw-r--r--test/std/containers/unord/unord.multiset/db_local_iterators_7.pass.cpp57
-rw-r--r--test/std/containers/unord/unord.multiset/db_local_iterators_8.pass.cpp54
-rw-r--r--test/std/containers/unord/unord.multiset/emplace.pass.cpp64
-rw-r--r--test/std/containers/unord/unord.multiset/emplace_hint.pass.cpp80
-rw-r--r--test/std/containers/unord/unord.multiset/eq.pass.cpp180
-rw-r--r--test/std/containers/unord/unord.multiset/equal_range_const.pass.cpp90
-rw-r--r--test/std/containers/unord/unord.multiset/equal_range_non_const.pass.cpp90
-rw-r--r--test/std/containers/unord/unord.multiset/erase_const_iter.pass.cpp93
-rw-r--r--test/std/containers/unord/unord.multiset/erase_iter_db1.pass.cpp38
-rw-r--r--test/std/containers/unord/unord.multiset/erase_iter_db2.pass.cpp41
-rw-r--r--test/std/containers/unord/unord.multiset/erase_iter_iter_db1.pass.cpp40
-rw-r--r--test/std/containers/unord/unord.multiset/erase_iter_iter_db2.pass.cpp40
-rw-r--r--test/std/containers/unord/unord.multiset/erase_iter_iter_db3.pass.cpp40
-rw-r--r--test/std/containers/unord/unord.multiset/erase_iter_iter_db4.pass.cpp39
-rw-r--r--test/std/containers/unord/unord.multiset/erase_key.pass.cpp176
-rw-r--r--test/std/containers/unord/unord.multiset/erase_range.pass.cpp94
-rw-r--r--test/std/containers/unord/unord.multiset/find_const.pass.cpp68
-rw-r--r--test/std/containers/unord/unord.multiset/find_non_const.pass.cpp68
-rw-r--r--test/std/containers/unord/unord.multiset/insert_const_lvalue.pass.cpp70
-rw-r--r--test/std/containers/unord/unord.multiset/insert_hint_const_lvalue.pass.cpp89
-rw-r--r--test/std/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp138
-rw-r--r--test/std/containers/unord/unord.multiset/insert_init.pass.cpp71
-rw-r--r--test/std/containers/unord/unord.multiset/insert_range.pass.cpp70
-rw-r--r--test/std/containers/unord/unord.multiset/insert_rvalue.pass.cpp118
-rw-r--r--test/std/containers/unord/unord.multiset/iterators.fail.cpp67
-rw-r--r--test/std/containers/unord/unord.multiset/iterators.pass.cpp127
-rw-r--r--test/std/containers/unord/unord.multiset/load_factor.pass.cpp76
-rw-r--r--test/std/containers/unord/unord.multiset/local_iterators.fail.cpp261
-rw-r--r--test/std/containers/unord/unord.multiset/local_iterators.pass.cpp500
-rw-r--r--test/std/containers/unord/unord.multiset/max_bucket_count.pass.cpp38
-rw-r--r--test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp70
-rw-r--r--test/std/containers/unord/unord.multiset/max_size.pass.cpp36
-rw-r--r--test/std/containers/unord/unord.multiset/rehash.pass.cpp90
-rw-r--r--test/std/containers/unord/unord.multiset/reserve.pass.cpp90
-rw-r--r--test/std/containers/unord/unord.multiset/scary.pass.cpp24
-rw-r--r--test/std/containers/unord/unord.multiset/swap_member.pass.cpp571
-rw-r--r--test/std/containers/unord/unord.multiset/types.pass.cpp69
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/allocator.pass.cpp109
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_copy.pass.cpp209
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp97
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp286
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp171
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy_alloc.pass.cpp123
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default.pass.cpp74
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default_noexcept.pass.cpp70
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp67
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp163
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp97
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp100
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp102
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp104
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp194
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp213
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp69
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp66
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range.pass.cpp167
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size.pass.cpp101
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size_hash.pass.cpp104
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size_hash_equal.pass.cpp106
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range_size_hash_equal_allocator.pass.cpp109
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size.fail.cpp65
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size.pass.cpp65
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash.pass.cpp69
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_equal.pass.cpp71
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_equal_allocator.pass.cpp73
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.swap/db_swap_1.pass.cpp43
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp198
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp571
-rw-r--r--test/std/containers/unord/unord.set/bucket.pass.cpp75
-rw-r--r--test/std/containers/unord/unord.set/bucket_count.pass.cpp77
-rw-r--r--test/std/containers/unord/unord.set/bucket_size.pass.cpp79
-rw-r--r--test/std/containers/unord/unord.set/clear.pass.cpp59
-rw-r--r--test/std/containers/unord/unord.set/count.pass.cpp69
-rw-r--r--test/std/containers/unord/unord.set/db_iterators_7.pass.cpp58
-rw-r--r--test/std/containers/unord/unord.set/db_iterators_8.pass.cpp54
-rw-r--r--test/std/containers/unord/unord.set/db_local_iterators_7.pass.cpp57
-rw-r--r--test/std/containers/unord/unord.set/db_local_iterators_8.pass.cpp54
-rw-r--r--test/std/containers/unord/unord.set/emplace.pass.cpp70
-rw-r--r--test/std/containers/unord/unord.set/emplace_hint.pass.cpp80
-rw-r--r--test/std/containers/unord/unord.set/eq.pass.cpp159
-rw-r--r--test/std/containers/unord/unord.set/equal_range_const.pass.cpp81
-rw-r--r--test/std/containers/unord/unord.set/equal_range_non_const.pass.cpp81
-rw-r--r--test/std/containers/unord/unord.set/erase_const_iter.pass.cpp90
-rw-r--r--test/std/containers/unord/unord.set/erase_iter_db1.pass.cpp38
-rw-r--r--test/std/containers/unord/unord.set/erase_iter_db2.pass.cpp41
-rw-r--r--test/std/containers/unord/unord.set/erase_iter_iter_db1.pass.cpp40
-rw-r--r--test/std/containers/unord/unord.set/erase_iter_iter_db2.pass.cpp40
-rw-r--r--test/std/containers/unord/unord.set/erase_iter_iter_db3.pass.cpp40
-rw-r--r--test/std/containers/unord/unord.set/erase_iter_iter_db4.pass.cpp39
-rw-r--r--test/std/containers/unord/unord.set/erase_key.pass.cpp175
-rw-r--r--test/std/containers/unord/unord.set/erase_range.pass.cpp93
-rw-r--r--test/std/containers/unord/unord.set/find_const.pass.cpp67
-rw-r--r--test/std/containers/unord/unord.set/find_non_const.pass.cpp67
-rw-r--r--test/std/containers/unord/unord.set/insert_const_lvalue.pass.cpp78
-rw-r--r--test/std/containers/unord/unord.set/insert_hint_const_lvalue.pass.cpp89
-rw-r--r--test/std/containers/unord/unord.set/insert_hint_rvalue.pass.cpp138
-rw-r--r--test/std/containers/unord/unord.set/insert_init.pass.cpp71
-rw-r--r--test/std/containers/unord/unord.set/insert_range.pass.cpp70
-rw-r--r--test/std/containers/unord/unord.set/insert_rvalue.pass.cpp134
-rw-r--r--test/std/containers/unord/unord.set/iterators.fail.cpp67
-rw-r--r--test/std/containers/unord/unord.set/iterators.pass.cpp127
-rw-r--r--test/std/containers/unord/unord.set/load_factor.pass.cpp76
-rw-r--r--test/std/containers/unord/unord.set/local_iterators.fail.cpp261
-rw-r--r--test/std/containers/unord/unord.set/local_iterators.pass.cpp388
-rw-r--r--test/std/containers/unord/unord.set/max_bucket_count.pass.cpp38
-rw-r--r--test/std/containers/unord/unord.set/max_load_factor.pass.cpp70
-rw-r--r--test/std/containers/unord/unord.set/max_size.pass.cpp36
-rw-r--r--test/std/containers/unord/unord.set/rehash.pass.cpp90
-rw-r--r--test/std/containers/unord/unord.set/reserve.pass.cpp90
-rw-r--r--test/std/containers/unord/unord.set/swap_member.pass.cpp571
-rw-r--r--test/std/containers/unord/unord.set/types.pass.cpp69
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/allocator.pass.cpp109
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/assign_copy.pass.cpp184
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp97
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp225
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/copy.pass.cpp147
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/copy_alloc.pass.cpp107
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/default.pass.cpp74
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/default_noexcept.pass.cpp70
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp67
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp163
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp97
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp100
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp102
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp104
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp194
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp156
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp69
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/move_noexcept.pass.cpp66
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/range.pass.cpp168
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/range_size.pass.cpp101
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/range_size_hash.pass.cpp104
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/range_size_hash_equal.pass.cpp106
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/range_size_hash_equal_allocator.pass.cpp109
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/size.fail.cpp45
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/size.pass.cpp65
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/size_hash.pass.cpp69
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_equal.pass.cpp71
-rw-r--r--test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_equal_allocator.pass.cpp73
-rw-r--r--test/std/containers/unord/unord.set/unord.set.swap/db_swap_1.pass.cpp43
-rw-r--r--test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp198
-rw-r--r--test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp571
-rw-r--r--test/std/containers/unord/unord.set/version.pass.cpp20
992 files changed, 91170 insertions, 0 deletions
diff --git a/test/std/containers/Copyable.h b/test/std/containers/Copyable.h
new file mode 100644
index 000000000000..9542c7e8516f
--- /dev/null
+++ b/test/std/containers/Copyable.h
@@ -0,0 +1,18 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef COPYABLE_H
+#define COPYABLE_H
+
+class Copyable
+{
+public:
+};
+
+#endif // COPYABLE_H
diff --git a/test/std/containers/Emplaceable.h b/test/std/containers/Emplaceable.h
new file mode 100644
index 000000000000..34dd326203b0
--- /dev/null
+++ b/test/std/containers/Emplaceable.h
@@ -0,0 +1,54 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef EMPLACEABLE_H
+#define EMPLACEABLE_H
+
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+class Emplaceable
+{
+ Emplaceable(const Emplaceable&);
+ Emplaceable& operator=(const Emplaceable&);
+
+ int int_;
+ double double_;
+public:
+ Emplaceable() : int_(0), double_(0) {}
+ Emplaceable(int i, double d) : int_(i), double_(d) {}
+ Emplaceable(Emplaceable&& x)
+ : int_(x.int_), double_(x.double_)
+ {x.int_ = 0; x.double_ = 0;}
+ Emplaceable& operator=(Emplaceable&& x)
+ {int_ = x.int_; x.int_ = 0;
+ double_ = x.double_; x.double_ = 0;
+ return *this;}
+
+ bool operator==(const Emplaceable& x) const
+ {return int_ == x.int_ && double_ == x.double_;}
+ bool operator<(const Emplaceable& x) const
+ {return int_ < x.int_ || (int_ == x.int_ && double_ < x.double_);}
+
+ int get() const {return int_;}
+};
+
+namespace std {
+
+template <>
+struct hash<Emplaceable>
+ : public std::unary_function<Emplaceable, std::size_t>
+{
+ std::size_t operator()(const Emplaceable& x) const {return x.get();}
+};
+
+}
+
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+#endif // EMPLACEABLE_H
diff --git a/test/std/containers/NotConstructible.h b/test/std/containers/NotConstructible.h
new file mode 100644
index 000000000000..ac8b98ef99f0
--- /dev/null
+++ b/test/std/containers/NotConstructible.h
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef NOTCONSTRUCTIBLE_H
+#define NOTCONSTRUCTIBLE_H
+
+#include <functional>
+
+class NotConstructible
+{
+ NotConstructible(const NotConstructible&);
+ NotConstructible& operator=(const NotConstructible&);
+public:
+};
+
+inline
+bool
+operator==(const NotConstructible&, const NotConstructible&)
+{return true;}
+
+namespace std
+{
+
+template <>
+struct hash<NotConstructible>
+ : public std::unary_function<NotConstructible, std::size_t>
+{
+ std::size_t operator()(const NotConstructible&) const {return 0;}
+};
+
+}
+
+#endif // NOTCONSTRUCTIBLE_H
diff --git a/test/std/containers/associative/map/compare.pass.cpp b/test/std/containers/associative/map/compare.pass.cpp
new file mode 100644
index 000000000000..aa4d5999ff46
--- /dev/null
+++ b/test/std/containers/associative/map/compare.pass.cpp
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// template <class Key, class T, class Compare = less<Key>,
+// class Allocator = allocator<pair<const Key, T>>>
+// class map
+
+// http://llvm.org/bugs/show_bug.cgi?id=16538
+// http://llvm.org/bugs/show_bug.cgi?id=16549
+
+#include <map>
+
+struct Key {
+ template <typename T> Key(const T&) {}
+ bool operator< (const Key&) const { return false; }
+};
+
+int
+main()
+{
+ std::map<Key, int>::iterator it = std::map<Key, int>().find(Key(0));
+ std::pair<std::map<Key, int>::iterator, bool> result =
+ std::map<Key, int>().insert(std::make_pair(Key(0), 0));
+}
diff --git a/test/std/containers/associative/map/map.access/at.pass.cpp b/test/std/containers/associative/map/map.access/at.pass.cpp
new file mode 100644
index 000000000000..86b1e3d2dfa6
--- /dev/null
+++ b/test/std/containers/associative/map/map.access/at.pass.cpp
@@ -0,0 +1,154 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// mapped_type& at(const key_type& k);
+// const mapped_type& at(const key_type& k) const;
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1.5),
+ V(2, 2.5),
+ V(3, 3.5),
+ V(4, 4.5),
+ V(5, 5.5),
+ V(7, 7.5),
+ V(8, 8.5),
+ };
+ std::map<int, double> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ assert(m.size() == 7);
+ assert(m.at(1) == 1.5);
+ m.at(1) = -1.5;
+ assert(m.at(1) == -1.5);
+ assert(m.at(2) == 2.5);
+ assert(m.at(3) == 3.5);
+ assert(m.at(4) == 4.5);
+ assert(m.at(5) == 5.5);
+ try
+ {
+ m.at(6);
+ assert(false);
+ }
+ catch (std::out_of_range&)
+ {
+ }
+ assert(m.at(7) == 7.5);
+ assert(m.at(8) == 8.5);
+ assert(m.size() == 7);
+ }
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1.5),
+ V(2, 2.5),
+ V(3, 3.5),
+ V(4, 4.5),
+ V(5, 5.5),
+ V(7, 7.5),
+ V(8, 8.5),
+ };
+ const std::map<int, double> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ assert(m.size() == 7);
+ assert(m.at(1) == 1.5);
+ assert(m.at(2) == 2.5);
+ assert(m.at(3) == 3.5);
+ assert(m.at(4) == 4.5);
+ assert(m.at(5) == 5.5);
+ try
+ {
+ m.at(6);
+ assert(false);
+ }
+ catch (std::out_of_range&)
+ {
+ }
+ assert(m.at(7) == 7.5);
+ assert(m.at(8) == 8.5);
+ assert(m.size() == 7);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1.5),
+ V(2, 2.5),
+ V(3, 3.5),
+ V(4, 4.5),
+ V(5, 5.5),
+ V(7, 7.5),
+ V(8, 8.5),
+ };
+ std::map<int, double, std::less<int>, min_allocator<V>> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ assert(m.size() == 7);
+ assert(m.at(1) == 1.5);
+ m.at(1) = -1.5;
+ assert(m.at(1) == -1.5);
+ assert(m.at(2) == 2.5);
+ assert(m.at(3) == 3.5);
+ assert(m.at(4) == 4.5);
+ assert(m.at(5) == 5.5);
+ try
+ {
+ m.at(6);
+ assert(false);
+ }
+ catch (std::out_of_range&)
+ {
+ }
+ assert(m.at(7) == 7.5);
+ assert(m.at(8) == 8.5);
+ assert(m.size() == 7);
+ }
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1.5),
+ V(2, 2.5),
+ V(3, 3.5),
+ V(4, 4.5),
+ V(5, 5.5),
+ V(7, 7.5),
+ V(8, 8.5),
+ };
+ const std::map<int, double, std::less<int>, min_allocator<V>> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ assert(m.size() == 7);
+ assert(m.at(1) == 1.5);
+ assert(m.at(2) == 2.5);
+ assert(m.at(3) == 3.5);
+ assert(m.at(4) == 4.5);
+ assert(m.at(5) == 5.5);
+ try
+ {
+ m.at(6);
+ assert(false);
+ }
+ catch (std::out_of_range&)
+ {
+ }
+ assert(m.at(7) == 7.5);
+ assert(m.at(8) == 8.5);
+ assert(m.size() == 7);
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.access/empty.pass.cpp b/test/std/containers/associative/map/map.access/empty.pass.cpp
new file mode 100644
index 000000000000..b11e94c8042c
--- /dev/null
+++ b/test/std/containers/associative/map/map.access/empty.pass.cpp
@@ -0,0 +1,43 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// bool empty() const;
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::map<int, double> M;
+ M m;
+ assert(m.empty());
+ m.insert(M::value_type(1, 1.5));
+ assert(!m.empty());
+ m.clear();
+ assert(m.empty());
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
+ M m;
+ assert(m.empty());
+ m.insert(M::value_type(1, 1.5));
+ assert(!m.empty());
+ m.clear();
+ assert(m.empty());
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.access/index_key.pass.cpp b/test/std/containers/associative/map/map.access/index_key.pass.cpp
new file mode 100644
index 000000000000..ab1144c60afd
--- /dev/null
+++ b/test/std/containers/associative/map/map.access/index_key.pass.cpp
@@ -0,0 +1,105 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// mapped_type& operator[](const key_type& k);
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+#include "private_constructor.hpp"
+
+int main()
+{
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1.5),
+ V(2, 2.5),
+ V(3, 3.5),
+ V(4, 4.5),
+ V(5, 5.5),
+ V(7, 7.5),
+ V(8, 8.5),
+ };
+ std::map<int, double> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ assert(m.size() == 7);
+ assert(m[1] == 1.5);
+ assert(m.size() == 7);
+ m[1] = -1.5;
+ assert(m[1] == -1.5);
+ assert(m.size() == 7);
+ assert(m[6] == 0);
+ assert(m.size() == 8);
+ m[6] = 6.5;
+ assert(m[6] == 6.5);
+ assert(m.size() == 8);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1.5),
+ V(2, 2.5),
+ V(3, 3.5),
+ V(4, 4.5),
+ V(5, 5.5),
+ V(7, 7.5),
+ V(8, 8.5),
+ };
+ std::map<int, double, std::less<int>, min_allocator<V>> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ assert(m.size() == 7);
+ assert(m[1] == 1.5);
+ assert(m.size() == 7);
+ const int i = 1;
+ m[i] = -1.5;
+ assert(m[1] == -1.5);
+ assert(m.size() == 7);
+ assert(m[6] == 0);
+ assert(m.size() == 8);
+ m[6] = 6.5;
+ assert(m[6] == 6.5);
+ assert(m.size() == 8);
+ }
+#endif
+#if _LIBCPP_STD_VER > 11
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1.5),
+ V(2, 2.5),
+ V(3, 3.5),
+ V(4, 4.5),
+ V(5, 5.5),
+ V(7, 7.5),
+ V(8, 8.5),
+ };
+ std::map<int, double, std::less<>> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+
+ assert(m.size() == 7);
+ assert(m[1] == 1.5);
+ assert(m.size() == 7);
+ m[1] = -1.5;
+ assert(m[1] == -1.5);
+ assert(m.size() == 7);
+ assert(m[6] == 0);
+ assert(m.size() == 8);
+ m[6] = 6.5;
+ assert(m[6] == 6.5);
+ assert(m.size() == 8);
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.access/index_rv_key.pass.cpp b/test/std/containers/associative/map/map.access/index_rv_key.pass.cpp
new file mode 100644
index 000000000000..d14603e1a281
--- /dev/null
+++ b/test/std/containers/associative/map/map.access/index_rv_key.pass.cpp
@@ -0,0 +1,58 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// mapped_type& operator[](key_type&& k);
+
+#include <map>
+#include <cassert>
+
+#include "MoveOnly.h"
+#include "min_allocator.h"
+
+int main()
+{
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ {
+ typedef std::pair<MoveOnly, double> V;
+ std::map<MoveOnly, double> m;
+ assert(m.size() == 0);
+ assert(m[1] == 0.0);
+ assert(m.size() == 1);
+ m[1] = -1.5;
+ assert(m[1] == -1.5);
+ assert(m.size() == 1);
+ assert(m[6] == 0);
+ assert(m.size() == 2);
+ m[6] = 6.5;
+ assert(m[6] == 6.5);
+ assert(m.size() == 2);
+ }
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<MoveOnly, double> V;
+ std::map<MoveOnly, double, std::less<MoveOnly>, min_allocator<V>> m;
+ assert(m.size() == 0);
+ assert(m[1] == 0.0);
+ assert(m.size() == 1);
+ m[1] = -1.5;
+ assert(m[1] == -1.5);
+ assert(m.size() == 1);
+ assert(m[6] == 0);
+ assert(m.size() == 2);
+ m[6] = 6.5;
+ assert(m[6] == 6.5);
+ assert(m.size() == 2);
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.access/index_tuple.pass.cpp b/test/std/containers/associative/map/map.access/index_tuple.pass.cpp
new file mode 100644
index 000000000000..9a00829eadd6
--- /dev/null
+++ b/test/std/containers/associative/map/map.access/index_tuple.pass.cpp
@@ -0,0 +1,33 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// mapped_type& operator[](const key_type& k);
+
+// http://llvm.org/bugs/show_bug.cgi?id=16542
+
+#include <map>
+
+#ifndef _LIBCPP_HAS_NO_VARIADICS
+
+#include <tuple>
+
+#endif
+
+int main()
+{
+#ifndef _LIBCPP_HAS_NO_VARIADICS
+ using namespace std;
+ map<tuple<int,int>, size_t> m;
+ m[make_tuple(2,3)]=7;
+#endif
+}
diff --git a/test/std/containers/associative/map/map.access/iterator.pass.cpp b/test/std/containers/associative/map/map.access/iterator.pass.cpp
new file mode 100644
index 000000000000..552e87d8fc8d
--- /dev/null
+++ b/test/std/containers/associative/map/map.access/iterator.pass.cpp
@@ -0,0 +1,227 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator begin();
+// const_iterator begin() const;
+// iterator end();
+// const_iterator end() const;
+//
+// reverse_iterator rbegin();
+// const_reverse_iterator rbegin() const;
+// reverse_iterator rend();
+// const_reverse_iterator rend() const;
+//
+// const_iterator cbegin() const;
+// const_iterator cend() const;
+// const_reverse_iterator crbegin() const;
+// const_reverse_iterator crend() const;
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ V(4, 1),
+ V(4, 1.5),
+ V(4, 2),
+ V(5, 1),
+ V(5, 1.5),
+ V(5, 2),
+ V(6, 1),
+ V(6, 1.5),
+ V(6, 2),
+ V(7, 1),
+ V(7, 1.5),
+ V(7, 2),
+ V(8, 1),
+ V(8, 1.5),
+ V(8, 2)
+ };
+ std::map<int, double> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ assert(std::distance(m.begin(), m.end()) == m.size());
+ assert(std::distance(m.rbegin(), m.rend()) == m.size());
+ std::map<int, double>::iterator i;
+ i = m.begin();
+ std::map<int, double>::const_iterator k = i;
+ assert(i == k);
+ for (int j = 1; j <= m.size(); ++j, ++i)
+ {
+ assert(i->first == j);
+ assert(i->second == 1);
+ i->second = 2.5;
+ assert(i->second == 2.5);
+ }
+ }
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ V(4, 1),
+ V(4, 1.5),
+ V(4, 2),
+ V(5, 1),
+ V(5, 1.5),
+ V(5, 2),
+ V(6, 1),
+ V(6, 1.5),
+ V(6, 2),
+ V(7, 1),
+ V(7, 1.5),
+ V(7, 2),
+ V(8, 1),
+ V(8, 1.5),
+ V(8, 2)
+ };
+ const std::map<int, double> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ assert(std::distance(m.begin(), m.end()) == m.size());
+ assert(std::distance(m.cbegin(), m.cend()) == m.size());
+ assert(std::distance(m.rbegin(), m.rend()) == m.size());
+ assert(std::distance(m.crbegin(), m.crend()) == m.size());
+ std::map<int, double>::const_iterator i;
+ i = m.begin();
+ for (int j = 1; j <= m.size(); ++j, ++i)
+ {
+ assert(i->first == j);
+ assert(i->second == 1);
+ }
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ V(4, 1),
+ V(4, 1.5),
+ V(4, 2),
+ V(5, 1),
+ V(5, 1.5),
+ V(5, 2),
+ V(6, 1),
+ V(6, 1.5),
+ V(6, 2),
+ V(7, 1),
+ V(7, 1.5),
+ V(7, 2),
+ V(8, 1),
+ V(8, 1.5),
+ V(8, 2)
+ };
+ std::map<int, double, std::less<int>, min_allocator<V>> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ assert(std::distance(m.begin(), m.end()) == m.size());
+ assert(std::distance(m.rbegin(), m.rend()) == m.size());
+ std::map<int, double, std::less<int>, min_allocator<V>>::iterator i;
+ i = m.begin();
+ std::map<int, double, std::less<int>, min_allocator<V>>::const_iterator k = i;
+ assert(i == k);
+ for (int j = 1; j <= m.size(); ++j, ++i)
+ {
+ assert(i->first == j);
+ assert(i->second == 1);
+ i->second = 2.5;
+ assert(i->second == 2.5);
+ }
+ }
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ V(4, 1),
+ V(4, 1.5),
+ V(4, 2),
+ V(5, 1),
+ V(5, 1.5),
+ V(5, 2),
+ V(6, 1),
+ V(6, 1.5),
+ V(6, 2),
+ V(7, 1),
+ V(7, 1.5),
+ V(7, 2),
+ V(8, 1),
+ V(8, 1.5),
+ V(8, 2)
+ };
+ const std::map<int, double, std::less<int>, min_allocator<V>> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ assert(std::distance(m.begin(), m.end()) == m.size());
+ assert(std::distance(m.cbegin(), m.cend()) == m.size());
+ assert(std::distance(m.rbegin(), m.rend()) == m.size());
+ assert(std::distance(m.crbegin(), m.crend()) == m.size());
+ std::map<int, double, std::less<int>, min_allocator<V>>::const_iterator i;
+ i = m.begin();
+ for (int j = 1; j <= m.size(); ++j, ++i)
+ {
+ assert(i->first == j);
+ assert(i->second == 1);
+ }
+ }
+#endif
+#if _LIBCPP_STD_VER > 11
+ { // N3644 testing
+ typedef std::map<int, double> C;
+ C::iterator ii1{}, ii2{};
+ C::iterator ii4 = ii1;
+ C::const_iterator cii{};
+ assert ( ii1 == ii2 );
+ assert ( ii1 == ii4 );
+
+ assert (!(ii1 != ii2 ));
+
+ assert ( (ii1 == cii ));
+ assert ( (cii == ii1 ));
+ assert (!(ii1 != cii ));
+ assert (!(cii != ii1 ));
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.access/max_size.pass.cpp b/test/std/containers/associative/map/map.access/max_size.pass.cpp
new file mode 100644
index 000000000000..551120d331e1
--- /dev/null
+++ b/test/std/containers/associative/map/map.access/max_size.pass.cpp
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// size_type max_size() const;
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::map<int, double> M;
+ M m;
+ assert(m.max_size() != 0);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
+ M m;
+ assert(m.max_size() != 0);
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.access/size.pass.cpp b/test/std/containers/associative/map/map.access/size.pass.cpp
new file mode 100644
index 000000000000..07c12322a460
--- /dev/null
+++ b/test/std/containers/associative/map/map.access/size.pass.cpp
@@ -0,0 +1,59 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// size_type size() const;
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::map<int, double> M;
+ M m;
+ assert(m.size() == 0);
+ m.insert(M::value_type(2, 1.5));
+ assert(m.size() == 1);
+ m.insert(M::value_type(1, 1.5));
+ assert(m.size() == 2);
+ m.insert(M::value_type(3, 1.5));
+ assert(m.size() == 3);
+ m.erase(m.begin());
+ assert(m.size() == 2);
+ m.erase(m.begin());
+ assert(m.size() == 1);
+ m.erase(m.begin());
+ assert(m.size() == 0);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
+ M m;
+ assert(m.size() == 0);
+ m.insert(M::value_type(2, 1.5));
+ assert(m.size() == 1);
+ m.insert(M::value_type(1, 1.5));
+ assert(m.size() == 2);
+ m.insert(M::value_type(3, 1.5));
+ assert(m.size() == 3);
+ m.erase(m.begin());
+ assert(m.size() == 2);
+ m.erase(m.begin());
+ assert(m.size() == 1);
+ m.erase(m.begin());
+ assert(m.size() == 0);
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.cons/alloc.pass.cpp b/test/std/containers/associative/map/map.cons/alloc.pass.cpp
new file mode 100644
index 000000000000..2292c47ef74b
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/alloc.pass.cpp
@@ -0,0 +1,42 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// explicit map(const allocator_type& a);
+
+#include <map>
+#include <cassert>
+
+#include "test_allocator.h"
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::less<int> C;
+ typedef test_allocator<std::pair<const int, double> > A;
+ std::map<int, double, C, A> m(A(5));
+ assert(m.empty());
+ assert(m.begin() == m.end());
+ assert(m.get_allocator() == A(5));
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::less<int> C;
+ typedef min_allocator<std::pair<const int, double> > A;
+ std::map<int, double, C, A> m(A{});
+ assert(m.empty());
+ assert(m.begin() == m.end());
+ assert(m.get_allocator() == A());
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp b/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp
new file mode 100644
index 000000000000..482d1acff840
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp
@@ -0,0 +1,75 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// map& operator=(initializer_list<value_type> il);
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+ {
+ typedef std::pair<const int, double> V;
+ std::map<int, double> m =
+ {
+ {20, 1},
+ };
+ m =
+ {
+ {1, 1},
+ {1, 1.5},
+ {1, 2},
+ {2, 1},
+ {2, 1.5},
+ {2, 2},
+ {3, 1},
+ {3, 1.5},
+ {3, 2}
+ };
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ std::map<int, double, std::less<int>, min_allocator<V>> m =
+ {
+ {20, 1},
+ };
+ m =
+ {
+ {1, 1},
+ {1, 1.5},
+ {1, 2},
+ {2, 1},
+ {2, 1.5},
+ {2, 2},
+ {3, 1},
+ {3, 1.5},
+ {3, 2}
+ };
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ }
+#endif
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+}
diff --git a/test/std/containers/associative/map/map.cons/compare.pass.cpp b/test/std/containers/associative/map/map.cons/compare.pass.cpp
new file mode 100644
index 000000000000..5a213c8e8b8f
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/compare.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// explicit map(const key_compare& comp);
+
+#include <map>
+#include <cassert>
+
+#include "../../../test_compare.h"
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef test_compare<std::less<int> > C;
+ std::map<int, double, C> m(C(3));
+ assert(m.empty());
+ assert(m.begin() == m.end());
+ assert(m.key_comp() == C(3));
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef test_compare<std::less<int> > C;
+ std::map<int, double, C, min_allocator<std::pair<const int, double>>> m(C(3));
+ assert(m.empty());
+ assert(m.begin() == m.end());
+ assert(m.key_comp() == C(3));
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.cons/compare_alloc.pass.cpp b/test/std/containers/associative/map/map.cons/compare_alloc.pass.cpp
new file mode 100644
index 000000000000..56b3c3315e08
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/compare_alloc.pass.cpp
@@ -0,0 +1,45 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// map(const key_compare& comp, const allocator_type& a);
+
+#include <map>
+#include <cassert>
+
+#include "../../../test_compare.h"
+#include "test_allocator.h"
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef test_compare<std::less<int> > C;
+ typedef test_allocator<std::pair<const int, double> > A;
+ std::map<int, double, C, A> m(C(4), A(5));
+ assert(m.empty());
+ assert(m.begin() == m.end());
+ assert(m.key_comp() == C(4));
+ assert(m.get_allocator() == A(5));
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef test_compare<std::less<int> > C;
+ typedef min_allocator<std::pair<const int, double> > A;
+ std::map<int, double, C, A> m(C(4), A());
+ assert(m.empty());
+ assert(m.begin() == m.end());
+ assert(m.key_comp() == C(4));
+ assert(m.get_allocator() == A());
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.cons/copy.pass.cpp b/test/std/containers/associative/map/map.cons/copy.pass.cpp
new file mode 100644
index 000000000000..be5274133082
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/copy.pass.cpp
@@ -0,0 +1,131 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// map(const map& m);
+
+#include <map>
+#include <cassert>
+
+#include "../../../test_compare.h"
+#include "test_allocator.h"
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ };
+ typedef test_compare<std::less<int> > C;
+ typedef test_allocator<V> A;
+ std::map<int, double, C, A> mo(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5), A(7));
+ std::map<int, double, C, A> m = mo;
+ assert(m.get_allocator() == A(7));
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+
+ assert(mo.get_allocator() == A(7));
+ assert(mo.key_comp() == C(5));
+ assert(mo.size() == 3);
+ assert(distance(mo.begin(), mo.end()) == 3);
+ assert(*mo.begin() == V(1, 1));
+ assert(*next(mo.begin()) == V(2, 1));
+ assert(*next(mo.begin(), 2) == V(3, 1));
+ }
+#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ };
+ typedef test_compare<std::less<int> > C;
+ typedef other_allocator<V> A;
+ std::map<int, double, C, A> mo(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5), A(7));
+ std::map<int, double, C, A> m = mo;
+ assert(m.get_allocator() == A(-2));
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+
+ assert(mo.get_allocator() == A(7));
+ assert(mo.key_comp() == C(5));
+ assert(mo.size() == 3);
+ assert(distance(mo.begin(), mo.end()) == 3);
+ assert(*mo.begin() == V(1, 1));
+ assert(*next(mo.begin()) == V(2, 1));
+ assert(*next(mo.begin(), 2) == V(3, 1));
+ }
+#endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ };
+ typedef test_compare<std::less<int> > C;
+ typedef min_allocator<V> A;
+ std::map<int, double, C, A> mo(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5), A());
+ std::map<int, double, C, A> m = mo;
+ assert(m.get_allocator() == A());
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+
+ assert(mo.get_allocator() == A());
+ assert(mo.key_comp() == C(5));
+ assert(mo.size() == 3);
+ assert(distance(mo.begin(), mo.end()) == 3);
+ assert(*mo.begin() == V(1, 1));
+ assert(*next(mo.begin()) == V(2, 1));
+ assert(*next(mo.begin(), 2) == V(3, 1));
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.cons/copy_alloc.pass.cpp b/test/std/containers/associative/map/map.cons/copy_alloc.pass.cpp
new file mode 100644
index 000000000000..fcbe5976d6da
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/copy_alloc.pass.cpp
@@ -0,0 +1,95 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// map(const map& m, const allocator_type& a);
+
+#include <map>
+#include <cassert>
+
+#include "../../../test_compare.h"
+#include "test_allocator.h"
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ };
+ typedef test_compare<std::less<int> > C;
+ typedef test_allocator<V> A;
+ std::map<int, double, C, A> mo(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5), A(7));
+ std::map<int, double, C, A> m(mo, A(3));
+ assert(m.get_allocator() == A(3));
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+
+ assert(mo.get_allocator() == A(7));
+ assert(mo.key_comp() == C(5));
+ assert(mo.size() == 3);
+ assert(distance(mo.begin(), mo.end()) == 3);
+ assert(*mo.begin() == V(1, 1));
+ assert(*next(mo.begin()) == V(2, 1));
+ assert(*next(mo.begin(), 2) == V(3, 1));
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ };
+ typedef test_compare<std::less<int> > C;
+ typedef min_allocator<V> A;
+ std::map<int, double, C, A> mo(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5), A());
+ std::map<int, double, C, A> m(mo, A());
+ assert(m.get_allocator() == A());
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+
+ assert(mo.get_allocator() == A());
+ assert(mo.key_comp() == C(5));
+ assert(mo.size() == 3);
+ assert(distance(mo.begin(), mo.end()) == 3);
+ assert(*mo.begin() == V(1, 1));
+ assert(*next(mo.begin()) == V(2, 1));
+ assert(*next(mo.begin(), 2) == V(3, 1));
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp b/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp
new file mode 100644
index 000000000000..a1bcb30f4294
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp
@@ -0,0 +1,182 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// map& operator=(const map& m);
+
+#include <map>
+#include <cassert>
+
+#include "../../../test_compare.h"
+#include "test_allocator.h"
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2)
+ };
+ typedef test_compare<std::less<int> > C;
+ typedef test_allocator<V> A;
+ std::map<int, double, C, A> mo(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5), A(2));
+ std::map<int, double, C, A> m(ar, ar+sizeof(ar)/sizeof(ar[0])/2, C(3), A(7));
+ m = mo;
+ assert(m.get_allocator() == A(7));
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+
+ assert(mo.get_allocator() == A(2));
+ assert(mo.key_comp() == C(5));
+ assert(mo.size() == 3);
+ assert(distance(mo.begin(), mo.end()) == 3);
+ assert(*mo.begin() == V(1, 1));
+ assert(*next(mo.begin()) == V(2, 1));
+ assert(*next(mo.begin(), 2) == V(3, 1));
+ }
+ {
+ typedef std::pair<const int, double> V;
+ const V ar[] =
+ {
+ V(1, 1),
+ V(2, 1),
+ V(3, 1),
+ };
+ std::map<int, double> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ std::map<int, double> *p = &m;
+ m = *p;
+
+ assert(m.size() == 3);
+ assert(std::equal(m.begin(), m.end(), ar));
+ }
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2)
+ };
+ typedef test_compare<std::less<int> > C;
+ typedef other_allocator<V> A;
+ std::map<int, double, C, A> mo(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5), A(2));
+ std::map<int, double, C, A> m(ar, ar+sizeof(ar)/sizeof(ar[0])/2, C(3), A(7));
+ m = mo;
+ assert(m.get_allocator() == A(2));
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+
+ assert(mo.get_allocator() == A(2));
+ assert(mo.key_comp() == C(5));
+ assert(mo.size() == 3);
+ assert(distance(mo.begin(), mo.end()) == 3);
+ assert(*mo.begin() == V(1, 1));
+ assert(*next(mo.begin()) == V(2, 1));
+ assert(*next(mo.begin(), 2) == V(3, 1));
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2)
+ };
+ typedef test_compare<std::less<int> > C;
+ typedef min_allocator<V> A;
+ std::map<int, double, C, A> mo(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5), A());
+ std::map<int, double, C, A> m(ar, ar+sizeof(ar)/sizeof(ar[0])/2, C(3), A());
+ m = mo;
+ assert(m.get_allocator() == A());
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+
+ assert(mo.get_allocator() == A());
+ assert(mo.key_comp() == C(5));
+ assert(mo.size() == 3);
+ assert(distance(mo.begin(), mo.end()) == 3);
+ assert(*mo.begin() == V(1, 1));
+ assert(*next(mo.begin()) == V(2, 1));
+ assert(*next(mo.begin(), 2) == V(3, 1));
+ }
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2)
+ };
+ typedef test_compare<std::less<int> > C;
+ typedef min_allocator<V> A;
+ std::map<int, double, C, A> mo(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5), A());
+ std::map<int, double, C, A> m(ar, ar+sizeof(ar)/sizeof(ar[0])/2, C(3), A());
+ m = mo;
+ assert(m.get_allocator() == A());
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+
+ assert(mo.get_allocator() == A());
+ assert(mo.key_comp() == C(5));
+ assert(mo.size() == 3);
+ assert(distance(mo.begin(), mo.end()) == 3);
+ assert(*mo.begin() == V(1, 1));
+ assert(*next(mo.begin()) == V(2, 1));
+ assert(*next(mo.begin(), 2) == V(3, 1));
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.cons/default.pass.cpp b/test/std/containers/associative/map/map.cons/default.pass.cpp
new file mode 100644
index 000000000000..1832a32fffb3
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/default.pass.cpp
@@ -0,0 +1,40 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// map();
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ std::map<int, double> m;
+ assert(m.empty());
+ assert(m.begin() == m.end());
+ }
+#if __cplusplus >= 201103L
+ {
+ std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> m;
+ assert(m.empty());
+ assert(m.begin() == m.end());
+ }
+ {
+ std::map<int, double> m = {};
+ assert(m.empty());
+ assert(m.begin() == m.end());
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp b/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp
new file mode 100644
index 000000000000..1f11fc9582ed
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp
@@ -0,0 +1,53 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// map()
+// noexcept(
+// is_nothrow_default_constructible<allocator_type>::value &&
+// is_nothrow_default_constructible<key_compare>::value &&
+// is_nothrow_copy_constructible<key_compare>::value);
+
+// This tests a conforming extension
+
+#include <map>
+#include <cassert>
+
+#include "MoveOnly.h"
+#include "test_allocator.h"
+
+template <class T>
+struct some_comp
+{
+ typedef T value_type;
+ some_comp();
+};
+
+int main()
+{
+#if __has_feature(cxx_noexcept)
+ {
+ typedef std::map<MoveOnly, MoveOnly> C;
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
+ }
+ {
+ typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
+ }
+ {
+ typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
+ static_assert(!std::is_nothrow_default_constructible<C>::value, "");
+ }
+ {
+ typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
+ static_assert(!std::is_nothrow_default_constructible<C>::value, "");
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.cons/default_recursive.pass.cpp b/test/std/containers/associative/map/map.cons/default_recursive.pass.cpp
new file mode 100644
index 000000000000..b4b72725fd6e
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/default_recursive.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// map();
+
+#include <map>
+
+struct X
+{
+ std::map<int, X> m;
+ std::map<int, X>::iterator i;
+ std::map<int, X>::const_iterator ci;
+ std::map<int, X>::reverse_iterator ri;
+ std::map<int, X>::const_reverse_iterator cri;
+};
+
+int main()
+{
+}
diff --git a/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp b/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp
new file mode 100644
index 000000000000..eed26d3a6136
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp
@@ -0,0 +1,51 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// ~map() // implied noexcept;
+
+#include <map>
+#include <cassert>
+
+#include "MoveOnly.h"
+#include "test_allocator.h"
+
+#if __has_feature(cxx_noexcept)
+
+template <class T>
+struct some_comp
+{
+ typedef T value_type;
+ ~some_comp() noexcept(false);
+};
+
+#endif
+
+int main()
+{
+#if __has_feature(cxx_noexcept)
+ {
+ typedef std::map<MoveOnly, MoveOnly> C;
+ static_assert(std::is_nothrow_destructible<C>::value, "");
+ }
+ {
+ typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
+ static_assert(std::is_nothrow_destructible<C>::value, "");
+ }
+ {
+ typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
+ static_assert(std::is_nothrow_destructible<C>::value, "");
+ }
+ {
+ typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.cons/initializer_list.pass.cpp b/test/std/containers/associative/map/map.cons/initializer_list.pass.cpp
new file mode 100644
index 000000000000..196943653a14
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/initializer_list.pass.cpp
@@ -0,0 +1,67 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// map(initializer_list<value_type> il);
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+ {
+ typedef std::pair<const int, double> V;
+ std::map<int, double> m =
+ {
+ {1, 1},
+ {1, 1.5},
+ {1, 2},
+ {2, 1},
+ {2, 1.5},
+ {2, 2},
+ {3, 1},
+ {3, 1.5},
+ {3, 2}
+ };
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ std::map<int, double, std::less<int>, min_allocator<V>> m =
+ {
+ {1, 1},
+ {1, 1.5},
+ {1, 2},
+ {2, 1},
+ {2, 1.5},
+ {2, 2},
+ {3, 1},
+ {3, 1.5},
+ {3, 2}
+ };
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ }
+#endif
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+}
diff --git a/test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp b/test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp
new file mode 100644
index 000000000000..08f8a529f030
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp
@@ -0,0 +1,69 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// map(initializer_list<value_type> il, const key_compare& comp);
+
+#include <map>
+#include <cassert>
+#include "../../../test_compare.h"
+#include "min_allocator.h"
+
+int main()
+{
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+ {
+ typedef std::pair<const int, double> V;
+ typedef test_compare<std::less<int> > C;
+ std::map<int, double, C> m({
+ {1, 1},
+ {1, 1.5},
+ {1, 2},
+ {2, 1},
+ {2, 1.5},
+ {2, 2},
+ {3, 1},
+ {3, 1.5},
+ {3, 2}
+ }, C(3));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ assert(m.key_comp() == C(3));
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ typedef test_compare<std::less<int> > C;
+ std::map<int, double, C, min_allocator<std::pair<const int, double>>> m({
+ {1, 1},
+ {1, 1.5},
+ {1, 2},
+ {2, 1},
+ {2, 1.5},
+ {2, 2},
+ {3, 1},
+ {3, 1.5},
+ {3, 2}
+ }, C(3));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ assert(m.key_comp() == C(3));
+ }
+#endif
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+}
diff --git a/test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp b/test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp
new file mode 100644
index 000000000000..765428a631e5
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp
@@ -0,0 +1,100 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// map(initializer_list<value_type> il, const key_compare& comp, const allocator_type& a);
+
+#include <map>
+#include <cassert>
+#include "../../../test_compare.h"
+#include "test_allocator.h"
+#include "min_allocator.h"
+
+int main()
+{
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+ {
+ typedef std::pair<const int, double> V;
+ typedef test_compare<std::less<int> > C;
+ typedef test_allocator<std::pair<const int, double> > A;
+ std::map<int, double, C, A> m({
+ {1, 1},
+ {1, 1.5},
+ {1, 2},
+ {2, 1},
+ {2, 1.5},
+ {2, 2},
+ {3, 1},
+ {3, 1.5},
+ {3, 2}
+ }, C(3), A(6));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ assert(m.key_comp() == C(3));
+ assert(m.get_allocator() == A(6));
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ typedef test_compare<std::less<int> > C;
+ typedef min_allocator<std::pair<const int, double> > A;
+ std::map<int, double, C, A> m({
+ {1, 1},
+ {1, 1.5},
+ {1, 2},
+ {2, 1},
+ {2, 1.5},
+ {2, 2},
+ {3, 1},
+ {3, 1.5},
+ {3, 2}
+ }, C(3), A());
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ assert(m.key_comp() == C(3));
+ assert(m.get_allocator() == A());
+ }
+#if _LIBCPP_STD_VER > 11
+ {
+ typedef std::pair<const int, double> V;
+ typedef min_allocator<V> A;
+ typedef test_compare<std::less<int> > C;
+ typedef std::map<int, double, C, A> M;
+ A a;
+ M m ({ {1, 1},
+ {1, 1.5},
+ {1, 2},
+ {2, 1},
+ {2, 1.5},
+ {2, 2},
+ {3, 1},
+ {3, 1.5},
+ {3, 2}
+ }, a);
+
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ assert(m.get_allocator() == a);
+ }
+#endif
+#endif
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+}
diff --git a/test/std/containers/associative/map/map.cons/iter_iter.pass.cpp b/test/std/containers/associative/map/map.cons/iter_iter.pass.cpp
new file mode 100644
index 000000000000..c1029af6889e
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/iter_iter.pass.cpp
@@ -0,0 +1,68 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// template <class InputIterator>
+// map(InputIterator first, InputIterator last);
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ };
+ std::map<int, double> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ };
+ std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.cons/iter_iter_comp.pass.cpp b/test/std/containers/associative/map/map.cons/iter_iter_comp.pass.cpp
new file mode 100644
index 000000000000..837fa8c6cdea
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/iter_iter_comp.pass.cpp
@@ -0,0 +1,73 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// template <class InputIterator>
+// map(InputIterator first, InputIterator last, const key_compare& comp);
+
+#include <map>
+#include <cassert>
+
+#include "../../../test_compare.h"
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ };
+ typedef test_compare<std::less<int> > C;
+ std::map<int, double, C> m(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5));
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ };
+ typedef test_compare<std::less<int> > C;
+ std::map<int, double, C, min_allocator<std::pair<const int, double>>> m(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5));
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp b/test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp
new file mode 100644
index 000000000000..67fb5d644762
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp
@@ -0,0 +1,108 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// template <class InputIterator>
+// map(InputIterator first, InputIterator last,
+// const key_compare& comp, const allocator_type& a);
+
+#include <map>
+#include <cassert>
+
+#include "../../../test_compare.h"
+#include "test_allocator.h"
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ };
+ typedef test_compare<std::less<int> > C;
+ typedef test_allocator<V> A;
+ std::map<int, double, C, A> m(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5), A(7));
+ assert(m.get_allocator() == A(7));
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ };
+ typedef test_compare<std::less<int> > C;
+ typedef min_allocator<V> A;
+ std::map<int, double, C, A> m(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5), A());
+ assert(m.get_allocator() == A());
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ }
+#if _LIBCPP_STD_VER > 11
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ };
+ typedef std::pair<const int, double> V;
+ typedef min_allocator<V> A;
+ typedef test_compare<std::less<int> > C;
+ A a;
+ std::map<int, double, C, A> m(ar, ar+sizeof(ar)/sizeof(ar[0]), a );
+
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ assert(m.get_allocator() == a);
+ }
+#endif
+#endif
+}
diff --git a/test/std/containers/associative/map/map.cons/move.pass.cpp b/test/std/containers/associative/map/map.cons/move.pass.cpp
new file mode 100644
index 000000000000..c06f2ee5021b
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/move.pass.cpp
@@ -0,0 +1,120 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// map(map&& m);
+
+#include <map>
+#include <cassert>
+
+#include "../../../test_compare.h"
+#include "test_allocator.h"
+#include "min_allocator.h"
+
+int main()
+{
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ typedef std::pair<const int, double> V;
+ {
+ typedef test_compare<std::less<int> > C;
+ typedef test_allocator<V> A;
+ std::map<int, double, C, A> mo(C(5), A(7));
+ std::map<int, double, C, A> m = std::move(mo);
+ assert(m.get_allocator() == A(7));
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 0);
+ assert(distance(m.begin(), m.end()) == 0);
+
+ assert(mo.get_allocator() == A(7));
+ assert(mo.key_comp() == C(5));
+ assert(mo.size() == 0);
+ assert(distance(mo.begin(), mo.end()) == 0);
+ }
+ {
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ };
+ typedef test_compare<std::less<int> > C;
+ typedef test_allocator<V> A;
+ std::map<int, double, C, A> mo(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5), A(7));
+ std::map<int, double, C, A> m = std::move(mo);
+ assert(m.get_allocator() == A(7));
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+
+ assert(mo.get_allocator() == A(7));
+ assert(mo.key_comp() == C(5));
+ assert(mo.size() == 0);
+ assert(distance(mo.begin(), mo.end()) == 0);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef test_compare<std::less<int> > C;
+ typedef min_allocator<V> A;
+ std::map<int, double, C, A> mo(C(5), A());
+ std::map<int, double, C, A> m = std::move(mo);
+ assert(m.get_allocator() == A());
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 0);
+ assert(distance(m.begin(), m.end()) == 0);
+
+ assert(mo.get_allocator() == A());
+ assert(mo.key_comp() == C(5));
+ assert(mo.size() == 0);
+ assert(distance(mo.begin(), mo.end()) == 0);
+ }
+ {
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ };
+ typedef test_compare<std::less<int> > C;
+ typedef min_allocator<V> A;
+ std::map<int, double, C, A> mo(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5), A());
+ std::map<int, double, C, A> m = std::move(mo);
+ assert(m.get_allocator() == A());
+ assert(m.key_comp() == C(5));
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+
+ assert(mo.get_allocator() == A());
+ assert(mo.key_comp() == C(5));
+ assert(mo.size() == 0);
+ assert(distance(mo.begin(), mo.end()) == 0);
+ }
+#endif
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+}
diff --git a/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp b/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp
new file mode 100644
index 000000000000..e5d43f266c08
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp
@@ -0,0 +1,234 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// map(map&& m, const allocator_type& a);
+
+#include <map>
+#include <cassert>
+
+#include "MoveOnly.h"
+#include "../../../test_compare.h"
+#include "test_allocator.h"
+#include "min_allocator.h"
+#include "Counter.h"
+
+int main()
+{
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ {
+ typedef std::pair<MoveOnly, MoveOnly> V;
+ typedef std::pair<const MoveOnly, MoveOnly> VC;
+ typedef test_compare<std::less<MoveOnly> > C;
+ typedef test_allocator<VC> A;
+ typedef std::map<MoveOnly, MoveOnly, C, A> M;
+ typedef std::move_iterator<V*> I;
+ V a1[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ M m1(I(a1), I(a1+sizeof(a1)/sizeof(a1[0])), C(5), A(7));
+ V a2[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ M m2(I(a2), I(a2+sizeof(a2)/sizeof(a2[0])), C(5), A(7));
+ M m3(std::move(m1), A(7));
+ assert(m3 == m2);
+ assert(m3.get_allocator() == A(7));
+ assert(m3.key_comp() == C(5));
+ assert(m1.empty());
+ }
+ {
+ typedef std::pair<MoveOnly, MoveOnly> V;
+ typedef std::pair<const MoveOnly, MoveOnly> VC;
+ typedef test_compare<std::less<MoveOnly> > C;
+ typedef test_allocator<VC> A;
+ typedef std::map<MoveOnly, MoveOnly, C, A> M;
+ typedef std::move_iterator<V*> I;
+ V a1[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ M m1(I(a1), I(a1+sizeof(a1)/sizeof(a1[0])), C(5), A(7));
+ V a2[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ M m2(I(a2), I(a2+sizeof(a2)/sizeof(a2[0])), C(5), A(7));
+ M m3(std::move(m1), A(5));
+ assert(m3 == m2);
+ assert(m3.get_allocator() == A(5));
+ assert(m3.key_comp() == C(5));
+ assert(m1.empty());
+ }
+ {
+ typedef std::pair<MoveOnly, MoveOnly> V;
+ typedef std::pair<const MoveOnly, MoveOnly> VC;
+ typedef test_compare<std::less<MoveOnly> > C;
+ typedef other_allocator<VC> A;
+ typedef std::map<MoveOnly, MoveOnly, C, A> M;
+ typedef std::move_iterator<V*> I;
+ V a1[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ M m1(I(a1), I(a1+sizeof(a1)/sizeof(a1[0])), C(5), A(7));
+ V a2[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ M m2(I(a2), I(a2+sizeof(a2)/sizeof(a2[0])), C(5), A(7));
+ M m3(std::move(m1), A(5));
+ assert(m3 == m2);
+ assert(m3.get_allocator() == A(5));
+ assert(m3.key_comp() == C(5));
+ assert(m1.empty());
+ }
+ {
+ typedef Counter<int> T;
+ typedef std::pair<int, T> V;
+ typedef std::pair<const int, T> VC;
+ typedef test_allocator<VC> A;
+ typedef std::less<int> C;
+ typedef std::map<const int, T, C, A> M;
+ typedef V* I;
+ Counter_base::gConstructed = 0;
+ {
+ V a1[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ const size_t num = sizeof(a1)/sizeof(a1[0]);
+ assert(Counter_base::gConstructed == num);
+
+ M m1(I(a1), I(a1+num), C(), A());
+ assert(Counter_base::gConstructed == num+3);
+
+ M m2(m1);
+ assert(m2 == m1);
+ assert(Counter_base::gConstructed == num+6);
+
+ M m3(std::move(m1), A());
+ assert(m3 == m2);
+ assert(m1.empty());
+ assert(Counter_base::gConstructed == num+6);
+
+ {
+ M m4(std::move(m2), A(5));
+ assert(Counter_base::gConstructed == num+6);
+ assert(m4 == m3);
+ assert(m2.empty());
+ }
+ assert(Counter_base::gConstructed == num+3);
+ }
+ assert(Counter_base::gConstructed == 0);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<MoveOnly, MoveOnly> V;
+ typedef std::pair<const MoveOnly, MoveOnly> VC;
+ typedef test_compare<std::less<MoveOnly> > C;
+ typedef min_allocator<VC> A;
+ typedef std::map<MoveOnly, MoveOnly, C, A> M;
+ typedef std::move_iterator<V*> I;
+ V a1[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ M m1(I(a1), I(a1+sizeof(a1)/sizeof(a1[0])), C(5), A());
+ V a2[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ M m2(I(a2), I(a2+sizeof(a2)/sizeof(a2[0])), C(5), A());
+ M m3(std::move(m1), A());
+ assert(m3 == m2);
+ assert(m3.get_allocator() == A());
+ assert(m3.key_comp() == C(5));
+ assert(m1.empty());
+ }
+#endif
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+}
diff --git a/test/std/containers/associative/map/map.cons/move_assign.pass.cpp b/test/std/containers/associative/map/map.cons/move_assign.pass.cpp
new file mode 100644
index 000000000000..8ae8265cdc12
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/move_assign.pass.cpp
@@ -0,0 +1,190 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// map& operator=(map&& m);
+
+#include <map>
+#include <cassert>
+
+#include "MoveOnly.h"
+#include "../../../test_compare.h"
+#include "test_allocator.h"
+#include "min_allocator.h"
+
+int main()
+{
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ {
+ typedef std::pair<MoveOnly, MoveOnly> V;
+ typedef std::pair<const MoveOnly, MoveOnly> VC;
+ typedef test_compare<std::less<MoveOnly> > C;
+ typedef test_allocator<VC> A;
+ typedef std::map<MoveOnly, MoveOnly, C, A> M;
+ typedef std::move_iterator<V*> I;
+ V a1[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ M m1(I(a1), I(a1+sizeof(a1)/sizeof(a1[0])), C(5), A(7));
+ V a2[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ M m2(I(a2), I(a2+sizeof(a2)/sizeof(a2[0])), C(5), A(7));
+ M m3(C(3), A(7));
+ m3 = std::move(m1);
+ assert(m3 == m2);
+ assert(m3.get_allocator() == A(7));
+ assert(m3.key_comp() == C(5));
+ assert(m1.empty());
+ }
+ {
+ typedef std::pair<MoveOnly, MoveOnly> V;
+ typedef std::pair<const MoveOnly, MoveOnly> VC;
+ typedef test_compare<std::less<MoveOnly> > C;
+ typedef test_allocator<VC> A;
+ typedef std::map<MoveOnly, MoveOnly, C, A> M;
+ typedef std::move_iterator<V*> I;
+ V a1[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ M m1(I(a1), I(a1+sizeof(a1)/sizeof(a1[0])), C(5), A(7));
+ V a2[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ M m2(I(a2), I(a2+sizeof(a2)/sizeof(a2[0])), C(5), A(7));
+ M m3(C(3), A(5));
+ m3 = std::move(m1);
+ assert(m3 == m2);
+ assert(m3.get_allocator() == A(5));
+ assert(m3.key_comp() == C(5));
+ assert(m1.empty());
+ }
+ {
+ typedef std::pair<MoveOnly, MoveOnly> V;
+ typedef std::pair<const MoveOnly, MoveOnly> VC;
+ typedef test_compare<std::less<MoveOnly> > C;
+ typedef other_allocator<VC> A;
+ typedef std::map<MoveOnly, MoveOnly, C, A> M;
+ typedef std::move_iterator<V*> I;
+ V a1[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ M m1(I(a1), I(a1+sizeof(a1)/sizeof(a1[0])), C(5), A(7));
+ V a2[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ M m2(I(a2), I(a2+sizeof(a2)/sizeof(a2[0])), C(5), A(7));
+ M m3(C(3), A(5));
+ m3 = std::move(m1);
+ assert(m3 == m2);
+ assert(m3.get_allocator() == A(7));
+ assert(m3.key_comp() == C(5));
+ assert(m1.empty());
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<MoveOnly, MoveOnly> V;
+ typedef std::pair<const MoveOnly, MoveOnly> VC;
+ typedef test_compare<std::less<MoveOnly> > C;
+ typedef min_allocator<VC> A;
+ typedef std::map<MoveOnly, MoveOnly, C, A> M;
+ typedef std::move_iterator<V*> I;
+ V a1[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ M m1(I(a1), I(a1+sizeof(a1)/sizeof(a1[0])), C(5), A());
+ V a2[] =
+ {
+ V(1, 1),
+ V(1, 2),
+ V(1, 3),
+ V(2, 1),
+ V(2, 2),
+ V(2, 3),
+ V(3, 1),
+ V(3, 2),
+ V(3, 3)
+ };
+ M m2(I(a2), I(a2+sizeof(a2)/sizeof(a2[0])), C(5), A());
+ M m3(C(3), A());
+ m3 = std::move(m1);
+ assert(m3 == m2);
+ assert(m3.get_allocator() == A());
+ assert(m3.key_comp() == C(5));
+ assert(m1.empty());
+ }
+#endif
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+}
diff --git a/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp b/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp
new file mode 100644
index 000000000000..f80b1d323178
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp
@@ -0,0 +1,53 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// map& operator=(map&& c)
+// noexcept(
+// allocator_type::propagate_on_container_move_assignment::value &&
+// is_nothrow_move_assignable<allocator_type>::value &&
+// is_nothrow_move_assignable<key_compare>::value);
+
+// This tests a conforming extension
+
+#include <map>
+#include <cassert>
+
+#include "MoveOnly.h"
+#include "test_allocator.h"
+
+template <class T>
+struct some_comp
+{
+ typedef T value_type;
+ some_comp& operator=(const some_comp&);
+};
+
+int main()
+{
+#if __has_feature(cxx_noexcept)
+ {
+ typedef std::map<MoveOnly, MoveOnly> C;
+ static_assert(std::is_nothrow_move_assignable<C>::value, "");
+ }
+ {
+ typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
+ static_assert(!std::is_nothrow_move_assignable<C>::value, "");
+ }
+ {
+ typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
+ static_assert(std::is_nothrow_move_assignable<C>::value, "");
+ }
+ {
+ typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
+ static_assert(!std::is_nothrow_move_assignable<C>::value, "");
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp b/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp
new file mode 100644
index 000000000000..9347b8329ae3
--- /dev/null
+++ b/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp
@@ -0,0 +1,51 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// map(map&&)
+// noexcept(is_nothrow_move_constructible<allocator_type>::value &&
+// is_nothrow_move_constructible<key_compare>::value);
+
+// This tests a conforming extension
+
+#include <map>
+#include <cassert>
+
+#include "MoveOnly.h"
+#include "test_allocator.h"
+
+template <class T>
+struct some_comp
+{
+ typedef T value_type;
+ some_comp(const some_comp&);
+};
+
+int main()
+{
+#if __has_feature(cxx_noexcept)
+ {
+ typedef std::map<MoveOnly, MoveOnly> C;
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
+ }
+ {
+ typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
+ }
+ {
+ typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
+ }
+ {
+ typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
+ static_assert(!std::is_nothrow_move_constructible<C>::value, "");
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.modifiers/clear.pass.cpp b/test/std/containers/associative/map/map.modifiers/clear.pass.cpp
new file mode 100644
index 000000000000..c37499df307a
--- /dev/null
+++ b/test/std/containers/associative/map/map.modifiers/clear.pass.cpp
@@ -0,0 +1,63 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// void clear();
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::map<int, double> M;
+ typedef std::pair<int, double> P;
+ P ar[] =
+ {
+ P(1, 1.5),
+ P(2, 2.5),
+ P(3, 3.5),
+ P(4, 4.5),
+ P(5, 5.5),
+ P(6, 6.5),
+ P(7, 7.5),
+ P(8, 8.5),
+ };
+ M m(ar, ar + sizeof(ar)/sizeof(ar[0]));
+ assert(m.size() == 8);
+ m.clear();
+ assert(m.size() == 0);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
+ typedef std::pair<int, double> P;
+ P ar[] =
+ {
+ P(1, 1.5),
+ P(2, 2.5),
+ P(3, 3.5),
+ P(4, 4.5),
+ P(5, 5.5),
+ P(6, 6.5),
+ P(7, 7.5),
+ P(8, 8.5),
+ };
+ M m(ar, ar + sizeof(ar)/sizeof(ar[0]));
+ assert(m.size() == 8);
+ m.clear();
+ assert(m.size() == 0);
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.modifiers/emplace.pass.cpp b/test/std/containers/associative/map/map.modifiers/emplace.pass.cpp
new file mode 100644
index 000000000000..81846c6647c6
--- /dev/null
+++ b/test/std/containers/associative/map/map.modifiers/emplace.pass.cpp
@@ -0,0 +1,165 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// template <class... Args>
+// pair<iterator, bool> emplace(Args&&... args);
+
+#include <map>
+#include <cassert>
+#include <tuple>
+
+#include "../../../Emplaceable.h"
+#include "DefaultOnly.h"
+#include "min_allocator.h"
+
+int main()
+{
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ {
+ typedef std::map<int, DefaultOnly> M;
+ typedef std::pair<M::iterator, bool> R;
+ M m;
+ assert(DefaultOnly::count == 0);
+ R r = m.emplace();
+ assert(r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 1);
+ assert(m.begin()->first == 0);
+ assert(m.begin()->second == DefaultOnly());
+ assert(DefaultOnly::count == 1);
+ r = m.emplace(std::piecewise_construct, std::forward_as_tuple(1),
+ std::forward_as_tuple());
+ assert(r.second);
+ assert(r.first == next(m.begin()));
+ assert(m.size() == 2);
+ assert(next(m.begin())->first == 1);
+ assert(next(m.begin())->second == DefaultOnly());
+ assert(DefaultOnly::count == 2);
+ r = m.emplace(std::piecewise_construct, std::forward_as_tuple(1),
+ std::forward_as_tuple());
+ assert(!r.second);
+ assert(r.first == next(m.begin()));
+ assert(m.size() == 2);
+ assert(next(m.begin())->first == 1);
+ assert(next(m.begin())->second == DefaultOnly());
+ assert(DefaultOnly::count == 2);
+ }
+ assert(DefaultOnly::count == 0);
+ {
+ typedef std::map<int, Emplaceable> M;
+ typedef std::pair<M::iterator, bool> R;
+ M m;
+ R r = m.emplace(std::piecewise_construct, std::forward_as_tuple(2),
+ std::forward_as_tuple());
+ assert(r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == Emplaceable());
+ r = m.emplace(std::piecewise_construct, std::forward_as_tuple(1),
+ std::forward_as_tuple(2, 3.5));
+ assert(r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 2);
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == Emplaceable(2, 3.5));
+ r = m.emplace(std::piecewise_construct, std::forward_as_tuple(1),
+ std::forward_as_tuple(2, 3.5));
+ assert(!r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 2);
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == Emplaceable(2, 3.5));
+ }
+ {
+ typedef std::map<int, double> M;
+ typedef std::pair<M::iterator, bool> R;
+ M m;
+ R r = m.emplace(M::value_type(2, 3.5));
+ assert(r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 3.5);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::map<int, DefaultOnly, std::less<int>, min_allocator<std::pair<const int, DefaultOnly>>> M;
+ typedef std::pair<M::iterator, bool> R;
+ M m;
+ assert(DefaultOnly::count == 0);
+ R r = m.emplace();
+ assert(r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 1);
+ assert(m.begin()->first == 0);
+ assert(m.begin()->second == DefaultOnly());
+ assert(DefaultOnly::count == 1);
+ r = m.emplace(std::piecewise_construct, std::forward_as_tuple(1),
+ std::forward_as_tuple());
+ assert(r.second);
+ assert(r.first == next(m.begin()));
+ assert(m.size() == 2);
+ assert(next(m.begin())->first == 1);
+ assert(next(m.begin())->second == DefaultOnly());
+ assert(DefaultOnly::count == 2);
+ r = m.emplace(std::piecewise_construct, std::forward_as_tuple(1),
+ std::forward_as_tuple());
+ assert(!r.second);
+ assert(r.first == next(m.begin()));
+ assert(m.size() == 2);
+ assert(next(m.begin())->first == 1);
+ assert(next(m.begin())->second == DefaultOnly());
+ assert(DefaultOnly::count == 2);
+ }
+ assert(DefaultOnly::count == 0);
+ {
+ typedef std::map<int, Emplaceable, std::less<int>, min_allocator<std::pair<const int, Emplaceable>>> M;
+ typedef std::pair<M::iterator, bool> R;
+ M m;
+ R r = m.emplace(std::piecewise_construct, std::forward_as_tuple(2),
+ std::forward_as_tuple());
+ assert(r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == Emplaceable());
+ r = m.emplace(std::piecewise_construct, std::forward_as_tuple(1),
+ std::forward_as_tuple(2, 3.5));
+ assert(r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 2);
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == Emplaceable(2, 3.5));
+ r = m.emplace(std::piecewise_construct, std::forward_as_tuple(1),
+ std::forward_as_tuple(2, 3.5));
+ assert(!r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 2);
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == Emplaceable(2, 3.5));
+ }
+ {
+ typedef std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
+ typedef std::pair<M::iterator, bool> R;
+ M m;
+ R r = m.emplace(M::value_type(2, 3.5));
+ assert(r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 3.5);
+ }
+#endif
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+}
diff --git a/test/std/containers/associative/map/map.modifiers/emplace_hint.pass.cpp b/test/std/containers/associative/map/map.modifiers/emplace_hint.pass.cpp
new file mode 100644
index 000000000000..15f74b17e786
--- /dev/null
+++ b/test/std/containers/associative/map/map.modifiers/emplace_hint.pass.cpp
@@ -0,0 +1,160 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// template <class... Args>
+// iterator emplace_hint(const_iterator position, Args&&... args);
+
+#include <map>
+#include <cassert>
+
+#include "../../../Emplaceable.h"
+#include "DefaultOnly.h"
+#include "min_allocator.h"
+
+int main()
+{
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ {
+ typedef std::map<int, DefaultOnly> M;
+ typedef M::iterator R;
+ M m;
+ assert(DefaultOnly::count == 0);
+ R r = m.emplace_hint(m.end());
+ assert(r == m.begin());
+ assert(m.size() == 1);
+ assert(m.begin()->first == 0);
+ assert(m.begin()->second == DefaultOnly());
+ assert(DefaultOnly::count == 1);
+ r = m.emplace_hint(m.end(), std::piecewise_construct,
+ std::forward_as_tuple(1),
+ std::forward_as_tuple());
+ assert(r == next(m.begin()));
+ assert(m.size() == 2);
+ assert(next(m.begin())->first == 1);
+ assert(next(m.begin())->second == DefaultOnly());
+ assert(DefaultOnly::count == 2);
+ r = m.emplace_hint(m.end(), std::piecewise_construct,
+ std::forward_as_tuple(1),
+ std::forward_as_tuple());
+ assert(r == next(m.begin()));
+ assert(m.size() == 2);
+ assert(next(m.begin())->first == 1);
+ assert(next(m.begin())->second == DefaultOnly());
+ assert(DefaultOnly::count == 2);
+ }
+ assert(DefaultOnly::count == 0);
+ {
+ typedef std::map<int, Emplaceable> M;
+ typedef M::iterator R;
+ M m;
+ R r = m.emplace_hint(m.end(), std::piecewise_construct,
+ std::forward_as_tuple(2),
+ std::forward_as_tuple());
+ assert(r == m.begin());
+ assert(m.size() == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == Emplaceable());
+ r = m.emplace_hint(m.end(), std::piecewise_construct,
+ std::forward_as_tuple(1),
+ std::forward_as_tuple(2, 3.5));
+ assert(r == m.begin());
+ assert(m.size() == 2);
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == Emplaceable(2, 3.5));
+ r = m.emplace_hint(m.end(), std::piecewise_construct,
+ std::forward_as_tuple(1),
+ std::forward_as_tuple(2, 3.5));
+ assert(r == m.begin());
+ assert(m.size() == 2);
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == Emplaceable(2, 3.5));
+ }
+ {
+ typedef std::map<int, double> M;
+ typedef M::iterator R;
+ M m;
+ R r = m.emplace_hint(m.end(), M::value_type(2, 3.5));
+ assert(r == m.begin());
+ assert(m.size() == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 3.5);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::map<int, DefaultOnly, std::less<int>, min_allocator<std::pair<const int, DefaultOnly>>> M;
+ typedef M::iterator R;
+ M m;
+ assert(DefaultOnly::count == 0);
+ R r = m.emplace_hint(m.end());
+ assert(r == m.begin());
+ assert(m.size() == 1);
+ assert(m.begin()->first == 0);
+ assert(m.begin()->second == DefaultOnly());
+ assert(DefaultOnly::count == 1);
+ r = m.emplace_hint(m.end(), std::piecewise_construct,
+ std::forward_as_tuple(1),
+ std::forward_as_tuple());
+ assert(r == next(m.begin()));
+ assert(m.size() == 2);
+ assert(next(m.begin())->first == 1);
+ assert(next(m.begin())->second == DefaultOnly());
+ assert(DefaultOnly::count == 2);
+ r = m.emplace_hint(m.end(), std::piecewise_construct,
+ std::forward_as_tuple(1),
+ std::forward_as_tuple());
+ assert(r == next(m.begin()));
+ assert(m.size() == 2);
+ assert(next(m.begin())->first == 1);
+ assert(next(m.begin())->second == DefaultOnly());
+ assert(DefaultOnly::count == 2);
+ }
+ assert(DefaultOnly::count == 0);
+ {
+ typedef std::map<int, Emplaceable, std::less<int>, min_allocator<std::pair<const int, Emplaceable>>> M;
+ typedef M::iterator R;
+ M m;
+ R r = m.emplace_hint(m.end(), std::piecewise_construct,
+ std::forward_as_tuple(2),
+ std::forward_as_tuple());
+ assert(r == m.begin());
+ assert(m.size() == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == Emplaceable());
+ r = m.emplace_hint(m.end(), std::piecewise_construct,
+ std::forward_as_tuple(1),
+ std::forward_as_tuple(2, 3.5));
+ assert(r == m.begin());
+ assert(m.size() == 2);
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == Emplaceable(2, 3.5));
+ r = m.emplace_hint(m.end(), std::piecewise_construct,
+ std::forward_as_tuple(1),
+ std::forward_as_tuple(2, 3.5));
+ assert(r == m.begin());
+ assert(m.size() == 2);
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == Emplaceable(2, 3.5));
+ }
+ {
+ typedef std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
+ typedef M::iterator R;
+ M m;
+ R r = m.emplace_hint(m.end(), M::value_type(2, 3.5));
+ assert(r == m.begin());
+ assert(m.size() == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 3.5);
+ }
+#endif
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+}
diff --git a/test/std/containers/associative/map/map.modifiers/erase_iter.pass.cpp b/test/std/containers/associative/map/map.modifiers/erase_iter.pass.cpp
new file mode 100644
index 000000000000..15c5ce041b68
--- /dev/null
+++ b/test/std/containers/associative/map/map.modifiers/erase_iter.pass.cpp
@@ -0,0 +1,259 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator erase(const_iterator position);
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+struct TemplateConstructor
+{
+ template<typename T>
+ TemplateConstructor (const T&) {}
+};
+
+bool operator<(const TemplateConstructor&, const TemplateConstructor&) { return false; }
+
+int main()
+{
+ {
+ typedef std::map<int, double> M;
+ typedef std::pair<int, double> P;
+ typedef M::iterator I;
+ P ar[] =
+ {
+ P(1, 1.5),
+ P(2, 2.5),
+ P(3, 3.5),
+ P(4, 4.5),
+ P(5, 5.5),
+ P(6, 6.5),
+ P(7, 7.5),
+ P(8, 8.5),
+ };
+ M m(ar, ar + sizeof(ar)/sizeof(ar[0]));
+ assert(m.size() == 8);
+ I i = m.erase(next(m.cbegin(), 3));
+ assert(m.size() == 7);
+ assert(i == next(m.begin(), 3));
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == 1.5);
+ assert(next(m.begin())->first == 2);
+ assert(next(m.begin())->second == 2.5);
+ assert(next(m.begin(), 2)->first == 3);
+ assert(next(m.begin(), 2)->second == 3.5);
+ assert(next(m.begin(), 3)->first == 5);
+ assert(next(m.begin(), 3)->second == 5.5);
+ assert(next(m.begin(), 4)->first == 6);
+ assert(next(m.begin(), 4)->second == 6.5);
+ assert(next(m.begin(), 5)->first == 7);
+ assert(next(m.begin(), 5)->second == 7.5);
+ assert(next(m.begin(), 6)->first == 8);
+ assert(next(m.begin(), 6)->second == 8.5);
+
+ i = m.erase(next(m.cbegin(), 0));
+ assert(m.size() == 6);
+ assert(i == m.begin());
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 3);
+ assert(next(m.begin())->second == 3.5);
+ assert(next(m.begin(), 2)->first == 5);
+ assert(next(m.begin(), 2)->second == 5.5);
+ assert(next(m.begin(), 3)->first == 6);
+ assert(next(m.begin(), 3)->second == 6.5);
+ assert(next(m.begin(), 4)->first == 7);
+ assert(next(m.begin(), 4)->second == 7.5);
+ assert(next(m.begin(), 5)->first == 8);
+ assert(next(m.begin(), 5)->second == 8.5);
+
+ i = m.erase(next(m.cbegin(), 5));
+ assert(m.size() == 5);
+ assert(i == m.end());
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 3);
+ assert(next(m.begin())->second == 3.5);
+ assert(next(m.begin(), 2)->first == 5);
+ assert(next(m.begin(), 2)->second == 5.5);
+ assert(next(m.begin(), 3)->first == 6);
+ assert(next(m.begin(), 3)->second == 6.5);
+ assert(next(m.begin(), 4)->first == 7);
+ assert(next(m.begin(), 4)->second == 7.5);
+
+ i = m.erase(next(m.cbegin(), 1));
+ assert(m.size() == 4);
+ assert(i == next(m.begin()));
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 5);
+ assert(next(m.begin())->second == 5.5);
+ assert(next(m.begin(), 2)->first == 6);
+ assert(next(m.begin(), 2)->second == 6.5);
+ assert(next(m.begin(), 3)->first == 7);
+ assert(next(m.begin(), 3)->second == 7.5);
+
+ i = m.erase(next(m.cbegin(), 2));
+ assert(m.size() == 3);
+ assert(i == next(m.begin(), 2));
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 5);
+ assert(next(m.begin())->second == 5.5);
+ assert(next(m.begin(), 2)->first == 7);
+ assert(next(m.begin(), 2)->second == 7.5);
+
+ i = m.erase(next(m.cbegin(), 2));
+ assert(m.size() == 2);
+ assert(i == next(m.begin(), 2));
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 5);
+ assert(next(m.begin())->second == 5.5);
+
+ i = m.erase(next(m.cbegin(), 0));
+ assert(m.size() == 1);
+ assert(i == next(m.begin(), 0));
+ assert(m.begin()->first == 5);
+ assert(m.begin()->second == 5.5);
+
+ i = m.erase(m.cbegin());
+ assert(m.size() == 0);
+ assert(i == m.begin());
+ assert(i == m.end());
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
+ typedef std::pair<int, double> P;
+ typedef M::iterator I;
+ P ar[] =
+ {
+ P(1, 1.5),
+ P(2, 2.5),
+ P(3, 3.5),
+ P(4, 4.5),
+ P(5, 5.5),
+ P(6, 6.5),
+ P(7, 7.5),
+ P(8, 8.5),
+ };
+ M m(ar, ar + sizeof(ar)/sizeof(ar[0]));
+ assert(m.size() == 8);
+ I i = m.erase(next(m.cbegin(), 3));
+ assert(m.size() == 7);
+ assert(i == next(m.begin(), 3));
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == 1.5);
+ assert(next(m.begin())->first == 2);
+ assert(next(m.begin())->second == 2.5);
+ assert(next(m.begin(), 2)->first == 3);
+ assert(next(m.begin(), 2)->second == 3.5);
+ assert(next(m.begin(), 3)->first == 5);
+ assert(next(m.begin(), 3)->second == 5.5);
+ assert(next(m.begin(), 4)->first == 6);
+ assert(next(m.begin(), 4)->second == 6.5);
+ assert(next(m.begin(), 5)->first == 7);
+ assert(next(m.begin(), 5)->second == 7.5);
+ assert(next(m.begin(), 6)->first == 8);
+ assert(next(m.begin(), 6)->second == 8.5);
+
+ i = m.erase(next(m.cbegin(), 0));
+ assert(m.size() == 6);
+ assert(i == m.begin());
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 3);
+ assert(next(m.begin())->second == 3.5);
+ assert(next(m.begin(), 2)->first == 5);
+ assert(next(m.begin(), 2)->second == 5.5);
+ assert(next(m.begin(), 3)->first == 6);
+ assert(next(m.begin(), 3)->second == 6.5);
+ assert(next(m.begin(), 4)->first == 7);
+ assert(next(m.begin(), 4)->second == 7.5);
+ assert(next(m.begin(), 5)->first == 8);
+ assert(next(m.begin(), 5)->second == 8.5);
+
+ i = m.erase(next(m.cbegin(), 5));
+ assert(m.size() == 5);
+ assert(i == m.end());
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 3);
+ assert(next(m.begin())->second == 3.5);
+ assert(next(m.begin(), 2)->first == 5);
+ assert(next(m.begin(), 2)->second == 5.5);
+ assert(next(m.begin(), 3)->first == 6);
+ assert(next(m.begin(), 3)->second == 6.5);
+ assert(next(m.begin(), 4)->first == 7);
+ assert(next(m.begin(), 4)->second == 7.5);
+
+ i = m.erase(next(m.cbegin(), 1));
+ assert(m.size() == 4);
+ assert(i == next(m.begin()));
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 5);
+ assert(next(m.begin())->second == 5.5);
+ assert(next(m.begin(), 2)->first == 6);
+ assert(next(m.begin(), 2)->second == 6.5);
+ assert(next(m.begin(), 3)->first == 7);
+ assert(next(m.begin(), 3)->second == 7.5);
+
+ i = m.erase(next(m.cbegin(), 2));
+ assert(m.size() == 3);
+ assert(i == next(m.begin(), 2));
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 5);
+ assert(next(m.begin())->second == 5.5);
+ assert(next(m.begin(), 2)->first == 7);
+ assert(next(m.begin(), 2)->second == 7.5);
+
+ i = m.erase(next(m.cbegin(), 2));
+ assert(m.size() == 2);
+ assert(i == next(m.begin(), 2));
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 5);
+ assert(next(m.begin())->second == 5.5);
+
+ i = m.erase(next(m.cbegin(), 0));
+ assert(m.size() == 1);
+ assert(i == next(m.begin(), 0));
+ assert(m.begin()->first == 5);
+ assert(m.begin()->second == 5.5);
+
+ i = m.erase(m.cbegin());
+ assert(m.size() == 0);
+ assert(i == m.begin());
+ assert(i == m.end());
+ }
+#endif
+#if __cplusplus >= 201402L
+ {
+ // This is LWG #2059
+ typedef TemplateConstructor T;
+ typedef std::map<T, int> C;
+ typedef C::iterator I;
+
+ C c;
+ T a{0};
+ I it = c.find(a);
+ if (it != c.end())
+ c.erase(it);
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.modifiers/erase_iter_iter.pass.cpp b/test/std/containers/associative/map/map.modifiers/erase_iter_iter.pass.cpp
new file mode 100644
index 000000000000..1b49956d8a5a
--- /dev/null
+++ b/test/std/containers/associative/map/map.modifiers/erase_iter_iter.pass.cpp
@@ -0,0 +1,157 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator erase(const_iterator first, const_iterator last);
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::map<int, double> M;
+ typedef std::pair<int, double> P;
+ typedef M::iterator I;
+ P ar[] =
+ {
+ P(1, 1.5),
+ P(2, 2.5),
+ P(3, 3.5),
+ P(4, 4.5),
+ P(5, 5.5),
+ P(6, 6.5),
+ P(7, 7.5),
+ P(8, 8.5),
+ };
+ M m(ar, ar + sizeof(ar)/sizeof(ar[0]));
+ assert(m.size() == 8);
+ I i = m.erase(m.cbegin(), m.cbegin());
+ assert(m.size() == 8);
+ assert(i == m.begin());
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == 1.5);
+ assert(next(m.begin())->first == 2);
+ assert(next(m.begin())->second == 2.5);
+ assert(next(m.begin(), 2)->first == 3);
+ assert(next(m.begin(), 2)->second == 3.5);
+ assert(next(m.begin(), 3)->first == 4);
+ assert(next(m.begin(), 3)->second == 4.5);
+ assert(next(m.begin(), 4)->first == 5);
+ assert(next(m.begin(), 4)->second == 5.5);
+ assert(next(m.begin(), 5)->first == 6);
+ assert(next(m.begin(), 5)->second == 6.5);
+ assert(next(m.begin(), 6)->first == 7);
+ assert(next(m.begin(), 6)->second == 7.5);
+ assert(next(m.begin(), 7)->first == 8);
+ assert(next(m.begin(), 7)->second == 8.5);
+
+ i = m.erase(m.cbegin(), next(m.cbegin(), 2));
+ assert(m.size() == 6);
+ assert(i == m.begin());
+ assert(next(m.begin(), 0)->first == 3);
+ assert(next(m.begin(), 0)->second == 3.5);
+ assert(next(m.begin(), 1)->first == 4);
+ assert(next(m.begin(), 1)->second == 4.5);
+ assert(next(m.begin(), 2)->first == 5);
+ assert(next(m.begin(), 2)->second == 5.5);
+ assert(next(m.begin(), 3)->first == 6);
+ assert(next(m.begin(), 3)->second == 6.5);
+ assert(next(m.begin(), 4)->first == 7);
+ assert(next(m.begin(), 4)->second == 7.5);
+ assert(next(m.begin(), 5)->first == 8);
+ assert(next(m.begin(), 5)->second == 8.5);
+
+ i = m.erase(next(m.cbegin(), 2), next(m.cbegin(), 6));
+ assert(m.size() == 2);
+ assert(i == next(m.begin(), 2));
+ assert(next(m.begin(), 0)->first == 3);
+ assert(next(m.begin(), 0)->second == 3.5);
+ assert(next(m.begin(), 1)->first == 4);
+ assert(next(m.begin(), 1)->second == 4.5);
+
+ i = m.erase(m.cbegin(), m.cend());
+ assert(m.size() == 0);
+ assert(i == m.begin());
+ assert(i == m.end());
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
+ typedef std::pair<int, double> P;
+ typedef M::iterator I;
+ P ar[] =
+ {
+ P(1, 1.5),
+ P(2, 2.5),
+ P(3, 3.5),
+ P(4, 4.5),
+ P(5, 5.5),
+ P(6, 6.5),
+ P(7, 7.5),
+ P(8, 8.5),
+ };
+ M m(ar, ar + sizeof(ar)/sizeof(ar[0]));
+ assert(m.size() == 8);
+ I i = m.erase(m.cbegin(), m.cbegin());
+ assert(m.size() == 8);
+ assert(i == m.begin());
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == 1.5);
+ assert(next(m.begin())->first == 2);
+ assert(next(m.begin())->second == 2.5);
+ assert(next(m.begin(), 2)->first == 3);
+ assert(next(m.begin(), 2)->second == 3.5);
+ assert(next(m.begin(), 3)->first == 4);
+ assert(next(m.begin(), 3)->second == 4.5);
+ assert(next(m.begin(), 4)->first == 5);
+ assert(next(m.begin(), 4)->second == 5.5);
+ assert(next(m.begin(), 5)->first == 6);
+ assert(next(m.begin(), 5)->second == 6.5);
+ assert(next(m.begin(), 6)->first == 7);
+ assert(next(m.begin(), 6)->second == 7.5);
+ assert(next(m.begin(), 7)->first == 8);
+ assert(next(m.begin(), 7)->second == 8.5);
+
+ i = m.erase(m.cbegin(), next(m.cbegin(), 2));
+ assert(m.size() == 6);
+ assert(i == m.begin());
+ assert(next(m.begin(), 0)->first == 3);
+ assert(next(m.begin(), 0)->second == 3.5);
+ assert(next(m.begin(), 1)->first == 4);
+ assert(next(m.begin(), 1)->second == 4.5);
+ assert(next(m.begin(), 2)->first == 5);
+ assert(next(m.begin(), 2)->second == 5.5);
+ assert(next(m.begin(), 3)->first == 6);
+ assert(next(m.begin(), 3)->second == 6.5);
+ assert(next(m.begin(), 4)->first == 7);
+ assert(next(m.begin(), 4)->second == 7.5);
+ assert(next(m.begin(), 5)->first == 8);
+ assert(next(m.begin(), 5)->second == 8.5);
+
+ i = m.erase(next(m.cbegin(), 2), next(m.cbegin(), 6));
+ assert(m.size() == 2);
+ assert(i == next(m.begin(), 2));
+ assert(next(m.begin(), 0)->first == 3);
+ assert(next(m.begin(), 0)->second == 3.5);
+ assert(next(m.begin(), 1)->first == 4);
+ assert(next(m.begin(), 1)->second == 4.5);
+
+ i = m.erase(m.cbegin(), m.cend());
+ assert(m.size() == 0);
+ assert(i == m.begin());
+ assert(i == m.end());
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.modifiers/erase_key.pass.cpp b/test/std/containers/associative/map/map.modifiers/erase_key.pass.cpp
new file mode 100644
index 000000000000..e41f5129140e
--- /dev/null
+++ b/test/std/containers/associative/map/map.modifiers/erase_key.pass.cpp
@@ -0,0 +1,275 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// size_type erase(const key_type& k);
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::map<int, double> M;
+ typedef std::pair<int, double> P;
+ typedef M::size_type R;
+ P ar[] =
+ {
+ P(1, 1.5),
+ P(2, 2.5),
+ P(3, 3.5),
+ P(4, 4.5),
+ P(5, 5.5),
+ P(6, 6.5),
+ P(7, 7.5),
+ P(8, 8.5),
+ };
+ M m(ar, ar + sizeof(ar)/sizeof(ar[0]));
+ assert(m.size() == 8);
+ R s = m.erase(9);
+ assert(s == 0);
+ assert(m.size() == 8);
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == 1.5);
+ assert(next(m.begin())->first == 2);
+ assert(next(m.begin())->second == 2.5);
+ assert(next(m.begin(), 2)->first == 3);
+ assert(next(m.begin(), 2)->second == 3.5);
+ assert(next(m.begin(), 3)->first == 4);
+ assert(next(m.begin(), 3)->second == 4.5);
+ assert(next(m.begin(), 4)->first == 5);
+ assert(next(m.begin(), 4)->second == 5.5);
+ assert(next(m.begin(), 5)->first == 6);
+ assert(next(m.begin(), 5)->second == 6.5);
+ assert(next(m.begin(), 6)->first == 7);
+ assert(next(m.begin(), 6)->second == 7.5);
+ assert(next(m.begin(), 7)->first == 8);
+ assert(next(m.begin(), 7)->second == 8.5);
+
+ s = m.erase(4);
+ assert(m.size() == 7);
+ assert(s == 1);
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == 1.5);
+ assert(next(m.begin())->first == 2);
+ assert(next(m.begin())->second == 2.5);
+ assert(next(m.begin(), 2)->first == 3);
+ assert(next(m.begin(), 2)->second == 3.5);
+ assert(next(m.begin(), 3)->first == 5);
+ assert(next(m.begin(), 3)->second == 5.5);
+ assert(next(m.begin(), 4)->first == 6);
+ assert(next(m.begin(), 4)->second == 6.5);
+ assert(next(m.begin(), 5)->first == 7);
+ assert(next(m.begin(), 5)->second == 7.5);
+ assert(next(m.begin(), 6)->first == 8);
+ assert(next(m.begin(), 6)->second == 8.5);
+
+ s = m.erase(1);
+ assert(m.size() == 6);
+ assert(s == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 3);
+ assert(next(m.begin())->second == 3.5);
+ assert(next(m.begin(), 2)->first == 5);
+ assert(next(m.begin(), 2)->second == 5.5);
+ assert(next(m.begin(), 3)->first == 6);
+ assert(next(m.begin(), 3)->second == 6.5);
+ assert(next(m.begin(), 4)->first == 7);
+ assert(next(m.begin(), 4)->second == 7.5);
+ assert(next(m.begin(), 5)->first == 8);
+ assert(next(m.begin(), 5)->second == 8.5);
+
+ s = m.erase(8);
+ assert(m.size() == 5);
+ assert(s == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 3);
+ assert(next(m.begin())->second == 3.5);
+ assert(next(m.begin(), 2)->first == 5);
+ assert(next(m.begin(), 2)->second == 5.5);
+ assert(next(m.begin(), 3)->first == 6);
+ assert(next(m.begin(), 3)->second == 6.5);
+ assert(next(m.begin(), 4)->first == 7);
+ assert(next(m.begin(), 4)->second == 7.5);
+
+ s = m.erase(3);
+ assert(m.size() == 4);
+ assert(s == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 5);
+ assert(next(m.begin())->second == 5.5);
+ assert(next(m.begin(), 2)->first == 6);
+ assert(next(m.begin(), 2)->second == 6.5);
+ assert(next(m.begin(), 3)->first == 7);
+ assert(next(m.begin(), 3)->second == 7.5);
+
+ s = m.erase(6);
+ assert(m.size() == 3);
+ assert(s == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 5);
+ assert(next(m.begin())->second == 5.5);
+ assert(next(m.begin(), 2)->first == 7);
+ assert(next(m.begin(), 2)->second == 7.5);
+
+ s = m.erase(7);
+ assert(m.size() == 2);
+ assert(s == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 5);
+ assert(next(m.begin())->second == 5.5);
+
+ s = m.erase(2);
+ assert(m.size() == 1);
+ assert(s == 1);
+ assert(m.begin()->first == 5);
+ assert(m.begin()->second == 5.5);
+
+ s = m.erase(5);
+ assert(m.size() == 0);
+ assert(s == 1);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
+ typedef std::pair<int, double> P;
+ typedef M::size_type R;
+ P ar[] =
+ {
+ P(1, 1.5),
+ P(2, 2.5),
+ P(3, 3.5),
+ P(4, 4.5),
+ P(5, 5.5),
+ P(6, 6.5),
+ P(7, 7.5),
+ P(8, 8.5),
+ };
+ M m(ar, ar + sizeof(ar)/sizeof(ar[0]));
+ assert(m.size() == 8);
+ R s = m.erase(9);
+ assert(s == 0);
+ assert(m.size() == 8);
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == 1.5);
+ assert(next(m.begin())->first == 2);
+ assert(next(m.begin())->second == 2.5);
+ assert(next(m.begin(), 2)->first == 3);
+ assert(next(m.begin(), 2)->second == 3.5);
+ assert(next(m.begin(), 3)->first == 4);
+ assert(next(m.begin(), 3)->second == 4.5);
+ assert(next(m.begin(), 4)->first == 5);
+ assert(next(m.begin(), 4)->second == 5.5);
+ assert(next(m.begin(), 5)->first == 6);
+ assert(next(m.begin(), 5)->second == 6.5);
+ assert(next(m.begin(), 6)->first == 7);
+ assert(next(m.begin(), 6)->second == 7.5);
+ assert(next(m.begin(), 7)->first == 8);
+ assert(next(m.begin(), 7)->second == 8.5);
+
+ s = m.erase(4);
+ assert(m.size() == 7);
+ assert(s == 1);
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == 1.5);
+ assert(next(m.begin())->first == 2);
+ assert(next(m.begin())->second == 2.5);
+ assert(next(m.begin(), 2)->first == 3);
+ assert(next(m.begin(), 2)->second == 3.5);
+ assert(next(m.begin(), 3)->first == 5);
+ assert(next(m.begin(), 3)->second == 5.5);
+ assert(next(m.begin(), 4)->first == 6);
+ assert(next(m.begin(), 4)->second == 6.5);
+ assert(next(m.begin(), 5)->first == 7);
+ assert(next(m.begin(), 5)->second == 7.5);
+ assert(next(m.begin(), 6)->first == 8);
+ assert(next(m.begin(), 6)->second == 8.5);
+
+ s = m.erase(1);
+ assert(m.size() == 6);
+ assert(s == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 3);
+ assert(next(m.begin())->second == 3.5);
+ assert(next(m.begin(), 2)->first == 5);
+ assert(next(m.begin(), 2)->second == 5.5);
+ assert(next(m.begin(), 3)->first == 6);
+ assert(next(m.begin(), 3)->second == 6.5);
+ assert(next(m.begin(), 4)->first == 7);
+ assert(next(m.begin(), 4)->second == 7.5);
+ assert(next(m.begin(), 5)->first == 8);
+ assert(next(m.begin(), 5)->second == 8.5);
+
+ s = m.erase(8);
+ assert(m.size() == 5);
+ assert(s == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 3);
+ assert(next(m.begin())->second == 3.5);
+ assert(next(m.begin(), 2)->first == 5);
+ assert(next(m.begin(), 2)->second == 5.5);
+ assert(next(m.begin(), 3)->first == 6);
+ assert(next(m.begin(), 3)->second == 6.5);
+ assert(next(m.begin(), 4)->first == 7);
+ assert(next(m.begin(), 4)->second == 7.5);
+
+ s = m.erase(3);
+ assert(m.size() == 4);
+ assert(s == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 5);
+ assert(next(m.begin())->second == 5.5);
+ assert(next(m.begin(), 2)->first == 6);
+ assert(next(m.begin(), 2)->second == 6.5);
+ assert(next(m.begin(), 3)->first == 7);
+ assert(next(m.begin(), 3)->second == 7.5);
+
+ s = m.erase(6);
+ assert(m.size() == 3);
+ assert(s == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 5);
+ assert(next(m.begin())->second == 5.5);
+ assert(next(m.begin(), 2)->first == 7);
+ assert(next(m.begin(), 2)->second == 7.5);
+
+ s = m.erase(7);
+ assert(m.size() == 2);
+ assert(s == 1);
+ assert(m.begin()->first == 2);
+ assert(m.begin()->second == 2.5);
+ assert(next(m.begin())->first == 5);
+ assert(next(m.begin())->second == 5.5);
+
+ s = m.erase(2);
+ assert(m.size() == 1);
+ assert(s == 1);
+ assert(m.begin()->first == 5);
+ assert(m.begin()->second == 5.5);
+
+ s = m.erase(5);
+ assert(m.size() == 0);
+ assert(s == 1);
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.modifiers/insert_cv.pass.cpp b/test/std/containers/associative/map/map.modifiers/insert_cv.pass.cpp
new file mode 100644
index 000000000000..3d28242fd322
--- /dev/null
+++ b/test/std/containers/associative/map/map.modifiers/insert_cv.pass.cpp
@@ -0,0 +1,89 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// pair<iterator, bool> insert(const value_type& v);
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::map<int, double> M;
+ typedef std::pair<M::iterator, bool> R;
+ M m;
+ R r = m.insert(M::value_type(2, 2.5));
+ assert(r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 1);
+ assert(r.first->first == 2);
+ assert(r.first->second == 2.5);
+
+ r = m.insert(M::value_type(1, 1.5));
+ assert(r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 2);
+ assert(r.first->first == 1);
+ assert(r.first->second == 1.5);
+
+ r = m.insert(M::value_type(3, 3.5));
+ assert(r.second);
+ assert(r.first == prev(m.end()));
+ assert(m.size() == 3);
+ assert(r.first->first == 3);
+ assert(r.first->second == 3.5);
+
+ r = m.insert(M::value_type(3, 3.5));
+ assert(!r.second);
+ assert(r.first == prev(m.end()));
+ assert(m.size() == 3);
+ assert(r.first->first == 3);
+ assert(r.first->second == 3.5);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
+ typedef std::pair<M::iterator, bool> R;
+ M m;
+ R r = m.insert(M::value_type(2, 2.5));
+ assert(r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 1);
+ assert(r.first->first == 2);
+ assert(r.first->second == 2.5);
+
+ r = m.insert(M::value_type(1, 1.5));
+ assert(r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 2);
+ assert(r.first->first == 1);
+ assert(r.first->second == 1.5);
+
+ r = m.insert(M::value_type(3, 3.5));
+ assert(r.second);
+ assert(r.first == prev(m.end()));
+ assert(m.size() == 3);
+ assert(r.first->first == 3);
+ assert(r.first->second == 3.5);
+
+ r = m.insert(M::value_type(3, 3.5));
+ assert(!r.second);
+ assert(r.first == prev(m.end()));
+ assert(m.size() == 3);
+ assert(r.first->first == 3);
+ assert(r.first->second == 3.5);
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp b/test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp
new file mode 100644
index 000000000000..ab325ed45bfc
--- /dev/null
+++ b/test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp
@@ -0,0 +1,71 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// void insert(initializer_list<value_type> il);
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+ {
+ typedef std::pair<const int, double> V;
+ std::map<int, double> m =
+ {
+ {1, 1},
+ {1, 1.5},
+ {1, 2},
+ {3, 1},
+ {3, 1.5},
+ {3, 2}
+ };
+ m.insert({
+ {2, 1},
+ {2, 1.5},
+ {2, 2},
+ });
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ std::map<int, double, std::less<int>, min_allocator<V>> m =
+ {
+ {1, 1},
+ {1, 1.5},
+ {1, 2},
+ {3, 1},
+ {3, 1.5},
+ {3, 2}
+ };
+ m.insert({
+ {2, 1},
+ {2, 1.5},
+ {2, 2},
+ });
+ assert(m.size() == 3);
+ assert(distance(m.begin(), m.end()) == 3);
+ assert(*m.begin() == V(1, 1));
+ assert(*next(m.begin()) == V(2, 1));
+ assert(*next(m.begin(), 2) == V(3, 1));
+ }
+#endif
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+}
diff --git a/test/std/containers/associative/map/map.modifiers/insert_iter_cv.pass.cpp b/test/std/containers/associative/map/map.modifiers/insert_iter_cv.pass.cpp
new file mode 100644
index 000000000000..278db4631a8c
--- /dev/null
+++ b/test/std/containers/associative/map/map.modifiers/insert_iter_cv.pass.cpp
@@ -0,0 +1,81 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator insert(const_iterator position, const value_type& v);
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::map<int, double> M;
+ typedef M::iterator R;
+ M m;
+ R r = m.insert(m.end(), M::value_type(2, 2.5));
+ assert(r == m.begin());
+ assert(m.size() == 1);
+ assert(r->first == 2);
+ assert(r->second == 2.5);
+
+ r = m.insert(m.end(), M::value_type(1, 1.5));
+ assert(r == m.begin());
+ assert(m.size() == 2);
+ assert(r->first == 1);
+ assert(r->second == 1.5);
+
+ r = m.insert(m.end(), M::value_type(3, 3.5));
+ assert(r == prev(m.end()));
+ assert(m.size() == 3);
+ assert(r->first == 3);
+ assert(r->second == 3.5);
+
+ r = m.insert(m.end(), M::value_type(3, 3.5));
+ assert(r == prev(m.end()));
+ assert(m.size() == 3);
+ assert(r->first == 3);
+ assert(r->second == 3.5);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
+ typedef M::iterator R;
+ M m;
+ R r = m.insert(m.end(), M::value_type(2, 2.5));
+ assert(r == m.begin());
+ assert(m.size() == 1);
+ assert(r->first == 2);
+ assert(r->second == 2.5);
+
+ r = m.insert(m.end(), M::value_type(1, 1.5));
+ assert(r == m.begin());
+ assert(m.size() == 2);
+ assert(r->first == 1);
+ assert(r->second == 1.5);
+
+ r = m.insert(m.end(), M::value_type(3, 3.5));
+ assert(r == prev(m.end()));
+ assert(m.size() == 3);
+ assert(r->first == 3);
+ assert(r->second == 3.5);
+
+ r = m.insert(m.end(), M::value_type(3, 3.5));
+ assert(r == prev(m.end()));
+ assert(m.size() == 3);
+ assert(r->first == 3);
+ assert(r->second == 3.5);
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.modifiers/insert_iter_iter.pass.cpp b/test/std/containers/associative/map/map.modifiers/insert_iter_iter.pass.cpp
new file mode 100644
index 000000000000..964738b4a68a
--- /dev/null
+++ b/test/std/containers/associative/map/map.modifiers/insert_iter_iter.pass.cpp
@@ -0,0 +1,77 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// template <class InputIterator>
+// void insert(InputIterator first, InputIterator last);
+
+#include <map>
+#include <cassert>
+
+#include "test_iterators.h"
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::map<int, double> M;
+ typedef std::pair<int, double> P;
+ P ar[] =
+ {
+ P(1, 1),
+ P(1, 1.5),
+ P(1, 2),
+ P(2, 1),
+ P(2, 1.5),
+ P(2, 2),
+ P(3, 1),
+ P(3, 1.5),
+ P(3, 2),
+ };
+ M m;
+ m.insert(input_iterator<P*>(ar), input_iterator<P*>(ar + sizeof(ar)/sizeof(ar[0])));
+ assert(m.size() == 3);
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == 1);
+ assert(next(m.begin())->first == 2);
+ assert(next(m.begin())->second == 1);
+ assert(next(m.begin(), 2)->first == 3);
+ assert(next(m.begin(), 2)->second == 1);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
+ typedef std::pair<int, double> P;
+ P ar[] =
+ {
+ P(1, 1),
+ P(1, 1.5),
+ P(1, 2),
+ P(2, 1),
+ P(2, 1.5),
+ P(2, 2),
+ P(3, 1),
+ P(3, 1.5),
+ P(3, 2),
+ };
+ M m;
+ m.insert(input_iterator<P*>(ar), input_iterator<P*>(ar + sizeof(ar)/sizeof(ar[0])));
+ assert(m.size() == 3);
+ assert(m.begin()->first == 1);
+ assert(m.begin()->second == 1);
+ assert(next(m.begin())->first == 2);
+ assert(next(m.begin())->second == 1);
+ assert(next(m.begin(), 2)->first == 3);
+ assert(next(m.begin(), 2)->second == 1);
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.modifiers/insert_iter_rv.pass.cpp b/test/std/containers/associative/map/map.modifiers/insert_iter_rv.pass.cpp
new file mode 100644
index 000000000000..42b41fd7b867
--- /dev/null
+++ b/test/std/containers/associative/map/map.modifiers/insert_iter_rv.pass.cpp
@@ -0,0 +1,87 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// template <class P>
+// iterator insert(const_iterator position, P&& p);
+
+#include <map>
+#include <cassert>
+
+#include "MoveOnly.h"
+#include "min_allocator.h"
+
+int main()
+{
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ {
+ typedef std::map<int, MoveOnly> M;
+ typedef std::pair<int, MoveOnly> P;
+ typedef M::iterator R;
+ M m;
+ R r = m.insert(m.end(), P(2, 2));
+ assert(r == m.begin());
+ assert(m.size() == 1);
+ assert(r->first == 2);
+ assert(r->second == 2);
+
+ r = m.insert(m.end(), P(1, 1));
+ assert(r == m.begin());
+ assert(m.size() == 2);
+ assert(r->first == 1);
+ assert(r->second == 1);
+
+ r = m.insert(m.end(), P(3, 3));
+ assert(r == prev(m.end()));
+ assert(m.size() == 3);
+ assert(r->first == 3);
+ assert(r->second == 3);
+
+ r = m.insert(m.end(), P(3, 3));
+ assert(r == prev(m.end()));
+ assert(m.size() == 3);
+ assert(r->first == 3);
+ assert(r->second == 3);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::map<int, MoveOnly, std::less<int>, min_allocator<std::pair<const int, MoveOnly>>> M;
+ typedef std::pair<int, MoveOnly> P;
+ typedef M::iterator R;
+ M m;
+ R r = m.insert(m.end(), P(2, 2));
+ assert(r == m.begin());
+ assert(m.size() == 1);
+ assert(r->first == 2);
+ assert(r->second == 2);
+
+ r = m.insert(m.end(), P(1, 1));
+ assert(r == m.begin());
+ assert(m.size() == 2);
+ assert(r->first == 1);
+ assert(r->second == 1);
+
+ r = m.insert(m.end(), P(3, 3));
+ assert(r == prev(m.end()));
+ assert(m.size() == 3);
+ assert(r->first == 3);
+ assert(r->second == 3);
+
+ r = m.insert(m.end(), P(3, 3));
+ assert(r == prev(m.end()));
+ assert(m.size() == 3);
+ assert(r->first == 3);
+ assert(r->second == 3);
+ }
+#endif
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+}
diff --git a/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp b/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp
new file mode 100644
index 000000000000..484ed06247d1
--- /dev/null
+++ b/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp
@@ -0,0 +1,192 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// UNSUPPORTED: c++03, c++11, c++14
+
+// <map>
+
+// class map
+
+// template <class M>
+// pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj); // C++17
+// template <class M>
+// pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj); // C++17
+// template <class M>
+// iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj); // C++17
+// template <class M>
+// iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj); // C++17
+
+#include <__config>
+#include <map>
+#include <cassert>
+#include <tuple>
+
+#include <iostream>
+
+class Moveable
+{
+ Moveable(const Moveable&);
+ Moveable& operator=(const Moveable&);
+
+ int int_;
+ double double_;
+public:
+ Moveable() : int_(0), double_(0) {}
+ Moveable(int i, double d) : int_(i), double_(d) {}
+ Moveable(Moveable&& x)
+ : int_(x.int_), double_(x.double_)
+ {x.int_ = -1; x.double_ = -1;}
+ Moveable& operator=(Moveable&& x)
+ {int_ = x.int_; x.int_ = -1;
+ double_ = x.double_; x.double_ = -1;
+ return *this;
+ }
+
+ bool operator==(const Moveable& x) const
+ {return int_ == x.int_ && double_ == x.double_;}
+ bool operator<(const Moveable& x) const
+ {return int_ < x.int_ || (int_ == x.int_ && double_ < x.double_);}
+
+ int get() const {return int_;}
+ bool moved() const {return int_ == -1;}
+};
+
+
+int main()
+{
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_HAS_NO_VARIADICS
+
+ { // pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);
+ typedef std::map<int, Moveable> M;
+ typedef std::pair<M::iterator, bool> R;
+ M m;
+ R r;
+ for ( int i = 0; i < 20; i += 2 )
+ m.emplace ( i, Moveable(i, (double) i));
+ assert(m.size() == 10);
+
+ for (int i=0; i < 20; i += 2)
+ {
+ Moveable mv(i+1, i+1);
+ r = m.insert_or_assign(i, std::move(mv));
+ assert(m.size() == 10);
+ assert(!r.second); // was not inserted
+ assert(mv.moved()); // was moved from
+ assert(r.first->first == i); // key
+ assert(r.first->second.get() == i+1); // value
+ }
+
+ Moveable mv1(5, 5.0);
+ r = m.insert_or_assign(-1, std::move(mv1));
+ assert(m.size() == 11);
+ assert(r.second); // was inserted
+ assert(mv1.moved()); // was moved from
+ assert(r.first->first == -1); // key
+ assert(r.first->second.get() == 5); // value
+
+ Moveable mv2(9, 9.0);
+ r = m.insert_or_assign(3, std::move(mv2));
+ assert(m.size() == 12);
+ assert(r.second); // was inserted
+ assert(mv2.moved()); // was moved from
+ assert(r.first->first == 3); // key
+ assert(r.first->second.get() == 9); // value
+
+ Moveable mv3(-1, 5.0);
+ r = m.insert_or_assign(117, std::move(mv3));
+ assert(m.size() == 13);
+ assert(r.second); // was inserted
+ assert(mv3.moved()); // was moved from
+ assert(r.first->first == 117); // key
+ assert(r.first->second.get() == -1); // value
+ }
+ { // pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
+ typedef std::map<Moveable, Moveable> M;
+ typedef std::pair<M::iterator, bool> R;
+ M m;
+ R r;
+ for ( int i = 0; i < 20; i += 2 )
+ m.emplace ( Moveable(i, (double) i), Moveable(i+1, (double) i+1));
+ assert(m.size() == 10);
+
+ Moveable mvkey1(2, 2.0);
+ Moveable mv1(4, 4.0);
+ r = m.insert_or_assign(std::move(mvkey1), std::move(mv1));
+ assert(m.size() == 10);
+ assert(!r.second); // was not inserted
+ assert(!mvkey1.moved()); // was not moved from
+ assert(mv1.moved()); // was moved from
+ assert(r.first->first == mvkey1); // key
+ assert(r.first->second.get() == 4); // value
+
+ Moveable mvkey2(3, 3.0);
+ Moveable mv2(5, 5.0);
+ r = m.try_emplace(std::move(mvkey2), std::move(mv2));
+ assert(m.size() == 11);
+ assert(r.second); // was inserted
+ assert(mv2.moved()); // was moved from
+ assert(mvkey2.moved()); // was moved from
+ assert(r.first->first.get() == 3); // key
+ assert(r.first->second.get() == 5); // value
+ }
+ { // iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj);
+ typedef std::map<int, Moveable> M;
+ M m;
+ M::iterator r;
+ for ( int i = 0; i < 20; i += 2 )
+ m.emplace ( i, Moveable(i, (double) i));
+ assert(m.size() == 10);
+ M::const_iterator it = m.find(2);
+
+ Moveable mv1(3, 3.0);
+ r = m.insert_or_assign(it, 2, std::move(mv1));
+ assert(m.size() == 10);
+ assert(mv1.moved()); // was moved from
+ assert(r->first == 2); // key
+ assert(r->second.get() == 3); // value
+
+ Moveable mv2(5, 5.0);
+ r = m.insert_or_assign(it, 3, std::move(mv2));
+ assert(m.size() == 11);
+ assert(mv2.moved()); // was moved from
+ assert(r->first == 3); // key
+ assert(r->second.get() == 5); // value
+ }
+ { // iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj);
+ typedef std::map<Moveable, Moveable> M;
+ M m;
+ M::iterator r;
+ for ( int i = 0; i < 20; i += 2 )
+ m.emplace ( Moveable(i, (double) i), Moveable(i+1, (double) i+1));
+ assert(m.size() == 10);
+ M::const_iterator it = std::next(m.cbegin());
+
+ Moveable mvkey1(2, 2.0);
+ Moveable mv1(4, 4.0);
+ r = m.insert_or_assign(it, std::move(mvkey1), std::move(mv1));
+ assert(m.size() == 10);
+ assert(mv1.moved()); // was moved from
+ assert(!mvkey1.moved()); // was not moved from
+ assert(r->first == mvkey1); // key
+ assert(r->second.get() == 4); // value
+
+ Moveable mvkey2(3, 3.0);
+ Moveable mv2(5, 5.0);
+ r = m.insert_or_assign(it, std::move(mvkey2), std::move(mv2));
+ assert(m.size() == 11);
+ assert(mv2.moved()); // was moved from
+ assert(mvkey2.moved()); // was moved from
+ assert(r->first.get() == 3); // key
+ assert(r->second.get() == 5); // value
+ }
+
+#endif // _LIBCPP_HAS_NO_VARIADICS
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+} \ No newline at end of file
diff --git a/test/std/containers/associative/map/map.modifiers/insert_rv.pass.cpp b/test/std/containers/associative/map/map.modifiers/insert_rv.pass.cpp
new file mode 100644
index 000000000000..a9d3277e6d94
--- /dev/null
+++ b/test/std/containers/associative/map/map.modifiers/insert_rv.pass.cpp
@@ -0,0 +1,93 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// template <class P>
+// pair<iterator, bool> insert(P&& p);
+
+#include <map>
+#include <cassert>
+
+#include "MoveOnly.h"
+#include "min_allocator.h"
+
+int main()
+{
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ {
+ typedef std::map<int, MoveOnly> M;
+ typedef std::pair<M::iterator, bool> R;
+ M m;
+ R r = m.insert(M::value_type(2, 2));
+ assert(r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 1);
+ assert(r.first->first == 2);
+ assert(r.first->second == 2);
+
+ r = m.insert(M::value_type(1, 1));
+ assert(r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 2);
+ assert(r.first->first == 1);
+ assert(r.first->second == 1);
+
+ r = m.insert(M::value_type(3, 3));
+ assert(r.second);
+ assert(r.first == prev(m.end()));
+ assert(m.size() == 3);
+ assert(r.first->first == 3);
+ assert(r.first->second == 3);
+
+ r = m.insert(M::value_type(3, 3));
+ assert(!r.second);
+ assert(r.first == prev(m.end()));
+ assert(m.size() == 3);
+ assert(r.first->first == 3);
+ assert(r.first->second == 3);
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::map<int, MoveOnly, std::less<int>, min_allocator<std::pair<const int, MoveOnly>>> M;
+ typedef std::pair<M::iterator, bool> R;
+ M m;
+ R r = m.insert(M::value_type(2, 2));
+ assert(r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 1);
+ assert(r.first->first == 2);
+ assert(r.first->second == 2);
+
+ r = m.insert(M::value_type(1, 1));
+ assert(r.second);
+ assert(r.first == m.begin());
+ assert(m.size() == 2);
+ assert(r.first->first == 1);
+ assert(r.first->second == 1);
+
+ r = m.insert(M::value_type(3, 3));
+ assert(r.second);
+ assert(r.first == prev(m.end()));
+ assert(m.size() == 3);
+ assert(r.first->first == 3);
+ assert(r.first->second == 3);
+
+ r = m.insert(M::value_type(3, 3));
+ assert(!r.second);
+ assert(r.first == prev(m.end()));
+ assert(m.size() == 3);
+ assert(r.first->first == 3);
+ assert(r.first->second == 3);
+ }
+#endif
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+}
diff --git a/test/std/containers/associative/map/map.modifiers/try.emplace.pass.cpp b/test/std/containers/associative/map/map.modifiers/try.emplace.pass.cpp
new file mode 100644
index 000000000000..8e0dd7577bbd
--- /dev/null
+++ b/test/std/containers/associative/map/map.modifiers/try.emplace.pass.cpp
@@ -0,0 +1,189 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// UNSUPPORTED: c++03, c++11, c++14
+
+// <map>
+
+// class map
+
+// template <class... Args>
+// pair<iterator, bool> try_emplace(const key_type& k, Args&&... args); // C++17
+// template <class... Args>
+// pair<iterator, bool> try_emplace(key_type&& k, Args&&... args); // C++17
+// template <class... Args>
+// iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args); // C++17
+// template <class... Args>
+// iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args); // C++17
+
+#include <__config>
+#include <map>
+#include <cassert>
+#include <tuple>
+
+class Moveable
+{
+ Moveable(const Moveable&);
+ Moveable& operator=(const Moveable&);
+
+ int int_;
+ double double_;
+public:
+ Moveable() : int_(0), double_(0) {}
+ Moveable(int i, double d) : int_(i), double_(d) {}
+ Moveable(Moveable&& x)
+ : int_(x.int_), double_(x.double_)
+ {x.int_ = -1; x.double_ = -1;}
+ Moveable& operator=(Moveable&& x)
+ {int_ = x.int_; x.int_ = -1;
+ double_ = x.double_; x.double_ = -1;
+ return *this;
+ }
+
+ bool operator==(const Moveable& x) const
+ {return int_ == x.int_ && double_ == x.double_;}
+ bool operator<(const Moveable& x) const
+ {return int_ < x.int_ || (int_ == x.int_ && double_ < x.double_);}
+
+ int get() const {return int_;}
+ bool moved() const {return int_ == -1;}
+};
+
+
+int main()
+{
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_HAS_NO_VARIADICS
+
+ { // pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
+ typedef std::map<int, Moveable> M;
+ typedef std::pair<M::iterator, bool> R;
+ M m;
+ R r;
+ for (int i = 0; i < 20; i += 2)
+ m.emplace (i, Moveable(i, (double) i));
+ assert(m.size() == 10);
+
+ Moveable mv1(3, 3.0);
+ for (int i=0; i < 20; i += 2)
+ {
+ r = m.try_emplace(i, std::move(mv1));
+ assert(m.size() == 10);
+ assert(!r.second); // was not inserted
+ assert(!mv1.moved()); // was not moved from
+ assert(r.first->first == i); // key
+ }
+
+ r = m.try_emplace(-1, std::move(mv1));
+ assert(m.size() == 11);
+ assert(r.second); // was inserted
+ assert(mv1.moved()); // was moved from
+ assert(r.first->first == -1); // key
+ assert(r.first->second.get() == 3); // value
+
+ Moveable mv2(5, 3.0);
+ r = m.try_emplace(5, std::move(mv2));
+ assert(m.size() == 12);
+ assert(r.second); // was inserted
+ assert(mv2.moved()); // was moved from
+ assert(r.first->first == 5); // key
+ assert(r.first->second.get() == 5); // value
+
+ Moveable mv3(-1, 3.0);
+ r = m.try_emplace(117, std::move(mv2));
+ assert(m.size() == 13);
+ assert(r.second); // was inserted
+ assert(mv2.moved()); // was moved from
+ assert(r.first->first == 117); // key
+ assert(r.first->second.get() == -1); // value
+ }
+
+ { // pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
+ typedef std::map<Moveable, Moveable> M;
+ typedef std::pair<M::iterator, bool> R;
+ M m;
+ R r;
+ for ( int i = 0; i < 20; i += 2 )
+ m.emplace ( Moveable(i, (double) i), Moveable(i+1, (double) i+1));
+ assert(m.size() == 10);
+
+ Moveable mvkey1(2, 2.0);
+ Moveable mv1(4, 4.0);
+ r = m.try_emplace(std::move(mvkey1), std::move(mv1));
+ assert(m.size() == 10);
+ assert(!r.second); // was not inserted
+ assert(!mv1.moved()); // was not moved from
+ assert(!mvkey1.moved()); // was not moved from
+ assert(r.first->first == mvkey1); // key
+
+ Moveable mvkey2(3, 3.0);
+ r = m.try_emplace(std::move(mvkey2), std::move(mv1));
+ assert(m.size() == 11);
+ assert(r.second); // was inserted
+ assert(mv1.moved()); // was moved from
+ assert(mvkey2.moved()); // was moved from
+ assert(r.first->first.get() == 3); // key
+ assert(r.first->second.get() == 4); // value
+ }
+
+ { // iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args);
+ typedef std::map<int, Moveable> M;
+ M m;
+ M::iterator r;
+ for ( int i = 0; i < 20; i += 2 )
+ m.try_emplace ( i, Moveable(i, (double) i));
+ assert(m.size() == 10);
+ M::const_iterator it = m.find(2);
+
+ Moveable mv1(3, 3.0);
+ for (int i=0; i < 20; i += 2)
+ {
+ r = m.try_emplace(it, i, std::move(mv1));
+ assert(m.size() == 10);
+ assert(!mv1.moved()); // was not moved from
+ assert(r->first == i); // key
+ assert(r->second.get() == i); // value
+ }
+
+ r = m.try_emplace(it, 3, std::move(mv1));
+ assert(m.size() == 11);
+ assert(mv1.moved()); // was moved from
+ assert(r->first == 3); // key
+ assert(r->second.get() == 3); // value
+ }
+
+ { // iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args);
+ typedef std::map<Moveable, Moveable> M;
+ M m;
+ M::iterator r;
+ for ( int i = 0; i < 20; i += 2 )
+ m.emplace ( Moveable(i, (double) i), Moveable(i+1, (double) i+1));
+ assert(m.size() == 10);
+ M::const_iterator it = std::next(m.cbegin());
+
+ Moveable mvkey1(2, 2.0);
+ Moveable mv1(4, 4.0);
+ r = m.try_emplace(it, std::move(mvkey1), std::move(mv1));
+ assert(m.size() == 10);
+ assert(!mv1.moved()); // was not moved from
+ assert(!mvkey1.moved()); // was not moved from
+ assert(r->first == mvkey1); // key
+
+ Moveable mvkey2(3, 3.0);
+ r = m.try_emplace(it, std::move(mvkey2), std::move(mv1));
+ assert(m.size() == 11);
+ assert(mv1.moved()); // was moved from
+ assert(mvkey2.moved()); // was moved from
+ assert(r->first.get() == 3); // key
+ assert(r->second.get() == 4); // value
+ }
+
+#endif // _LIBCPP_HAS_NO_VARIADICS
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+}
diff --git a/test/std/containers/associative/map/map.ops/count.pass.cpp b/test/std/containers/associative/map/map.ops/count.pass.cpp
new file mode 100644
index 000000000000..ae87ae8345e9
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/count.pass.cpp
@@ -0,0 +1,193 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// size_type count(const key_type& k) const;
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+#include "private_constructor.hpp"
+#include "is_transparent.h"
+
+int main()
+{
+ {
+ typedef std::pair<const int, double> V;
+ typedef std::map<int, double> M;
+ {
+ typedef M::size_type R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ const M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.count(5);
+ assert(r == 1);
+ r = m.count(6);
+ assert(r == 1);
+ r = m.count(7);
+ assert(r == 1);
+ r = m.count(8);
+ assert(r == 1);
+ r = m.count(9);
+ assert(r == 1);
+ r = m.count(10);
+ assert(r == 1);
+ r = m.count(11);
+ assert(r == 1);
+ r = m.count(12);
+ assert(r == 1);
+ r = m.count(4);
+ assert(r == 0);
+ }
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ typedef std::map<int, double, std::less<int>, min_allocator<V>> M;
+ {
+ typedef M::size_type R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ const M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.count(5);
+ assert(r == 1);
+ r = m.count(6);
+ assert(r == 1);
+ r = m.count(7);
+ assert(r == 1);
+ r = m.count(8);
+ assert(r == 1);
+ r = m.count(9);
+ assert(r == 1);
+ r = m.count(10);
+ assert(r == 1);
+ r = m.count(11);
+ assert(r == 1);
+ r = m.count(12);
+ assert(r == 1);
+ r = m.count(4);
+ assert(r == 0);
+ }
+ }
+#endif
+#if _LIBCPP_STD_VER > 11
+ {
+ typedef std::pair<const int, double> V;
+ typedef std::map<int, double, std::less <>> M;
+ typedef M::size_type R;
+
+ V ar[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ const M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.count(5);
+ assert(r == 1);
+ r = m.count(6);
+ assert(r == 1);
+ r = m.count(7);
+ assert(r == 1);
+ r = m.count(8);
+ assert(r == 1);
+ r = m.count(9);
+ assert(r == 1);
+ r = m.count(10);
+ assert(r == 1);
+ r = m.count(11);
+ assert(r == 1);
+ r = m.count(12);
+ assert(r == 1);
+ r = m.count(4);
+ assert(r == 0);
+
+ r = m.count(C2Int(5));
+ assert(r == 1);
+ r = m.count(C2Int(6));
+ assert(r == 1);
+ r = m.count(C2Int(7));
+ assert(r == 1);
+ r = m.count(C2Int(8));
+ assert(r == 1);
+ r = m.count(C2Int(9));
+ assert(r == 1);
+ r = m.count(C2Int(10));
+ assert(r == 1);
+ r = m.count(C2Int(11));
+ assert(r == 1);
+ r = m.count(C2Int(12));
+ assert(r == 1);
+ r = m.count(C2Int(4));
+ assert(r == 0);
+ }
+
+ {
+ typedef PrivateConstructor PC;
+ typedef std::map<PC, double, std::less<>> M;
+ typedef M::size_type R;
+
+ M m;
+ m [ PC::make(5) ] = 5;
+ m [ PC::make(6) ] = 6;
+ m [ PC::make(7) ] = 7;
+ m [ PC::make(8) ] = 8;
+ m [ PC::make(9) ] = 9;
+ m [ PC::make(10) ] = 10;
+ m [ PC::make(11) ] = 11;
+ m [ PC::make(12) ] = 12;
+
+ R r = m.count(5);
+ assert(r == 1);
+ r = m.count(6);
+ assert(r == 1);
+ r = m.count(7);
+ assert(r == 1);
+ r = m.count(8);
+ assert(r == 1);
+ r = m.count(9);
+ assert(r == 1);
+ r = m.count(10);
+ assert(r == 1);
+ r = m.count(11);
+ assert(r == 1);
+ r = m.count(12);
+ assert(r == 1);
+ r = m.count(4);
+ assert(r == 0);
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.ops/count0.pass.cpp b/test/std/containers/associative/map/map.ops/count0.pass.cpp
new file mode 100644
index 000000000000..ce549366e7ab
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/count0.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// XFAIL: c++03, c++11
+
+// <map>
+
+// class map
+
+// iterator find(const key_type& k);
+// const_iterator find(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+int main()
+{
+ typedef std::map<int, double, transparent_less> M;
+
+ M().count(C2Int{5});
+}
diff --git a/test/std/containers/associative/map/map.ops/count1.fail.cpp b/test/std/containers/associative/map/map.ops/count1.fail.cpp
new file mode 100644
index 000000000000..9c15059d490e
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/count1.fail.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator find(const key_type& k);
+// const_iterator find(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+#if _LIBCPP_STD_VER <= 11
+#error "This test requires is C++14 (or later)"
+#else
+
+int main()
+{
+ {
+ typedef std::map<int, double, transparent_less_no_type> M;
+
+ M().count(C2Int{5});
+ }
+}
+#endif \ No newline at end of file
diff --git a/test/std/containers/associative/map/map.ops/count2.fail.cpp b/test/std/containers/associative/map/map.ops/count2.fail.cpp
new file mode 100644
index 000000000000..7aa1553ef47a
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/count2.fail.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator find(const key_type& k);
+// const_iterator find(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+#if _LIBCPP_STD_VER <= 11
+#error "This test requires is C++14 (or later)"
+#else
+
+int main()
+{
+ {
+ typedef std::map<int, double, transparent_less_private> M;
+
+ M().count(C2Int{5});
+ }
+}
+#endif \ No newline at end of file
diff --git a/test/std/containers/associative/map/map.ops/count3.fail.cpp b/test/std/containers/associative/map/map.ops/count3.fail.cpp
new file mode 100644
index 000000000000..7e7bb8f6d370
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/count3.fail.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator find(const key_type& k);
+// const_iterator find(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+#if _LIBCPP_STD_VER <= 11
+#error "This test requires is C++14 (or later)"
+#else
+
+int main()
+{
+ {
+ typedef std::map<int, double, transparent_less_not_a_type> M;
+
+ M().count(C2Int{5});
+ }
+}
+#endif \ No newline at end of file
diff --git a/test/std/containers/associative/map/map.ops/equal_range.pass.cpp b/test/std/containers/associative/map/map.ops/equal_range.pass.cpp
new file mode 100644
index 000000000000..a71149a47212
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/equal_range.pass.cpp
@@ -0,0 +1,490 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// pair<iterator,iterator> equal_range(const key_type& k);
+// pair<const_iterator,const_iterator> equal_range(const key_type& k) const;
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+#include "private_constructor.hpp"
+#include "is_transparent.h"
+
+int main()
+{
+ {
+ typedef std::pair<const int, double> V;
+ typedef std::map<int, double> M;
+ {
+ typedef std::pair<M::iterator, M::iterator> R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(7, 6),
+ V(9, 7),
+ V(11, 8),
+ V(13, 9),
+ V(15, 10),
+ V(17, 11),
+ V(19, 12)
+ };
+ M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.equal_range(5);
+ assert(r.first == next(m.begin(), 0));
+ assert(r.second == next(m.begin(), 1));
+ r = m.equal_range(7);
+ assert(r.first == next(m.begin(), 1));
+ assert(r.second == next(m.begin(), 2));
+ r = m.equal_range(9);
+ assert(r.first == next(m.begin(), 2));
+ assert(r.second == next(m.begin(), 3));
+ r = m.equal_range(11);
+ assert(r.first == next(m.begin(), 3));
+ assert(r.second == next(m.begin(), 4));
+ r = m.equal_range(13);
+ assert(r.first == next(m.begin(), 4));
+ assert(r.second == next(m.begin(), 5));
+ r = m.equal_range(15);
+ assert(r.first == next(m.begin(), 5));
+ assert(r.second == next(m.begin(), 6));
+ r = m.equal_range(17);
+ assert(r.first == next(m.begin(), 6));
+ assert(r.second == next(m.begin(), 7));
+ r = m.equal_range(19);
+ assert(r.first == next(m.begin(), 7));
+ assert(r.second == next(m.begin(), 8));
+ r = m.equal_range(4);
+ assert(r.first == next(m.begin(), 0));
+ assert(r.second == next(m.begin(), 0));
+ r = m.equal_range(6);
+ assert(r.first == next(m.begin(), 1));
+ assert(r.second == next(m.begin(), 1));
+ r = m.equal_range(8);
+ assert(r.first == next(m.begin(), 2));
+ assert(r.second == next(m.begin(), 2));
+ r = m.equal_range(10);
+ assert(r.first == next(m.begin(), 3));
+ assert(r.second == next(m.begin(), 3));
+ r = m.equal_range(12);
+ assert(r.first == next(m.begin(), 4));
+ assert(r.second == next(m.begin(), 4));
+ r = m.equal_range(14);
+ assert(r.first == next(m.begin(), 5));
+ assert(r.second == next(m.begin(), 5));
+ r = m.equal_range(16);
+ assert(r.first == next(m.begin(), 6));
+ assert(r.second == next(m.begin(), 6));
+ r = m.equal_range(18);
+ assert(r.first == next(m.begin(), 7));
+ assert(r.second == next(m.begin(), 7));
+ r = m.equal_range(20);
+ assert(r.first == next(m.begin(), 8));
+ assert(r.second == next(m.begin(), 8));
+ }
+ {
+ typedef std::pair<M::const_iterator, M::const_iterator> R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(7, 6),
+ V(9, 7),
+ V(11, 8),
+ V(13, 9),
+ V(15, 10),
+ V(17, 11),
+ V(19, 12)
+ };
+ const M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.equal_range(5);
+ assert(r.first == next(m.begin(), 0));
+ assert(r.second == next(m.begin(), 1));
+ r = m.equal_range(7);
+ assert(r.first == next(m.begin(), 1));
+ assert(r.second == next(m.begin(), 2));
+ r = m.equal_range(9);
+ assert(r.first == next(m.begin(), 2));
+ assert(r.second == next(m.begin(), 3));
+ r = m.equal_range(11);
+ assert(r.first == next(m.begin(), 3));
+ assert(r.second == next(m.begin(), 4));
+ r = m.equal_range(13);
+ assert(r.first == next(m.begin(), 4));
+ assert(r.second == next(m.begin(), 5));
+ r = m.equal_range(15);
+ assert(r.first == next(m.begin(), 5));
+ assert(r.second == next(m.begin(), 6));
+ r = m.equal_range(17);
+ assert(r.first == next(m.begin(), 6));
+ assert(r.second == next(m.begin(), 7));
+ r = m.equal_range(19);
+ assert(r.first == next(m.begin(), 7));
+ assert(r.second == next(m.begin(), 8));
+ r = m.equal_range(4);
+ assert(r.first == next(m.begin(), 0));
+ assert(r.second == next(m.begin(), 0));
+ r = m.equal_range(6);
+ assert(r.first == next(m.begin(), 1));
+ assert(r.second == next(m.begin(), 1));
+ r = m.equal_range(8);
+ assert(r.first == next(m.begin(), 2));
+ assert(r.second == next(m.begin(), 2));
+ r = m.equal_range(10);
+ assert(r.first == next(m.begin(), 3));
+ assert(r.second == next(m.begin(), 3));
+ r = m.equal_range(12);
+ assert(r.first == next(m.begin(), 4));
+ assert(r.second == next(m.begin(), 4));
+ r = m.equal_range(14);
+ assert(r.first == next(m.begin(), 5));
+ assert(r.second == next(m.begin(), 5));
+ r = m.equal_range(16);
+ assert(r.first == next(m.begin(), 6));
+ assert(r.second == next(m.begin(), 6));
+ r = m.equal_range(18);
+ assert(r.first == next(m.begin(), 7));
+ assert(r.second == next(m.begin(), 7));
+ r = m.equal_range(20);
+ assert(r.first == next(m.begin(), 8));
+ assert(r.second == next(m.begin(), 8));
+ }
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ typedef std::map<int, double, std::less<int>, min_allocator<V>> M;
+ {
+ typedef std::pair<M::iterator, M::iterator> R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(7, 6),
+ V(9, 7),
+ V(11, 8),
+ V(13, 9),
+ V(15, 10),
+ V(17, 11),
+ V(19, 12)
+ };
+ M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.equal_range(5);
+ assert(r.first == next(m.begin(), 0));
+ assert(r.second == next(m.begin(), 1));
+ r = m.equal_range(7);
+ assert(r.first == next(m.begin(), 1));
+ assert(r.second == next(m.begin(), 2));
+ r = m.equal_range(9);
+ assert(r.first == next(m.begin(), 2));
+ assert(r.second == next(m.begin(), 3));
+ r = m.equal_range(11);
+ assert(r.first == next(m.begin(), 3));
+ assert(r.second == next(m.begin(), 4));
+ r = m.equal_range(13);
+ assert(r.first == next(m.begin(), 4));
+ assert(r.second == next(m.begin(), 5));
+ r = m.equal_range(15);
+ assert(r.first == next(m.begin(), 5));
+ assert(r.second == next(m.begin(), 6));
+ r = m.equal_range(17);
+ assert(r.first == next(m.begin(), 6));
+ assert(r.second == next(m.begin(), 7));
+ r = m.equal_range(19);
+ assert(r.first == next(m.begin(), 7));
+ assert(r.second == next(m.begin(), 8));
+ r = m.equal_range(4);
+ assert(r.first == next(m.begin(), 0));
+ assert(r.second == next(m.begin(), 0));
+ r = m.equal_range(6);
+ assert(r.first == next(m.begin(), 1));
+ assert(r.second == next(m.begin(), 1));
+ r = m.equal_range(8);
+ assert(r.first == next(m.begin(), 2));
+ assert(r.second == next(m.begin(), 2));
+ r = m.equal_range(10);
+ assert(r.first == next(m.begin(), 3));
+ assert(r.second == next(m.begin(), 3));
+ r = m.equal_range(12);
+ assert(r.first == next(m.begin(), 4));
+ assert(r.second == next(m.begin(), 4));
+ r = m.equal_range(14);
+ assert(r.first == next(m.begin(), 5));
+ assert(r.second == next(m.begin(), 5));
+ r = m.equal_range(16);
+ assert(r.first == next(m.begin(), 6));
+ assert(r.second == next(m.begin(), 6));
+ r = m.equal_range(18);
+ assert(r.first == next(m.begin(), 7));
+ assert(r.second == next(m.begin(), 7));
+ r = m.equal_range(20);
+ assert(r.first == next(m.begin(), 8));
+ assert(r.second == next(m.begin(), 8));
+ }
+ {
+ typedef std::pair<M::const_iterator, M::const_iterator> R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(7, 6),
+ V(9, 7),
+ V(11, 8),
+ V(13, 9),
+ V(15, 10),
+ V(17, 11),
+ V(19, 12)
+ };
+ const M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.equal_range(5);
+ assert(r.first == next(m.begin(), 0));
+ assert(r.second == next(m.begin(), 1));
+ r = m.equal_range(7);
+ assert(r.first == next(m.begin(), 1));
+ assert(r.second == next(m.begin(), 2));
+ r = m.equal_range(9);
+ assert(r.first == next(m.begin(), 2));
+ assert(r.second == next(m.begin(), 3));
+ r = m.equal_range(11);
+ assert(r.first == next(m.begin(), 3));
+ assert(r.second == next(m.begin(), 4));
+ r = m.equal_range(13);
+ assert(r.first == next(m.begin(), 4));
+ assert(r.second == next(m.begin(), 5));
+ r = m.equal_range(15);
+ assert(r.first == next(m.begin(), 5));
+ assert(r.second == next(m.begin(), 6));
+ r = m.equal_range(17);
+ assert(r.first == next(m.begin(), 6));
+ assert(r.second == next(m.begin(), 7));
+ r = m.equal_range(19);
+ assert(r.first == next(m.begin(), 7));
+ assert(r.second == next(m.begin(), 8));
+ r = m.equal_range(4);
+ assert(r.first == next(m.begin(), 0));
+ assert(r.second == next(m.begin(), 0));
+ r = m.equal_range(6);
+ assert(r.first == next(m.begin(), 1));
+ assert(r.second == next(m.begin(), 1));
+ r = m.equal_range(8);
+ assert(r.first == next(m.begin(), 2));
+ assert(r.second == next(m.begin(), 2));
+ r = m.equal_range(10);
+ assert(r.first == next(m.begin(), 3));
+ assert(r.second == next(m.begin(), 3));
+ r = m.equal_range(12);
+ assert(r.first == next(m.begin(), 4));
+ assert(r.second == next(m.begin(), 4));
+ r = m.equal_range(14);
+ assert(r.first == next(m.begin(), 5));
+ assert(r.second == next(m.begin(), 5));
+ r = m.equal_range(16);
+ assert(r.first == next(m.begin(), 6));
+ assert(r.second == next(m.begin(), 6));
+ r = m.equal_range(18);
+ assert(r.first == next(m.begin(), 7));
+ assert(r.second == next(m.begin(), 7));
+ r = m.equal_range(20);
+ assert(r.first == next(m.begin(), 8));
+ assert(r.second == next(m.begin(), 8));
+ }
+ }
+#endif
+#if _LIBCPP_STD_VER > 11
+ {
+ typedef std::pair<const int, double> V;
+ typedef std::map<int, double, std::less<>> M;
+ typedef std::pair<M::iterator, M::iterator> R;
+
+ V ar[] =
+ {
+ V(5, 5),
+ V(7, 6),
+ V(9, 7),
+ V(11, 8),
+ V(13, 9),
+ V(15, 10),
+ V(17, 11),
+ V(19, 12)
+ };
+ M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.equal_range(5);
+ assert(r.first == next(m.begin(), 0));
+ assert(r.second == next(m.begin(), 1));
+ r = m.equal_range(7);
+ assert(r.first == next(m.begin(), 1));
+ assert(r.second == next(m.begin(), 2));
+ r = m.equal_range(9);
+ assert(r.first == next(m.begin(), 2));
+ assert(r.second == next(m.begin(), 3));
+ r = m.equal_range(11);
+ assert(r.first == next(m.begin(), 3));
+ assert(r.second == next(m.begin(), 4));
+ r = m.equal_range(13);
+ assert(r.first == next(m.begin(), 4));
+ assert(r.second == next(m.begin(), 5));
+ r = m.equal_range(15);
+ assert(r.first == next(m.begin(), 5));
+ assert(r.second == next(m.begin(), 6));
+ r = m.equal_range(17);
+ assert(r.first == next(m.begin(), 6));
+ assert(r.second == next(m.begin(), 7));
+ r = m.equal_range(19);
+ assert(r.first == next(m.begin(), 7));
+ assert(r.second == next(m.begin(), 8));
+ r = m.equal_range(4);
+ assert(r.first == next(m.begin(), 0));
+ assert(r.second == next(m.begin(), 0));
+ r = m.equal_range(6);
+ assert(r.first == next(m.begin(), 1));
+ assert(r.second == next(m.begin(), 1));
+ r = m.equal_range(8);
+ assert(r.first == next(m.begin(), 2));
+ assert(r.second == next(m.begin(), 2));
+ r = m.equal_range(10);
+ assert(r.first == next(m.begin(), 3));
+ assert(r.second == next(m.begin(), 3));
+ r = m.equal_range(12);
+ assert(r.first == next(m.begin(), 4));
+ assert(r.second == next(m.begin(), 4));
+ r = m.equal_range(14);
+ assert(r.first == next(m.begin(), 5));
+ assert(r.second == next(m.begin(), 5));
+ r = m.equal_range(16);
+ assert(r.first == next(m.begin(), 6));
+ assert(r.second == next(m.begin(), 6));
+ r = m.equal_range(18);
+ assert(r.first == next(m.begin(), 7));
+ assert(r.second == next(m.begin(), 7));
+ r = m.equal_range(20);
+ assert(r.first == next(m.begin(), 8));
+ assert(r.second == next(m.begin(), 8));
+
+ r = m.equal_range(C2Int(5));
+ assert(r.first == next(m.begin(), 0));
+ assert(r.second == next(m.begin(), 1));
+ r = m.equal_range(C2Int(7));
+ assert(r.first == next(m.begin(), 1));
+ assert(r.second == next(m.begin(), 2));
+ r = m.equal_range(C2Int(9));
+ assert(r.first == next(m.begin(), 2));
+ assert(r.second == next(m.begin(), 3));
+ r = m.equal_range(C2Int(11));
+ assert(r.first == next(m.begin(), 3));
+ assert(r.second == next(m.begin(), 4));
+ r = m.equal_range(C2Int(13));
+ assert(r.first == next(m.begin(), 4));
+ assert(r.second == next(m.begin(), 5));
+ r = m.equal_range(C2Int(15));
+ assert(r.first == next(m.begin(), 5));
+ assert(r.second == next(m.begin(), 6));
+ r = m.equal_range(C2Int(17));
+ assert(r.first == next(m.begin(), 6));
+ assert(r.second == next(m.begin(), 7));
+ r = m.equal_range(C2Int(19));
+ assert(r.first == next(m.begin(), 7));
+ assert(r.second == next(m.begin(), 8));
+ r = m.equal_range(C2Int(4));
+ assert(r.first == next(m.begin(), 0));
+ assert(r.second == next(m.begin(), 0));
+ r = m.equal_range(C2Int(6));
+ assert(r.first == next(m.begin(), 1));
+ assert(r.second == next(m.begin(), 1));
+ r = m.equal_range(C2Int(8));
+ assert(r.first == next(m.begin(), 2));
+ assert(r.second == next(m.begin(), 2));
+ r = m.equal_range(C2Int(10));
+ assert(r.first == next(m.begin(), 3));
+ assert(r.second == next(m.begin(), 3));
+ r = m.equal_range(C2Int(12));
+ assert(r.first == next(m.begin(), 4));
+ assert(r.second == next(m.begin(), 4));
+ r = m.equal_range(C2Int(14));
+ assert(r.first == next(m.begin(), 5));
+ assert(r.second == next(m.begin(), 5));
+ r = m.equal_range(C2Int(16));
+ assert(r.first == next(m.begin(), 6));
+ assert(r.second == next(m.begin(), 6));
+ r = m.equal_range(C2Int(18));
+ assert(r.first == next(m.begin(), 7));
+ assert(r.second == next(m.begin(), 7));
+ r = m.equal_range(C2Int(20));
+ assert(r.first == next(m.begin(), 8));
+ assert(r.second == next(m.begin(), 8));
+ }
+ {
+ typedef PrivateConstructor PC;
+ typedef std::map<PC, double, std::less<>> M;
+ typedef std::pair<M::iterator, M::iterator> R;
+
+ M m;
+ m [ PC::make(5) ] = 5;
+ m [ PC::make(7) ] = 6;
+ m [ PC::make(9) ] = 7;
+ m [ PC::make(11) ] = 8;
+ m [ PC::make(13) ] = 9;
+ m [ PC::make(15) ] = 10;
+ m [ PC::make(17) ] = 11;
+ m [ PC::make(19) ] = 12;
+
+ R r = m.equal_range(5);
+ assert(r.first == next(m.begin(), 0));
+ assert(r.second == next(m.begin(), 1));
+ r = m.equal_range(7);
+ assert(r.first == next(m.begin(), 1));
+ assert(r.second == next(m.begin(), 2));
+ r = m.equal_range(9);
+ assert(r.first == next(m.begin(), 2));
+ assert(r.second == next(m.begin(), 3));
+ r = m.equal_range(11);
+ assert(r.first == next(m.begin(), 3));
+ assert(r.second == next(m.begin(), 4));
+ r = m.equal_range(13);
+ assert(r.first == next(m.begin(), 4));
+ assert(r.second == next(m.begin(), 5));
+ r = m.equal_range(15);
+ assert(r.first == next(m.begin(), 5));
+ assert(r.second == next(m.begin(), 6));
+ r = m.equal_range(17);
+ assert(r.first == next(m.begin(), 6));
+ assert(r.second == next(m.begin(), 7));
+ r = m.equal_range(19);
+ assert(r.first == next(m.begin(), 7));
+ assert(r.second == next(m.begin(), 8));
+ r = m.equal_range(4);
+ assert(r.first == next(m.begin(), 0));
+ assert(r.second == next(m.begin(), 0));
+ r = m.equal_range(6);
+ assert(r.first == next(m.begin(), 1));
+ assert(r.second == next(m.begin(), 1));
+ r = m.equal_range(8);
+ assert(r.first == next(m.begin(), 2));
+ assert(r.second == next(m.begin(), 2));
+ r = m.equal_range(10);
+ assert(r.first == next(m.begin(), 3));
+ assert(r.second == next(m.begin(), 3));
+ r = m.equal_range(12);
+ assert(r.first == next(m.begin(), 4));
+ assert(r.second == next(m.begin(), 4));
+ r = m.equal_range(14);
+ assert(r.first == next(m.begin(), 5));
+ assert(r.second == next(m.begin(), 5));
+ r = m.equal_range(16);
+ assert(r.first == next(m.begin(), 6));
+ assert(r.second == next(m.begin(), 6));
+ r = m.equal_range(18);
+ assert(r.first == next(m.begin(), 7));
+ assert(r.second == next(m.begin(), 7));
+ r = m.equal_range(20);
+ assert(r.first == next(m.begin(), 8));
+ assert(r.second == next(m.begin(), 8));
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.ops/equal_range0.pass.cpp b/test/std/containers/associative/map/map.ops/equal_range0.pass.cpp
new file mode 100644
index 000000000000..c95c3dffa9a5
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/equal_range0.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// XFAIL: c++03, c++11
+
+// <map>
+
+// class map
+
+// iterator find(const key_type& k);
+// const_iterator find(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+int main()
+{
+ typedef std::map<int, double, transparent_less> M;
+
+ M().equal_range(C2Int{5});
+}
diff --git a/test/std/containers/associative/map/map.ops/equal_range1.fail.cpp b/test/std/containers/associative/map/map.ops/equal_range1.fail.cpp
new file mode 100644
index 000000000000..8f0da08eb322
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/equal_range1.fail.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator find(const key_type& k);
+// const_iterator find(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+#if _LIBCPP_STD_VER <= 11
+#error "This test requires is C++14 (or later)"
+#else
+
+int main()
+{
+ {
+ typedef std::map<int, double, transparent_less_no_type> M;
+
+ M().equal_range(C2Int{5});
+ }
+}
+#endif \ No newline at end of file
diff --git a/test/std/containers/associative/map/map.ops/equal_range2.fail.cpp b/test/std/containers/associative/map/map.ops/equal_range2.fail.cpp
new file mode 100644
index 000000000000..e73122d6533b
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/equal_range2.fail.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator find(const key_type& k);
+// const_iterator find(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+#if _LIBCPP_STD_VER <= 11
+#error "This test requires is C++14 (or later)"
+#else
+
+int main()
+{
+ {
+ typedef std::map<int, double, transparent_less_private> M;
+
+ M().equal_range(C2Int{5});
+ }
+}
+#endif \ No newline at end of file
diff --git a/test/std/containers/associative/map/map.ops/equal_range3.fail.cpp b/test/std/containers/associative/map/map.ops/equal_range3.fail.cpp
new file mode 100644
index 000000000000..bb72e9e7a6d4
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/equal_range3.fail.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator find(const key_type& k);
+// const_iterator find(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+#if _LIBCPP_STD_VER <= 11
+#error "This test requires is C++14 (or later)"
+#else
+
+int main()
+{
+ {
+ typedef std::map<int, double, transparent_less_not_a_type> M;
+
+ M().equal_range(C2Int{5});
+ }
+}
+#endif \ No newline at end of file
diff --git a/test/std/containers/associative/map/map.ops/find.pass.cpp b/test/std/containers/associative/map/map.ops/find.pass.cpp
new file mode 100644
index 000000000000..17463b65740f
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/find.pass.cpp
@@ -0,0 +1,260 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator find(const key_type& k);
+// const_iterator find(const key_type& k) const;
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+#include "private_constructor.hpp"
+#include "is_transparent.h"
+
+int main()
+{
+ {
+ typedef std::pair<const int, double> V;
+ typedef std::map<int, double> M;
+ {
+ typedef M::iterator R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.find(5);
+ assert(r == m.begin());
+ r = m.find(6);
+ assert(r == next(m.begin()));
+ r = m.find(7);
+ assert(r == next(m.begin(), 2));
+ r = m.find(8);
+ assert(r == next(m.begin(), 3));
+ r = m.find(9);
+ assert(r == next(m.begin(), 4));
+ r = m.find(10);
+ assert(r == next(m.begin(), 5));
+ r = m.find(11);
+ assert(r == next(m.begin(), 6));
+ r = m.find(12);
+ assert(r == next(m.begin(), 7));
+ r = m.find(4);
+ assert(r == next(m.begin(), 8));
+ }
+ {
+ typedef M::const_iterator R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ const M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.find(5);
+ assert(r == m.begin());
+ r = m.find(6);
+ assert(r == next(m.begin()));
+ r = m.find(7);
+ assert(r == next(m.begin(), 2));
+ r = m.find(8);
+ assert(r == next(m.begin(), 3));
+ r = m.find(9);
+ assert(r == next(m.begin(), 4));
+ r = m.find(10);
+ assert(r == next(m.begin(), 5));
+ r = m.find(11);
+ assert(r == next(m.begin(), 6));
+ r = m.find(12);
+ assert(r == next(m.begin(), 7));
+ r = m.find(4);
+ assert(r == next(m.begin(), 8));
+ }
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ typedef std::map<int, double, std::less<int>, min_allocator<V>> M;
+ {
+ typedef M::iterator R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.find(5);
+ assert(r == m.begin());
+ r = m.find(6);
+ assert(r == next(m.begin()));
+ r = m.find(7);
+ assert(r == next(m.begin(), 2));
+ r = m.find(8);
+ assert(r == next(m.begin(), 3));
+ r = m.find(9);
+ assert(r == next(m.begin(), 4));
+ r = m.find(10);
+ assert(r == next(m.begin(), 5));
+ r = m.find(11);
+ assert(r == next(m.begin(), 6));
+ r = m.find(12);
+ assert(r == next(m.begin(), 7));
+ r = m.find(4);
+ assert(r == next(m.begin(), 8));
+ }
+ {
+ typedef M::const_iterator R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ const M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.find(5);
+ assert(r == m.begin());
+ r = m.find(6);
+ assert(r == next(m.begin()));
+ r = m.find(7);
+ assert(r == next(m.begin(), 2));
+ r = m.find(8);
+ assert(r == next(m.begin(), 3));
+ r = m.find(9);
+ assert(r == next(m.begin(), 4));
+ r = m.find(10);
+ assert(r == next(m.begin(), 5));
+ r = m.find(11);
+ assert(r == next(m.begin(), 6));
+ r = m.find(12);
+ assert(r == next(m.begin(), 7));
+ r = m.find(4);
+ assert(r == next(m.begin(), 8));
+ }
+ }
+#endif
+#if _LIBCPP_STD_VER > 11
+ {
+ typedef std::pair<const int, double> V;
+ typedef std::map<int, double, std::less<>> M;
+ typedef M::iterator R;
+
+ V ar[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.find(5);
+ assert(r == m.begin());
+ r = m.find(6);
+ assert(r == next(m.begin()));
+ r = m.find(7);
+ assert(r == next(m.begin(), 2));
+ r = m.find(8);
+ assert(r == next(m.begin(), 3));
+ r = m.find(9);
+ assert(r == next(m.begin(), 4));
+ r = m.find(10);
+ assert(r == next(m.begin(), 5));
+ r = m.find(11);
+ assert(r == next(m.begin(), 6));
+ r = m.find(12);
+ assert(r == next(m.begin(), 7));
+ r = m.find(4);
+ assert(r == next(m.begin(), 8));
+
+ r = m.find(C2Int(5));
+ assert(r == m.begin());
+ r = m.find(C2Int(6));
+ assert(r == next(m.begin()));
+ r = m.find(C2Int(7));
+ assert(r == next(m.begin(), 2));
+ r = m.find(C2Int(8));
+ assert(r == next(m.begin(), 3));
+ r = m.find(C2Int(9));
+ assert(r == next(m.begin(), 4));
+ r = m.find(C2Int(10));
+ assert(r == next(m.begin(), 5));
+ r = m.find(C2Int(11));
+ assert(r == next(m.begin(), 6));
+ r = m.find(C2Int(12));
+ assert(r == next(m.begin(), 7));
+ r = m.find(C2Int(4));
+ assert(r == next(m.begin(), 8));
+ }
+
+ {
+ typedef PrivateConstructor PC;
+ typedef std::map<PC, double, std::less<>> M;
+ typedef M::iterator R;
+
+ M m;
+ m [ PC::make(5) ] = 5;
+ m [ PC::make(6) ] = 6;
+ m [ PC::make(7) ] = 7;
+ m [ PC::make(8) ] = 8;
+ m [ PC::make(9) ] = 9;
+ m [ PC::make(10) ] = 10;
+ m [ PC::make(11) ] = 11;
+ m [ PC::make(12) ] = 12;
+
+ R r = m.find(5);
+ assert(r == m.begin());
+ r = m.find(6);
+ assert(r == next(m.begin()));
+ r = m.find(7);
+ assert(r == next(m.begin(), 2));
+ r = m.find(8);
+ assert(r == next(m.begin(), 3));
+ r = m.find(9);
+ assert(r == next(m.begin(), 4));
+ r = m.find(10);
+ assert(r == next(m.begin(), 5));
+ r = m.find(11);
+ assert(r == next(m.begin(), 6));
+ r = m.find(12);
+ assert(r == next(m.begin(), 7));
+ r = m.find(4);
+ assert(r == next(m.begin(), 8));
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.ops/find0.pass.cpp b/test/std/containers/associative/map/map.ops/find0.pass.cpp
new file mode 100644
index 000000000000..5f310b07c599
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/find0.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// XFAIL: c++03, c++11
+
+// <map>
+
+// class map
+
+// iterator find(const key_type& k);
+// const_iterator find(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+int main()
+{
+ typedef std::map<int, double, transparent_less> M;
+
+ M().find(C2Int{5});
+}
diff --git a/test/std/containers/associative/map/map.ops/find1.fail.cpp b/test/std/containers/associative/map/map.ops/find1.fail.cpp
new file mode 100644
index 000000000000..c33b5a9a34cf
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/find1.fail.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator find(const key_type& k);
+// const_iterator find(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+#if _LIBCPP_STD_VER <= 11
+#error "This test requires is C++14 (or later)"
+#else
+
+int main()
+{
+ {
+ typedef std::map<int, double, transparent_less_no_type> M;
+
+ M().find(C2Int{5});
+ }
+}
+#endif \ No newline at end of file
diff --git a/test/std/containers/associative/map/map.ops/find2.fail.cpp b/test/std/containers/associative/map/map.ops/find2.fail.cpp
new file mode 100644
index 000000000000..40bf323a4538
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/find2.fail.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator find(const key_type& k);
+// const_iterator find(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+#if _LIBCPP_STD_VER <= 11
+#error "This test requires is C++14 (or later)"
+#else
+
+int main()
+{
+ {
+ typedef std::map<int, double, transparent_less_private> M;
+
+ M().find(C2Int{5});
+ }
+}
+#endif \ No newline at end of file
diff --git a/test/std/containers/associative/map/map.ops/find3.fail.cpp b/test/std/containers/associative/map/map.ops/find3.fail.cpp
new file mode 100644
index 000000000000..9526c0e24d9e
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/find3.fail.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator find(const key_type& k);
+// const_iterator find(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+#if _LIBCPP_STD_VER <= 11
+#error "This test requires is C++14 (or later)"
+#else
+
+int main()
+{
+ {
+ typedef std::map<int, double, transparent_less_not_a_type> M;
+
+ M().find(C2Int{5});
+ }
+}
+#endif \ No newline at end of file
diff --git a/test/std/containers/associative/map/map.ops/lower_bound.pass.cpp b/test/std/containers/associative/map/map.ops/lower_bound.pass.cpp
new file mode 100644
index 000000000000..3cbfbf7d869f
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/lower_bound.pass.cpp
@@ -0,0 +1,372 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator lower_bound(const key_type& k);
+// const_iterator lower_bound(const key_type& k) const;
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+#include "private_constructor.hpp"
+#include "is_transparent.h"
+
+int main()
+{
+ {
+ typedef std::pair<const int, double> V;
+ typedef std::map<int, double> M;
+ {
+ typedef M::iterator R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(7, 6),
+ V(9, 7),
+ V(11, 8),
+ V(13, 9),
+ V(15, 10),
+ V(17, 11),
+ V(19, 12)
+ };
+ M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.lower_bound(5);
+ assert(r == m.begin());
+ r = m.lower_bound(7);
+ assert(r == next(m.begin()));
+ r = m.lower_bound(9);
+ assert(r == next(m.begin(), 2));
+ r = m.lower_bound(11);
+ assert(r == next(m.begin(), 3));
+ r = m.lower_bound(13);
+ assert(r == next(m.begin(), 4));
+ r = m.lower_bound(15);
+ assert(r == next(m.begin(), 5));
+ r = m.lower_bound(17);
+ assert(r == next(m.begin(), 6));
+ r = m.lower_bound(19);
+ assert(r == next(m.begin(), 7));
+ r = m.lower_bound(4);
+ assert(r == next(m.begin(), 0));
+ r = m.lower_bound(6);
+ assert(r == next(m.begin(), 1));
+ r = m.lower_bound(8);
+ assert(r == next(m.begin(), 2));
+ r = m.lower_bound(10);
+ assert(r == next(m.begin(), 3));
+ r = m.lower_bound(12);
+ assert(r == next(m.begin(), 4));
+ r = m.lower_bound(14);
+ assert(r == next(m.begin(), 5));
+ r = m.lower_bound(16);
+ assert(r == next(m.begin(), 6));
+ r = m.lower_bound(18);
+ assert(r == next(m.begin(), 7));
+ r = m.lower_bound(20);
+ assert(r == next(m.begin(), 8));
+ }
+ {
+ typedef M::const_iterator R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(7, 6),
+ V(9, 7),
+ V(11, 8),
+ V(13, 9),
+ V(15, 10),
+ V(17, 11),
+ V(19, 12)
+ };
+ const M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.lower_bound(5);
+ assert(r == m.begin());
+ r = m.lower_bound(7);
+ assert(r == next(m.begin()));
+ r = m.lower_bound(9);
+ assert(r == next(m.begin(), 2));
+ r = m.lower_bound(11);
+ assert(r == next(m.begin(), 3));
+ r = m.lower_bound(13);
+ assert(r == next(m.begin(), 4));
+ r = m.lower_bound(15);
+ assert(r == next(m.begin(), 5));
+ r = m.lower_bound(17);
+ assert(r == next(m.begin(), 6));
+ r = m.lower_bound(19);
+ assert(r == next(m.begin(), 7));
+ r = m.lower_bound(4);
+ assert(r == next(m.begin(), 0));
+ r = m.lower_bound(6);
+ assert(r == next(m.begin(), 1));
+ r = m.lower_bound(8);
+ assert(r == next(m.begin(), 2));
+ r = m.lower_bound(10);
+ assert(r == next(m.begin(), 3));
+ r = m.lower_bound(12);
+ assert(r == next(m.begin(), 4));
+ r = m.lower_bound(14);
+ assert(r == next(m.begin(), 5));
+ r = m.lower_bound(16);
+ assert(r == next(m.begin(), 6));
+ r = m.lower_bound(18);
+ assert(r == next(m.begin(), 7));
+ r = m.lower_bound(20);
+ assert(r == next(m.begin(), 8));
+ }
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ typedef std::map<int, double, std::less<int>, min_allocator<V>> M;
+ {
+ typedef M::iterator R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(7, 6),
+ V(9, 7),
+ V(11, 8),
+ V(13, 9),
+ V(15, 10),
+ V(17, 11),
+ V(19, 12)
+ };
+ M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.lower_bound(5);
+ assert(r == m.begin());
+ r = m.lower_bound(7);
+ assert(r == next(m.begin()));
+ r = m.lower_bound(9);
+ assert(r == next(m.begin(), 2));
+ r = m.lower_bound(11);
+ assert(r == next(m.begin(), 3));
+ r = m.lower_bound(13);
+ assert(r == next(m.begin(), 4));
+ r = m.lower_bound(15);
+ assert(r == next(m.begin(), 5));
+ r = m.lower_bound(17);
+ assert(r == next(m.begin(), 6));
+ r = m.lower_bound(19);
+ assert(r == next(m.begin(), 7));
+ r = m.lower_bound(4);
+ assert(r == next(m.begin(), 0));
+ r = m.lower_bound(6);
+ assert(r == next(m.begin(), 1));
+ r = m.lower_bound(8);
+ assert(r == next(m.begin(), 2));
+ r = m.lower_bound(10);
+ assert(r == next(m.begin(), 3));
+ r = m.lower_bound(12);
+ assert(r == next(m.begin(), 4));
+ r = m.lower_bound(14);
+ assert(r == next(m.begin(), 5));
+ r = m.lower_bound(16);
+ assert(r == next(m.begin(), 6));
+ r = m.lower_bound(18);
+ assert(r == next(m.begin(), 7));
+ r = m.lower_bound(20);
+ assert(r == next(m.begin(), 8));
+ }
+ {
+ typedef M::const_iterator R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(7, 6),
+ V(9, 7),
+ V(11, 8),
+ V(13, 9),
+ V(15, 10),
+ V(17, 11),
+ V(19, 12)
+ };
+ const M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.lower_bound(5);
+ assert(r == m.begin());
+ r = m.lower_bound(7);
+ assert(r == next(m.begin()));
+ r = m.lower_bound(9);
+ assert(r == next(m.begin(), 2));
+ r = m.lower_bound(11);
+ assert(r == next(m.begin(), 3));
+ r = m.lower_bound(13);
+ assert(r == next(m.begin(), 4));
+ r = m.lower_bound(15);
+ assert(r == next(m.begin(), 5));
+ r = m.lower_bound(17);
+ assert(r == next(m.begin(), 6));
+ r = m.lower_bound(19);
+ assert(r == next(m.begin(), 7));
+ r = m.lower_bound(4);
+ assert(r == next(m.begin(), 0));
+ r = m.lower_bound(6);
+ assert(r == next(m.begin(), 1));
+ r = m.lower_bound(8);
+ assert(r == next(m.begin(), 2));
+ r = m.lower_bound(10);
+ assert(r == next(m.begin(), 3));
+ r = m.lower_bound(12);
+ assert(r == next(m.begin(), 4));
+ r = m.lower_bound(14);
+ assert(r == next(m.begin(), 5));
+ r = m.lower_bound(16);
+ assert(r == next(m.begin(), 6));
+ r = m.lower_bound(18);
+ assert(r == next(m.begin(), 7));
+ r = m.lower_bound(20);
+ assert(r == next(m.begin(), 8));
+ }
+ }
+#endif
+#if _LIBCPP_STD_VER > 11
+ {
+ typedef std::pair<const int, double> V;
+ typedef std::map<int, double, std::less <>> M;
+ typedef M::iterator R;
+
+ V ar[] =
+ {
+ V(5, 5),
+ V(7, 6),
+ V(9, 7),
+ V(11, 8),
+ V(13, 9),
+ V(15, 10),
+ V(17, 11),
+ V(19, 12)
+ };
+ M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.lower_bound(5);
+ assert(r == m.begin());
+ r = m.lower_bound(7);
+ assert(r == next(m.begin()));
+ r = m.lower_bound(9);
+ assert(r == next(m.begin(), 2));
+ r = m.lower_bound(11);
+ assert(r == next(m.begin(), 3));
+ r = m.lower_bound(13);
+ assert(r == next(m.begin(), 4));
+ r = m.lower_bound(15);
+ assert(r == next(m.begin(), 5));
+ r = m.lower_bound(17);
+ assert(r == next(m.begin(), 6));
+ r = m.lower_bound(19);
+ assert(r == next(m.begin(), 7));
+ r = m.lower_bound(4);
+ assert(r == next(m.begin(), 0));
+ r = m.lower_bound(6);
+ assert(r == next(m.begin(), 1));
+ r = m.lower_bound(8);
+ assert(r == next(m.begin(), 2));
+ r = m.lower_bound(10);
+ assert(r == next(m.begin(), 3));
+ r = m.lower_bound(12);
+ assert(r == next(m.begin(), 4));
+ r = m.lower_bound(14);
+ assert(r == next(m.begin(), 5));
+ r = m.lower_bound(16);
+ assert(r == next(m.begin(), 6));
+ r = m.lower_bound(18);
+ assert(r == next(m.begin(), 7));
+ r = m.lower_bound(20);
+ assert(r == next(m.begin(), 8));
+
+ r = m.lower_bound(C2Int(5));
+ assert(r == m.begin());
+ r = m.lower_bound(C2Int(7));
+ assert(r == next(m.begin()));
+ r = m.lower_bound(C2Int(9));
+ assert(r == next(m.begin(), 2));
+ r = m.lower_bound(C2Int(11));
+ assert(r == next(m.begin(), 3));
+ r = m.lower_bound(C2Int(13));
+ assert(r == next(m.begin(), 4));
+ r = m.lower_bound(C2Int(15));
+ assert(r == next(m.begin(), 5));
+ r = m.lower_bound(C2Int(17));
+ assert(r == next(m.begin(), 6));
+ r = m.lower_bound(C2Int(19));
+ assert(r == next(m.begin(), 7));
+ r = m.lower_bound(C2Int(4));
+ assert(r == next(m.begin(), 0));
+ r = m.lower_bound(C2Int(6));
+ assert(r == next(m.begin(), 1));
+ r = m.lower_bound(C2Int(8));
+ assert(r == next(m.begin(), 2));
+ r = m.lower_bound(C2Int(10));
+ assert(r == next(m.begin(), 3));
+ r = m.lower_bound(C2Int(12));
+ assert(r == next(m.begin(), 4));
+ r = m.lower_bound(C2Int(14));
+ assert(r == next(m.begin(), 5));
+ r = m.lower_bound(C2Int(16));
+ assert(r == next(m.begin(), 6));
+ r = m.lower_bound(C2Int(18));
+ assert(r == next(m.begin(), 7));
+ r = m.lower_bound(C2Int(20));
+ assert(r == next(m.begin(), 8));
+ }
+
+ {
+ typedef PrivateConstructor PC;
+ typedef std::map<PC, double, std::less<>> M;
+ typedef M::iterator R;
+
+ M m;
+ m [ PC::make(5) ] = 5;
+ m [ PC::make(7) ] = 6;
+ m [ PC::make(9) ] = 7;
+ m [ PC::make(11) ] = 8;
+ m [ PC::make(13) ] = 9;
+ m [ PC::make(15) ] = 10;
+ m [ PC::make(17) ] = 11;
+ m [ PC::make(19) ] = 12;
+
+ R r = m.lower_bound(5);
+ assert(r == m.begin());
+ r = m.lower_bound(7);
+ assert(r == next(m.begin()));
+ r = m.lower_bound(9);
+ assert(r == next(m.begin(), 2));
+ r = m.lower_bound(11);
+ assert(r == next(m.begin(), 3));
+ r = m.lower_bound(13);
+ assert(r == next(m.begin(), 4));
+ r = m.lower_bound(15);
+ assert(r == next(m.begin(), 5));
+ r = m.lower_bound(17);
+ assert(r == next(m.begin(), 6));
+ r = m.lower_bound(19);
+ assert(r == next(m.begin(), 7));
+ r = m.lower_bound(4);
+ assert(r == next(m.begin(), 0));
+ r = m.lower_bound(6);
+ assert(r == next(m.begin(), 1));
+ r = m.lower_bound(8);
+ assert(r == next(m.begin(), 2));
+ r = m.lower_bound(10);
+ assert(r == next(m.begin(), 3));
+ r = m.lower_bound(12);
+ assert(r == next(m.begin(), 4));
+ r = m.lower_bound(14);
+ assert(r == next(m.begin(), 5));
+ r = m.lower_bound(16);
+ assert(r == next(m.begin(), 6));
+ r = m.lower_bound(18);
+ assert(r == next(m.begin(), 7));
+ r = m.lower_bound(20);
+ assert(r == next(m.begin(), 8));
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.ops/lower_bound0.pass.cpp b/test/std/containers/associative/map/map.ops/lower_bound0.pass.cpp
new file mode 100644
index 000000000000..2fc095a8f2c1
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/lower_bound0.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// XFAIL: c++03, c++11
+
+// <map>
+
+// class map
+
+// iterator lower_bound(const key_type& k);
+// const_iterator lower_bound(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+int main()
+{
+ typedef std::map<int, double, transparent_less> M;
+
+ M().lower_bound(C2Int{5});
+}
diff --git a/test/std/containers/associative/map/map.ops/lower_bound1.fail.cpp b/test/std/containers/associative/map/map.ops/lower_bound1.fail.cpp
new file mode 100644
index 000000000000..a4a986c1a7a4
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/lower_bound1.fail.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator lower_bound(const key_type& k);
+// const_iterator lower_bound(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+#if _LIBCPP_STD_VER <= 11
+#error "This test requires is C++14 (or later)"
+#else
+
+int main()
+{
+ {
+ typedef std::map<int, double, transparent_less_no_type> M;
+
+ M().lower_bound(C2Int{5});
+ }
+}
+#endif
diff --git a/test/std/containers/associative/map/map.ops/lower_bound2.fail.cpp b/test/std/containers/associative/map/map.ops/lower_bound2.fail.cpp
new file mode 100644
index 000000000000..3f6380e5e25f
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/lower_bound2.fail.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator lower_bound(const key_type& k);
+// const_iterator lower_bound(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+#if _LIBCPP_STD_VER <= 11
+#error "This test requires is C++14 (or later)"
+#else
+
+int main()
+{
+ {
+ typedef std::map<int, double, transparent_less_private> M;
+
+ M().lower_bound(C2Int{5});
+ }
+}
+#endif
diff --git a/test/std/containers/associative/map/map.ops/lower_bound3.fail.cpp b/test/std/containers/associative/map/map.ops/lower_bound3.fail.cpp
new file mode 100644
index 000000000000..18f2c7b71fde
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/lower_bound3.fail.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator lower_bound(const key_type& k);
+// const_iterator lower_bound(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+#if _LIBCPP_STD_VER <= 11
+#error "This test requires is C++14 (or later)"
+#else
+
+int main()
+{
+ {
+ typedef std::map<int, double, transparent_less_not_a_type> M;
+
+ M().lower_bound(C2Int{5});
+ }
+}
+#endif
diff --git a/test/std/containers/associative/map/map.ops/upper_bound.pass.cpp b/test/std/containers/associative/map/map.ops/upper_bound.pass.cpp
new file mode 100644
index 000000000000..037ceb962cd8
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/upper_bound.pass.cpp
@@ -0,0 +1,335 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator upper_bound(const key_type& k);
+// const_iterator upper_bound(const key_type& k) const;
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+#include "private_constructor.hpp"
+
+int main()
+{
+ {
+ typedef std::pair<const int, double> V;
+ typedef std::map<int, double> M;
+ {
+ typedef M::iterator R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(7, 6),
+ V(9, 7),
+ V(11, 8),
+ V(13, 9),
+ V(15, 10),
+ V(17, 11),
+ V(19, 12)
+ };
+ M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.upper_bound(5);
+ assert(r == next(m.begin(), 1));
+ r = m.upper_bound(7);
+ assert(r == next(m.begin(), 2));
+ r = m.upper_bound(9);
+ assert(r == next(m.begin(), 3));
+ r = m.upper_bound(11);
+ assert(r == next(m.begin(), 4));
+ r = m.upper_bound(13);
+ assert(r == next(m.begin(), 5));
+ r = m.upper_bound(15);
+ assert(r == next(m.begin(), 6));
+ r = m.upper_bound(17);
+ assert(r == next(m.begin(), 7));
+ r = m.upper_bound(19);
+ assert(r == next(m.begin(), 8));
+ r = m.upper_bound(4);
+ assert(r == next(m.begin(), 0));
+ r = m.upper_bound(6);
+ assert(r == next(m.begin(), 1));
+ r = m.upper_bound(8);
+ assert(r == next(m.begin(), 2));
+ r = m.upper_bound(10);
+ assert(r == next(m.begin(), 3));
+ r = m.upper_bound(12);
+ assert(r == next(m.begin(), 4));
+ r = m.upper_bound(14);
+ assert(r == next(m.begin(), 5));
+ r = m.upper_bound(16);
+ assert(r == next(m.begin(), 6));
+ r = m.upper_bound(18);
+ assert(r == next(m.begin(), 7));
+ r = m.upper_bound(20);
+ assert(r == next(m.begin(), 8));
+ }
+ {
+ typedef M::const_iterator R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(7, 6),
+ V(9, 7),
+ V(11, 8),
+ V(13, 9),
+ V(15, 10),
+ V(17, 11),
+ V(19, 12)
+ };
+ const M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.upper_bound(5);
+ assert(r == next(m.begin(), 1));
+ r = m.upper_bound(7);
+ assert(r == next(m.begin(), 2));
+ r = m.upper_bound(9);
+ assert(r == next(m.begin(), 3));
+ r = m.upper_bound(11);
+ assert(r == next(m.begin(), 4));
+ r = m.upper_bound(13);
+ assert(r == next(m.begin(), 5));
+ r = m.upper_bound(15);
+ assert(r == next(m.begin(), 6));
+ r = m.upper_bound(17);
+ assert(r == next(m.begin(), 7));
+ r = m.upper_bound(19);
+ assert(r == next(m.begin(), 8));
+ r = m.upper_bound(4);
+ assert(r == next(m.begin(), 0));
+ r = m.upper_bound(6);
+ assert(r == next(m.begin(), 1));
+ r = m.upper_bound(8);
+ assert(r == next(m.begin(), 2));
+ r = m.upper_bound(10);
+ assert(r == next(m.begin(), 3));
+ r = m.upper_bound(12);
+ assert(r == next(m.begin(), 4));
+ r = m.upper_bound(14);
+ assert(r == next(m.begin(), 5));
+ r = m.upper_bound(16);
+ assert(r == next(m.begin(), 6));
+ r = m.upper_bound(18);
+ assert(r == next(m.begin(), 7));
+ r = m.upper_bound(20);
+ assert(r == next(m.begin(), 8));
+ }
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ typedef std::map<int, double, std::less<int>, min_allocator<V>> M;
+ {
+ typedef M::iterator R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(7, 6),
+ V(9, 7),
+ V(11, 8),
+ V(13, 9),
+ V(15, 10),
+ V(17, 11),
+ V(19, 12)
+ };
+ M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.upper_bound(5);
+ assert(r == next(m.begin(), 1));
+ r = m.upper_bound(7);
+ assert(r == next(m.begin(), 2));
+ r = m.upper_bound(9);
+ assert(r == next(m.begin(), 3));
+ r = m.upper_bound(11);
+ assert(r == next(m.begin(), 4));
+ r = m.upper_bound(13);
+ assert(r == next(m.begin(), 5));
+ r = m.upper_bound(15);
+ assert(r == next(m.begin(), 6));
+ r = m.upper_bound(17);
+ assert(r == next(m.begin(), 7));
+ r = m.upper_bound(19);
+ assert(r == next(m.begin(), 8));
+ r = m.upper_bound(4);
+ assert(r == next(m.begin(), 0));
+ r = m.upper_bound(6);
+ assert(r == next(m.begin(), 1));
+ r = m.upper_bound(8);
+ assert(r == next(m.begin(), 2));
+ r = m.upper_bound(10);
+ assert(r == next(m.begin(), 3));
+ r = m.upper_bound(12);
+ assert(r == next(m.begin(), 4));
+ r = m.upper_bound(14);
+ assert(r == next(m.begin(), 5));
+ r = m.upper_bound(16);
+ assert(r == next(m.begin(), 6));
+ r = m.upper_bound(18);
+ assert(r == next(m.begin(), 7));
+ r = m.upper_bound(20);
+ assert(r == next(m.begin(), 8));
+ }
+ {
+ typedef M::const_iterator R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(7, 6),
+ V(9, 7),
+ V(11, 8),
+ V(13, 9),
+ V(15, 10),
+ V(17, 11),
+ V(19, 12)
+ };
+ const M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.upper_bound(5);
+ assert(r == next(m.begin(), 1));
+ r = m.upper_bound(7);
+ assert(r == next(m.begin(), 2));
+ r = m.upper_bound(9);
+ assert(r == next(m.begin(), 3));
+ r = m.upper_bound(11);
+ assert(r == next(m.begin(), 4));
+ r = m.upper_bound(13);
+ assert(r == next(m.begin(), 5));
+ r = m.upper_bound(15);
+ assert(r == next(m.begin(), 6));
+ r = m.upper_bound(17);
+ assert(r == next(m.begin(), 7));
+ r = m.upper_bound(19);
+ assert(r == next(m.begin(), 8));
+ r = m.upper_bound(4);
+ assert(r == next(m.begin(), 0));
+ r = m.upper_bound(6);
+ assert(r == next(m.begin(), 1));
+ r = m.upper_bound(8);
+ assert(r == next(m.begin(), 2));
+ r = m.upper_bound(10);
+ assert(r == next(m.begin(), 3));
+ r = m.upper_bound(12);
+ assert(r == next(m.begin(), 4));
+ r = m.upper_bound(14);
+ assert(r == next(m.begin(), 5));
+ r = m.upper_bound(16);
+ assert(r == next(m.begin(), 6));
+ r = m.upper_bound(18);
+ assert(r == next(m.begin(), 7));
+ r = m.upper_bound(20);
+ assert(r == next(m.begin(), 8));
+ }
+ }
+#endif
+#if _LIBCPP_STD_VER > 11
+ {
+ typedef std::pair<const int, double> V;
+ typedef std::map<int, double, std::less<>> M;
+ typedef M::iterator R;
+ V ar[] =
+ {
+ V(5, 5),
+ V(7, 6),
+ V(9, 7),
+ V(11, 8),
+ V(13, 9),
+ V(15, 10),
+ V(17, 11),
+ V(19, 12)
+ };
+ M m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ R r = m.upper_bound(5);
+ assert(r == next(m.begin(), 1));
+ r = m.upper_bound(7);
+ assert(r == next(m.begin(), 2));
+ r = m.upper_bound(9);
+ assert(r == next(m.begin(), 3));
+ r = m.upper_bound(11);
+ assert(r == next(m.begin(), 4));
+ r = m.upper_bound(13);
+ assert(r == next(m.begin(), 5));
+ r = m.upper_bound(15);
+ assert(r == next(m.begin(), 6));
+ r = m.upper_bound(17);
+ assert(r == next(m.begin(), 7));
+ r = m.upper_bound(19);
+ assert(r == next(m.begin(), 8));
+ r = m.upper_bound(4);
+ assert(r == next(m.begin(), 0));
+ r = m.upper_bound(6);
+ assert(r == next(m.begin(), 1));
+ r = m.upper_bound(8);
+ assert(r == next(m.begin(), 2));
+ r = m.upper_bound(10);
+ assert(r == next(m.begin(), 3));
+ r = m.upper_bound(12);
+ assert(r == next(m.begin(), 4));
+ r = m.upper_bound(14);
+ assert(r == next(m.begin(), 5));
+ r = m.upper_bound(16);
+ assert(r == next(m.begin(), 6));
+ r = m.upper_bound(18);
+ assert(r == next(m.begin(), 7));
+ r = m.upper_bound(20);
+ assert(r == next(m.begin(), 8));
+ }
+
+ {
+ typedef PrivateConstructor PC;
+ typedef std::map<PC, double, std::less<>> M;
+ typedef M::iterator R;
+
+ M m;
+ m [ PC::make(5) ] = 5;
+ m [ PC::make(7) ] = 6;
+ m [ PC::make(9) ] = 7;
+ m [ PC::make(11) ] = 8;
+ m [ PC::make(13) ] = 9;
+ m [ PC::make(15) ] = 10;
+ m [ PC::make(17) ] = 11;
+ m [ PC::make(19) ] = 12;
+
+ R r = m.upper_bound(5);
+ assert(r == next(m.begin(), 1));
+ r = m.upper_bound(7);
+ assert(r == next(m.begin(), 2));
+ r = m.upper_bound(9);
+ assert(r == next(m.begin(), 3));
+ r = m.upper_bound(11);
+ assert(r == next(m.begin(), 4));
+ r = m.upper_bound(13);
+ assert(r == next(m.begin(), 5));
+ r = m.upper_bound(15);
+ assert(r == next(m.begin(), 6));
+ r = m.upper_bound(17);
+ assert(r == next(m.begin(), 7));
+ r = m.upper_bound(19);
+ assert(r == next(m.begin(), 8));
+ r = m.upper_bound(4);
+ assert(r == next(m.begin(), 0));
+ r = m.upper_bound(6);
+ assert(r == next(m.begin(), 1));
+ r = m.upper_bound(8);
+ assert(r == next(m.begin(), 2));
+ r = m.upper_bound(10);
+ assert(r == next(m.begin(), 3));
+ r = m.upper_bound(12);
+ assert(r == next(m.begin(), 4));
+ r = m.upper_bound(14);
+ assert(r == next(m.begin(), 5));
+ r = m.upper_bound(16);
+ assert(r == next(m.begin(), 6));
+ r = m.upper_bound(18);
+ assert(r == next(m.begin(), 7));
+ r = m.upper_bound(20);
+ assert(r == next(m.begin(), 8));
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.ops/upper_bound0.pass.cpp b/test/std/containers/associative/map/map.ops/upper_bound0.pass.cpp
new file mode 100644
index 000000000000..c58e55f29793
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/upper_bound0.pass.cpp
@@ -0,0 +1,34 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// XFAIL: c++03, c++11
+
+// <map>
+
+// class map
+
+// iterator upper_bound(const key_type& k);
+// const_iterator upper_bound(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+int main()
+{
+ typedef std::map<int, double, transparent_less> M;
+
+ M().upper_bound(C2Int{5});
+}
diff --git a/test/std/containers/associative/map/map.ops/upper_bound1.fail.cpp b/test/std/containers/associative/map/map.ops/upper_bound1.fail.cpp
new file mode 100644
index 000000000000..4647681b5cd1
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/upper_bound1.fail.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator upper_bound(const key_type& k);
+// const_iterator upper_bound(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+#if _LIBCPP_STD_VER <= 11
+#error "This test requires is C++14 (or later)"
+#else
+
+int main()
+{
+ {
+ typedef std::map<int, double, transparent_less_no_type> M;
+
+ M().upper_bound(C2Int{5});
+ }
+}
+#endif
diff --git a/test/std/containers/associative/map/map.ops/upper_bound2.fail.cpp b/test/std/containers/associative/map/map.ops/upper_bound2.fail.cpp
new file mode 100644
index 000000000000..11852fe0cc9f
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/upper_bound2.fail.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator upper_bound(const key_type& k);
+// const_iterator upper_bound(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+#if _LIBCPP_STD_VER <= 11
+#error "This test requires is C++14 (or later)"
+#else
+
+int main()
+{
+ {
+ typedef std::map<int, double, transparent_less_private> M;
+
+ M().upper_bound(C2Int{5});
+ }
+}
+#endif
diff --git a/test/std/containers/associative/map/map.ops/upper_bound3.fail.cpp b/test/std/containers/associative/map/map.ops/upper_bound3.fail.cpp
new file mode 100644
index 000000000000..9cddeb8acbdc
--- /dev/null
+++ b/test/std/containers/associative/map/map.ops/upper_bound3.fail.cpp
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// iterator upper_bound(const key_type& k);
+// const_iterator upper_bound(const key_type& k) const;
+//
+// The member function templates find, count, lower_bound, upper_bound, and
+// equal_range shall not participate in overload resolution unless the
+// qualified-id Compare::is_transparent is valid and denotes a type
+
+
+#include <map>
+#include <cassert>
+
+#include "is_transparent.h"
+
+#if _LIBCPP_STD_VER <= 11
+#error "This test requires is C++14 (or later)"
+#else
+
+int main()
+{
+ {
+ typedef std::map<int, double, transparent_less_not_a_type> M;
+
+ M().upper_bound(C2Int{5});
+ }
+}
+#endif
diff --git a/test/std/containers/associative/map/map.special/member_swap.pass.cpp b/test/std/containers/associative/map/map.special/member_swap.pass.cpp
new file mode 100644
index 000000000000..7c3ad9d50ae4
--- /dev/null
+++ b/test/std/containers/associative/map/map.special/member_swap.pass.cpp
@@ -0,0 +1,176 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// void swap(map& m);
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+ typedef std::pair<const int, double> V;
+ {
+ typedef std::map<int, double> M;
+ {
+ M m1;
+ M m2;
+ M m1_save = m1;
+ M m2_save = m2;
+ m1.swap(m2);
+ assert(m1 == m2_save);
+ assert(m2 == m1_save);
+ }
+ {
+ V ar2[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ M m1;
+ M m2(ar2, ar2+sizeof(ar2)/sizeof(ar2[0]));
+ M m1_save = m1;
+ M m2_save = m2;
+ m1.swap(m2);
+ assert(m1 == m2_save);
+ assert(m2 == m1_save);
+ }
+ {
+ V ar1[] =
+ {
+ V(1, 1),
+ V(2, 2),
+ V(3, 3),
+ V(4, 4)
+ };
+ M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0]));
+ M m2;
+ M m1_save = m1;
+ M m2_save = m2;
+ m1.swap(m2);
+ assert(m1 == m2_save);
+ assert(m2 == m1_save);
+ }
+ {
+ V ar1[] =
+ {
+ V(1, 1),
+ V(2, 2),
+ V(3, 3),
+ V(4, 4)
+ };
+ V ar2[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0]));
+ M m2(ar2, ar2+sizeof(ar2)/sizeof(ar2[0]));
+ M m1_save = m1;
+ M m2_save = m2;
+ m1.swap(m2);
+ assert(m1 == m2_save);
+ assert(m2 == m1_save);
+ }
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::map<int, double, std::less<int>, min_allocator<V>> M;
+ {
+ M m1;
+ M m2;
+ M m1_save = m1;
+ M m2_save = m2;
+ m1.swap(m2);
+ assert(m1 == m2_save);
+ assert(m2 == m1_save);
+ }
+ {
+ V ar2[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ M m1;
+ M m2(ar2, ar2+sizeof(ar2)/sizeof(ar2[0]));
+ M m1_save = m1;
+ M m2_save = m2;
+ m1.swap(m2);
+ assert(m1 == m2_save);
+ assert(m2 == m1_save);
+ }
+ {
+ V ar1[] =
+ {
+ V(1, 1),
+ V(2, 2),
+ V(3, 3),
+ V(4, 4)
+ };
+ M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0]));
+ M m2;
+ M m1_save = m1;
+ M m2_save = m2;
+ m1.swap(m2);
+ assert(m1 == m2_save);
+ assert(m2 == m1_save);
+ }
+ {
+ V ar1[] =
+ {
+ V(1, 1),
+ V(2, 2),
+ V(3, 3),
+ V(4, 4)
+ };
+ V ar2[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0]));
+ M m2(ar2, ar2+sizeof(ar2)/sizeof(ar2[0]));
+ M m1_save = m1;
+ M m2_save = m2;
+ m1.swap(m2);
+ assert(m1 == m2_save);
+ assert(m2 == m1_save);
+ }
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.special/non_member_swap.pass.cpp b/test/std/containers/associative/map/map.special/non_member_swap.pass.cpp
new file mode 100644
index 000000000000..b042a4878f8a
--- /dev/null
+++ b/test/std/containers/associative/map/map.special/non_member_swap.pass.cpp
@@ -0,0 +1,281 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class map
+
+// template <class Key, class T, class Compare, class Allocator>
+// void
+// swap(map<Key, T, Compare, Allocator>& x, map<Key, T, Compare, Allocator>& y);
+
+#include <map>
+#include <cassert>
+#include "test_allocator.h"
+#include "../../../test_compare.h"
+#include "min_allocator.h"
+
+int main()
+{
+ typedef std::pair<const int, double> V;
+ {
+ typedef std::map<int, double> M;
+ {
+ M m1;
+ M m2;
+ M m1_save = m1;
+ M m2_save = m2;
+ swap(m1, m2);
+ assert(m1 == m2_save);
+ assert(m2 == m1_save);
+ }
+ {
+ V ar2[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ M m1;
+ M m2(ar2, ar2+sizeof(ar2)/sizeof(ar2[0]));
+ M m1_save = m1;
+ M m2_save = m2;
+ swap(m1, m2);
+ assert(m1 == m2_save);
+ assert(m2 == m1_save);
+ }
+ {
+ V ar1[] =
+ {
+ V(1, 1),
+ V(2, 2),
+ V(3, 3),
+ V(4, 4)
+ };
+ M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0]));
+ M m2;
+ M m1_save = m1;
+ M m2_save = m2;
+ swap(m1, m2);
+ assert(m1 == m2_save);
+ assert(m2 == m1_save);
+ }
+ {
+ V ar1[] =
+ {
+ V(1, 1),
+ V(2, 2),
+ V(3, 3),
+ V(4, 4)
+ };
+ V ar2[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0]));
+ M m2(ar2, ar2+sizeof(ar2)/sizeof(ar2[0]));
+ M m1_save = m1;
+ M m2_save = m2;
+ swap(m1, m2);
+ assert(m1 == m2_save);
+ assert(m2 == m1_save);
+ }
+ {
+ typedef test_allocator<V> A;
+ typedef test_compare<std::less<int> > C;
+ typedef std::map<int, double, C, A> M;
+ V ar1[] =
+ {
+ V(1, 1),
+ V(2, 2),
+ V(3, 3),
+ V(4, 4)
+ };
+ V ar2[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ 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_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(m2.key_comp() == C(1));
+ assert(m2.get_allocator() == A(2));
+ }
+ {
+ typedef other_allocator<V> A;
+ typedef test_compare<std::less<int> > C;
+ typedef std::map<int, double, C, A> M;
+ V ar1[] =
+ {
+ V(1, 1),
+ V(2, 2),
+ V(3, 3),
+ V(4, 4)
+ };
+ V ar2[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ 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_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(2));
+ 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;
+ {
+ M m1;
+ M m2;
+ M m1_save = m1;
+ M m2_save = m2;
+ swap(m1, m2);
+ assert(m1 == m2_save);
+ assert(m2 == m1_save);
+ }
+ {
+ V ar2[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ M m1;
+ M m2(ar2, ar2+sizeof(ar2)/sizeof(ar2[0]));
+ M m1_save = m1;
+ M m2_save = m2;
+ swap(m1, m2);
+ assert(m1 == m2_save);
+ assert(m2 == m1_save);
+ }
+ {
+ V ar1[] =
+ {
+ V(1, 1),
+ V(2, 2),
+ V(3, 3),
+ V(4, 4)
+ };
+ M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0]));
+ M m2;
+ M m1_save = m1;
+ M m2_save = m2;
+ swap(m1, m2);
+ assert(m1 == m2_save);
+ assert(m2 == m1_save);
+ }
+ {
+ V ar1[] =
+ {
+ V(1, 1),
+ V(2, 2),
+ V(3, 3),
+ V(4, 4)
+ };
+ V ar2[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0]));
+ M m2(ar2, ar2+sizeof(ar2)/sizeof(ar2[0]));
+ M m1_save = m1;
+ M m2_save = m2;
+ swap(m1, m2);
+ assert(m1 == m2_save);
+ assert(m2 == m1_save);
+ }
+ {
+ typedef min_allocator<V> A;
+ typedef test_compare<std::less<int> > C;
+ typedef std::map<int, double, C, A> M;
+ V ar1[] =
+ {
+ V(1, 1),
+ V(2, 2),
+ V(3, 3),
+ V(4, 4)
+ };
+ V ar2[] =
+ {
+ V(5, 5),
+ V(6, 6),
+ V(7, 7),
+ V(8, 8),
+ V(9, 9),
+ V(10, 10),
+ V(11, 11),
+ V(12, 12)
+ };
+ M m1(ar1, ar1+sizeof(ar1)/sizeof(ar1[0]), C(1), A());
+ M m2(ar2, ar2+sizeof(ar2)/sizeof(ar2[0]), C(2), A());
+ 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());
+ assert(m2.key_comp() == C(1));
+ assert(m2.get_allocator() == A());
+ }
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp b/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp
new file mode 100644
index 000000000000..4598e9945d4e
--- /dev/null
+++ b/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp
@@ -0,0 +1,148 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// void swap(map& c)
+// noexcept(!allocator_type::propagate_on_container_swap::value ||
+// __is_nothrow_swappable<allocator_type>::value);
+//
+// In C++17, the standard says that swap shall have:
+// noexcept(allocator_traits<Allocator>::is_always_equal::value &&
+// noexcept(swap(declval<Compare&>(), declval<Compare&>())));
+
+// This tests a conforming extension
+
+#include <map>
+#include <cassert>
+
+#include "MoveOnly.h"
+#include "test_allocator.h"
+
+template <class T>
+struct some_comp
+{
+ typedef T value_type;
+
+ some_comp() {}
+ some_comp(const some_comp&) {}
+ void deallocate(void*, unsigned) {}
+
+ typedef std::true_type propagate_on_container_swap;
+};
+
+template <class T>
+struct some_comp2
+{
+ typedef T value_type;
+
+ some_comp2() {}
+ some_comp2(const some_comp2&) {}
+ void deallocate(void*, unsigned) {}
+ typedef std::true_type propagate_on_container_swap;
+};
+
+#if TEST_STD_VER >= 14
+template <typename T>
+void swap(some_comp2<T>&, some_comp2<T>&) noexcept {}
+#endif
+
+template <class T>
+struct some_alloc
+{
+ typedef T value_type;
+
+ some_alloc() {}
+ some_alloc(const some_alloc&);
+ void deallocate(void*, unsigned) {}
+
+ typedef std::true_type propagate_on_container_swap;
+};
+
+template <class T>
+struct some_alloc2
+{
+ typedef T value_type;
+
+ some_alloc2() {}
+ some_alloc2(const some_alloc2&);
+ void deallocate(void*, unsigned) {}
+
+ typedef std::false_type propagate_on_container_swap;
+ typedef std::true_type is_always_equal;
+};
+
+template <class T>
+struct some_alloc3
+{
+ typedef T value_type;
+
+ some_alloc3() {}
+ some_alloc3(const some_alloc3&);
+ void deallocate(void*, unsigned) {}
+
+ typedef std::false_type propagate_on_container_swap;
+ typedef std::false_type is_always_equal;
+};
+
+int main()
+{
+#if __has_feature(cxx_noexcept)
+ {
+ typedef std::map<MoveOnly, MoveOnly> C;
+ C c1, c2;
+ static_assert(noexcept(swap(c1, c2)), "");
+ }
+ {
+ typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
+ C c1, c2;
+ static_assert(noexcept(swap(c1, c2)), "");
+ }
+ {
+ typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
+ C c1, c2;
+ static_assert(noexcept(swap(c1, c2)), "");
+ }
+ {
+ typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
+ C c1, c2;
+ static_assert(!noexcept(swap(c1, c2)), "");
+ }
+
+#if TEST_STD_VER >= 14
+ { // POCS allocator, throwable swap for comp
+ typedef std::map<MoveOnly, MoveOnly, some_comp <MoveOnly>, some_alloc <MoveOnly>> C;
+ C c1, c2;
+ static_assert(!noexcept(swap(c1, c2)), "");
+ }
+ { // always equal allocator, throwable swap for comp
+ typedef std::map<MoveOnly, MoveOnly, some_comp <MoveOnly>, some_alloc2<MoveOnly>> C;
+ C c1, c2;
+ static_assert(!noexcept(swap(c1, c2)), "");
+ }
+ { // POCS allocator, nothrow swap for comp
+ typedef std::map<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc <MoveOnly>> C;
+ C c1, c2;
+ static_assert( noexcept(swap(c1, c2)), "");
+ }
+ { // always equal allocator, nothrow swap for comp
+ typedef std::map<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc2<MoveOnly>> C;
+ C c1, c2;
+ static_assert( noexcept(swap(c1, c2)), "");
+ }
+
+ { // NOT always equal allocator, nothrow swap for comp
+ typedef std::map<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc3<MoveOnly>> C;
+ C c1, c2;
+ static_assert( noexcept(swap(c1, c2)), "");
+ }
+#endif
+
+#endif
+}
diff --git a/test/std/containers/associative/map/types.pass.cpp b/test/std/containers/associative/map/types.pass.cpp
new file mode 100644
index 000000000000..d117deff693d
--- /dev/null
+++ b/test/std/containers/associative/map/types.pass.cpp
@@ -0,0 +1,70 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// template <class Key, class T, class Compare = less<Key>,
+// class Allocator = allocator<pair<const Key, T>>>
+// class map
+// {
+// public:
+// // types:
+// typedef Key key_type;
+// typedef T mapped_type;
+// typedef pair<const key_type, mapped_type> value_type;
+// typedef Compare key_compare;
+// typedef Allocator allocator_type;
+// typedef typename allocator_type::reference reference;
+// typedef typename allocator_type::const_reference const_reference;
+// typedef typename allocator_type::pointer pointer;
+// typedef typename allocator_type::const_pointer const_pointer;
+// typedef typename allocator_type::size_type size_type;
+// typedef typename allocator_type::difference_type difference_type;
+// ...
+// };
+
+#include <map>
+#include <type_traits>
+
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::map<int, double> C;
+ static_assert((std::is_same<C::key_type, int>::value), "");
+ static_assert((std::is_same<C::mapped_type, double>::value), "");
+ static_assert((std::is_same<C::value_type, std::pair<const int, double> >::value), "");
+ static_assert((std::is_same<C::key_compare, std::less<int> >::value), "");
+ static_assert((std::is_same<C::allocator_type, std::allocator<std::pair<const int, double> > >::value), "");
+ static_assert((std::is_same<C::reference, std::pair<const int, double>&>::value), "");
+ static_assert((std::is_same<C::const_reference, const std::pair<const int, double>&>::value), "");
+ static_assert((std::is_same<C::pointer, std::pair<const int, double>*>::value), "");
+ static_assert((std::is_same<C::const_pointer, const std::pair<const int, double>*>::value), "");
+ static_assert((std::is_same<C::size_type, std::size_t>::value), "");
+ static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::map<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> C;
+ static_assert((std::is_same<C::key_type, int>::value), "");
+ static_assert((std::is_same<C::mapped_type, double>::value), "");
+ static_assert((std::is_same<C::value_type, std::pair<const int, double> >::value), "");
+ static_assert((std::is_same<C::key_compare, std::less<int> >::value), "");
+ static_assert((std::is_same<C::allocator_type, min_allocator<std::pair<const int, double> > >::value), "");
+ static_assert((std::is_same<C::reference, std::pair<const int, double>&>::value), "");
+ static_assert((std::is_same<C::const_reference, const std::pair<const int, double>&>::value), "");
+ static_assert((std::is_same<C::pointer, min_pointer<std::pair<const int, double>>>::value), "");
+ static_assert((std::is_same<C::const_pointer, min_pointer<const std::pair<const int, double>>>::value), "");
+// min_allocator doesn't have a size_type, so one gets synthesized
+ static_assert((std::is_same<C::size_type, std::make_unsigned<C::difference_type>::type>::value), "");
+ static_assert((std::is_same<C::difference_type, std::ptrdiff_t>::value), "");
+ }
+#endif
+}
diff --git a/test/std/containers/associative/map/version.pass.cpp b/test/std/containers/associative/map/version.pass.cpp
new file mode 100644
index 000000000000..b2e3fa43e787
--- /dev/null
+++ b/test/std/containers/associative/map/version.pass.cpp
@@ -0,0 +1,20 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+#include <map>
+
+#ifndef _LIBCPP_VERSION
+#error _LIBCPP_VERSION not defined
+#endif
+
+int main()
+{
+}
diff --git a/test/std/containers/associative/multimap/empty.pass.cpp b/test/std/containers/associative/multimap/empty.pass.cpp
new file mode 100644
index 000000000000..2384960d10db
--- /dev/null
+++ b/test/std/containers/associative/multimap/empty.pass.cpp
@@ -0,0 +1,43 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class multimap
+
+// bool empty() const;
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::multimap<int, double> M;
+ M m;
+ assert(m.empty());
+ m.insert(M::value_type(1, 1.5));
+ assert(!m.empty());
+ m.clear();
+ assert(m.empty());
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
+ M m;
+ assert(m.empty());
+ m.insert(M::value_type(1, 1.5));
+ assert(!m.empty());
+ m.clear();
+ assert(m.empty());
+ }
+#endif
+}
diff --git a/test/std/containers/associative/multimap/iterator.pass.cpp b/test/std/containers/associative/multimap/iterator.pass.cpp
new file mode 100644
index 000000000000..2763129acc2a
--- /dev/null
+++ b/test/std/containers/associative/multimap/iterator.pass.cpp
@@ -0,0 +1,231 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <map>
+
+// class multimap
+
+// iterator begin();
+// const_iterator begin() const;
+// iterator end();
+// const_iterator end() const;
+//
+// reverse_iterator rbegin();
+// const_reverse_iterator rbegin() const;
+// reverse_iterator rend();
+// const_reverse_iterator rend() const;
+//
+// const_iterator cbegin() const;
+// const_iterator cend() const;
+// const_reverse_iterator crbegin() const;
+// const_reverse_iterator crend() const;
+
+#include <map>
+#include <cassert>
+
+#include "min_allocator.h"
+
+int main()
+{
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ V(4, 1),
+ V(4, 1.5),
+ V(4, 2),
+ V(5, 1),
+ V(5, 1.5),
+ V(5, 2),
+ V(6, 1),
+ V(6, 1.5),
+ V(6, 2),
+ V(7, 1),
+ V(7, 1.5),
+ V(7, 2),
+ V(8, 1),
+ V(8, 1.5),
+ V(8, 2)
+ };
+ std::multimap<int, double> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ assert(std::distance(m.begin(), m.end()) == m.size());
+ assert(std::distance(m.rbegin(), m.rend()) == m.size());
+ std::multimap<int, double>::iterator i;
+ i = m.begin();
+ std::multimap<int, double>::const_iterator k = i;
+ assert(i == k);
+ for (int j = 1; j <= 8; ++j)
+ for (double d = 1; d <= 2; d += .5, ++i)
+ {
+ assert(i->first == j);
+ assert(i->second == d);
+ i->second = 2.5;
+ assert(i->second == 2.5);
+ }
+ }
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ V(4, 1),
+ V(4, 1.5),
+ V(4, 2),
+ V(5, 1),
+ V(5, 1.5),
+ V(5, 2),
+ V(6, 1),
+ V(6, 1.5),
+ V(6, 2),
+ V(7, 1),
+ V(7, 1.5),
+ V(7, 2),
+ V(8, 1),
+ V(8, 1.5),
+ V(8, 2)
+ };
+ const std::multimap<int, double> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ assert(std::distance(m.begin(), m.end()) == m.size());
+ assert(std::distance(m.cbegin(), m.cend()) == m.size());
+ assert(std::distance(m.rbegin(), m.rend()) == m.size());
+ assert(std::distance(m.crbegin(), m.crend()) == m.size());
+ std::multimap<int, double>::const_iterator i;
+ i = m.begin();
+ for (int j = 1; j <= 8; ++j)
+ for (double d = 1; d <= 2; d += .5, ++i)
+ {
+ assert(i->first == j);
+ assert(i->second == d);
+ }
+ }
+#if __cplusplus >= 201103L
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ V(4, 1),
+ V(4, 1.5),
+ V(4, 2),
+ V(5, 1),
+ V(5, 1.5),
+ V(5, 2),
+ V(6, 1),
+ V(6, 1.5),
+ V(6, 2),
+ V(7, 1),
+ V(7, 1.5),
+ V(7, 2),
+ V(8, 1),
+ V(8, 1.5),
+ V(8, 2)
+ };
+ std::multimap<int, double, std::less<int>, min_allocator<V>> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ assert(std::distance(m.begin(), m.end()) == m.size());
+ assert(std::distance(m.rbegin(), m.rend()) == m.size());
+ std::multimap<int, double, std::less<int>, min_allocator<V>>::iterator i;
+ i = m.begin();
+ std::multimap<int, double, std::less<int>, min_allocator<V>>::const_iterator k = i;
+ assert(i == k);
+ for (int j = 1; j <= 8; ++j)
+ for (double d = 1; d <= 2; d += .5, ++i)
+ {
+ assert(i->first == j);
+ assert(i->second == d);
+ i->second = 2.5;
+ assert(i->second == 2.5);
+ }
+ }
+ {
+ typedef std::pair<const int, double> V;
+ V ar[] =
+ {
+ V(1, 1),
+ V(1, 1.5),
+ V(1, 2),
+ V(2, 1),
+ V(2, 1.5),
+ V(2, 2),
+ V(3, 1),
+ V(3, 1.5),
+ V(3, 2),
+ V(4, 1),
+ V(4, 1.5),
+ V(4, 2),
+ V(5, 1),
+ V(5, 1.5),
+ V(5, 2),
+ V(6, 1),
+ V(6, 1.5),
+ V(6, 2),
+ V(7, 1),
+ V(7, 1.5),
+ V(7, 2),
+ V(8, 1),
+ V(8, 1.5),
+ V(8, 2)
+ };
+ const std::multimap<int, double, std::less<int>, min_allocator<V>> m(ar, ar+sizeof(ar)/sizeof(ar[0]));
+ assert(std::distance(m.begin(), m.end()) == m.size());
+ assert(std::distance(m.cbegin(), m.cend()) == m.size());
+ assert(std::distance(m.rbegin(), m.rend()) == m.size());
+ assert(std::distance(m.crbegin(), m.crend()) == m.size());
+ std::multimap<int, double, std::less<int>, min_allocator<V>>::const_iterator i;
+ i = m.begin();
+ for (int j = 1; j <= 8; ++j)
+ for (double d = 1; d <= 2; d += .5, ++i)
+ {
+ assert(i->first == j);
+ assert(i->second == d);
+ }
+ }
+#endif
+#if _LIBCPP_STD_VER > 11
+ { // N3644 testing
+ typedef std::multimap<int, double> C;
+ C::iterator ii1{}, ii2{};
+ C::iterator ii4 = ii1;
+