• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 // <set>
11 
12 // class multiset
13 
14 // void clear();
15 
16 #include <set>
17 #include <cassert>
18 
main()19 int main()
20 {
21     {
22         typedef std::multiset<int> M;
23         typedef int V;
24         V ar[] =
25         {
26             1,
27             2,
28             3,
29             4,
30             5,
31             6,
32             7,
33             8
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