[VectorCombine] foldShuffleOfBinops - refactor to make it easier to match icmp/fcmp...
[llvm-project.git] / libcxx / test / std / containers / sequences / list / list.capacity / empty.pass.cpp
blob7619ec50853ad93c01dec4457bddae30592453af
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 // <list>
11 // class list
13 // bool empty() const noexcept;
15 #include <list>
16 #include <cassert>
18 #include "test_macros.h"
19 #include "min_allocator.h"
21 int main(int, char**)
24 typedef std::list<int> C;
25 C c;
26 ASSERT_NOEXCEPT(c.empty());
27 assert(c.empty());
28 c.push_back(C::value_type(1));
29 assert(!c.empty());
30 c.clear();
31 assert(c.empty());
33 #if TEST_STD_VER >= 11
35 typedef std::list<int, min_allocator<int>> C;
36 C c;
37 ASSERT_NOEXCEPT(c.empty());
38 assert(c.empty());
39 c.push_back(C::value_type(1));
40 assert(!c.empty());
41 c.clear();
42 assert(c.empty());
44 #endif
46 return 0;