blob: acca4e021e0c3964704a549c9d530f12f1a59093 [file] [log] [blame]
Howard Hinnant3e519522010-05-11 19:42:16 +00001//===----------------------------------------------------------------------===//
2//
Howard Hinnant5b08a8a2010-05-11 21:36:01 +00003// The LLVM Compiler Infrastructure
Howard Hinnant3e519522010-05-11 19:42:16 +00004//
Howard Hinnant412dbeb2010-11-16 22:09:02 +00005// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
Howard Hinnant3e519522010-05-11 19:42:16 +00007//
8//===----------------------------------------------------------------------===//
9
10// <set>
11
12// class multiset
13
14// bool empty() const;
15
16#include <set>
17#include <cassert>
18
Marshall Clowe34f6f62013-11-26 20:58:02 +000019#include "min_allocator.h"
Howard Hinnant07d3ecc2013-06-19 21:29:40 +000020
Howard Hinnant3e519522010-05-11 19:42:16 +000021int main()
22{
Howard Hinnant07d3ecc2013-06-19 21:29:40 +000023 {
Howard Hinnant3e519522010-05-11 19:42:16 +000024 typedef std::multiset<int> M;
25 M m;
26 assert(m.empty());
27 m.insert(M::value_type(1));
28 assert(!m.empty());
29 m.clear();
30 assert(m.empty());
Howard Hinnant07d3ecc2013-06-19 21:29:40 +000031 }
Eric Fiselierf2f2a632016-06-14 21:31:42 +000032#if TEST_STD_VER >= 11
Howard Hinnant07d3ecc2013-06-19 21:29:40 +000033 {
34 typedef std::multiset<int, std::less<int>, min_allocator<int>> M;
35 M m;
36 assert(m.empty());
37 m.insert(M::value_type(1));
38 assert(!m.empty());
39 m.clear();
40 assert(m.empty());
41 }
42#endif
Howard Hinnant3e519522010-05-11 19:42:16 +000043}