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// multimap();
14
15#include <map>
16#include <cassert>
17
18#include "test_macros.h"
19#include "min_allocator.h"
20
21int main(int, char**) {
22 {
23 std::multimap<int, double> m;
24 assert(m.empty());
25 assert(m.begin() == m.end());
26 }
27#if TEST_STD_VER >= 11
28 {
29 std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> m;
30 assert(m.empty());
31 assert(m.begin() == m.end());
32 }
33 {
34 typedef explicit_allocator<std::pair<const int, double>> A;
35 {
36 std::multimap<int, double, std::less<int>, A> m;
37 assert(m.empty());
38 assert(m.begin() == m.end());
39 }
40 {
41 A a;
42 std::multimap<int, double, std::less<int>, A> m(a);
43 assert(m.empty());
44 assert(m.begin() == m.end());
45 }
46 }
47 {
48 std::multimap<int, double> m = {};
49 assert(m.empty());
50 assert(m.begin() == m.end());
51 }
52#endif
53
54 return 0;
55}
56

source code of libcxx/test/std/containers/associative/multimap/multimap.cons/default.pass.cpp