[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / containers / associative / multimap / multimap.cons / compare_alloc.pass.cpp
blob7bfb93ee1961f022e4e26cf18835aedfeec3c9ae
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 //===----------------------------------------------------------------------===//
9 // <map>
11 // class multimap
13 // multimap(const key_compare& comp, const allocator_type& a);
15 #include <map>
16 #include <cassert>
18 #include "test_macros.h"
19 #include "../../../test_compare.h"
20 #include "test_allocator.h"
21 #include "min_allocator.h"
23 int main(int, char**)
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));
29 assert(m.empty());
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());
39 assert(m.empty());
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{});
48 assert(m.empty());
49 assert(m.begin() == m.end());
50 assert(m.key_comp() == C(4));
51 assert(m.get_allocator() == A{});
53 #endif
55 return 0;