1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
13 // void clear() noexcept;
18 #include "test_macros.h"
19 #include "min_allocator.h"
24 typedef std::multiset
<int> M
;
37 M
m(ar
, ar
+ sizeof(ar
)/sizeof(ar
[0]));
38 assert(m
.size() == 8);
39 ASSERT_NOEXCEPT(m
.clear());
41 assert(m
.size() == 0);
43 #if TEST_STD_VER >= 11
45 typedef std::multiset
<int, std::less
<int>, min_allocator
<int>> M
;
58 M
m(ar
, ar
+ sizeof(ar
)/sizeof(ar
[0]));
59 assert(m
.size() == 8);
60 ASSERT_NOEXCEPT(m
.clear());
62 assert(m
.size() == 0);