1 | //===----------------------------------------------------------------------===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | // <map> |
10 | |
11 | // class multimap |
12 | |
13 | // explicit multimap(const key_compare& comp); |
14 | |
15 | #include <map> |
16 | #include <cassert> |
17 | |
18 | #include "test_macros.h" |
19 | #include "../../../test_compare.h" |
20 | #include "min_allocator.h" |
21 | |
22 | int main(int, char**) |
23 | { |
24 | { |
25 | typedef test_less<int> C; |
26 | const std::multimap<int, double, C> m(C(3)); |
27 | assert(m.empty()); |
28 | assert(m.begin() == m.end()); |
29 | assert(m.key_comp() == C(3)); |
30 | } |
31 | #if TEST_STD_VER >= 11 |
32 | { |
33 | typedef test_less<int> C; |
34 | const std::multimap<int, double, C, min_allocator<std::pair<const int, double>>> m(C(3)); |
35 | assert(m.empty()); |
36 | assert(m.begin() == m.end()); |
37 | assert(m.key_comp() == C(3)); |
38 | } |
39 | #endif |
40 | |
41 | return 0; |
42 | } |
43 | |