blob: fe880e6797935a99c8c8954f02e13bd1147f3bfd [file] [log] [blame]
Howard Hinnant3e519522010-05-11 19:42:16 +00001//===----------------------------------------------------------------------===//
2//
3// ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. 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
19int 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}