1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
13 // multimap(const key_compare& comp, const allocator_type& a);
18 #include "test_macros.h"
19 #include "../../../test_compare.h"
20 #include "test_allocator.h"
21 #include "min_allocator.h"
26 typedef test_less
<int> C
;
27 typedef test_allocator
<std::pair
<const int, double> > A
;
28 std::multimap
<int, double, C
, A
> m(C(4), A(5));
30 assert(m
.begin() == m
.end());
31 assert(m
.key_comp() == C(4));
32 assert(m
.get_allocator() == A(5));
34 #if TEST_STD_VER >= 11
36 typedef test_less
<int> C
;
37 typedef min_allocator
<std::pair
<const int, double> > A
;
38 std::multimap
<int, double, C
, A
> m(C(4), A());
40 assert(m
.begin() == m
.end());
41 assert(m
.key_comp() == C(4));
42 assert(m
.get_allocator() == A());
45 typedef test_less
<int> C
;
46 typedef explicit_allocator
<std::pair
<const int, double> > A
;
47 std::multimap
<int, double, C
, A
> m(C(4), A
{});
49 assert(m
.begin() == m
.end());
50 assert(m
.key_comp() == C(4));
51 assert(m
.get_allocator() == A
{});