1 //===----------------------------------------------------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 // <map>
11
12 // class multimap
13
14 // void clear();
15
16 #include <map>
17 #include <cassert>
18
main()19 int main()
20 {
21 {
22 typedef std::multimap<int, double> M;
23 typedef std::pair<int, double> P;
24 P ar[] =
25 {
26 P(1, 1.5),
27 P(2, 2.5),
28 P(3, 3.5),
29 P(4, 4.5),
30 P(5, 5.5),
31 P(6, 6.5),
32 P(7, 7.5),
33 P(8, 8.5),
34 };
35 M m(ar, ar + sizeof(ar)/sizeof(ar[0]));
36 assert(m.size() == 8);
37 m.clear();
38 assert(m.size() == 0);
39 }
40 }
41