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// bool empty() const; 15 16#include <set> 17#include <cassert> 18 19#include "min_allocator.h" 20 21int main() 22{ 23 { 24 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()); 31 } 32#if __cplusplus >= 201103L 33 { 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 43} 44