[mlir][acc] Introduce MappableType interface (#122146)
[llvm-project.git] / libcxx / test / std / containers / associative / multiset / empty.pass.cpp
blob837c990ccc8267ac64b12e69d828313d3fd1972f
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // <set>
11 // class multiset
13 // bool empty() const;
15 #include <set>
16 #include <cassert>
18 #include "test_macros.h"
19 #include "min_allocator.h"
21 int main(int, char**)
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());
32 #if TEST_STD_VER >= 11
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());
42 #endif
44 return 0;