Revert "[libc] Use best-fit binary trie to make malloc logarithmic" (#117065)
[llvm-project.git] / libcxx / test / std / containers / sequences / forwardlist / incomplete.pass.cpp
blob2bdfad777e8dfb190a71b22fb9b32517838aeaa8
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 // <forward_list>
11 // forward_list()
12 // forward_list::iterator()
13 // forward_list::const_iterator()
15 #include <forward_list>
16 #include <cassert>
18 #include "test_macros.h"
19 #include "min_allocator.h"
21 struct A {
22 std::forward_list<A> d;
23 std::forward_list<A>::iterator it;
24 std::forward_list<A>::const_iterator it2;
27 #if TEST_STD_VER >= 11
28 struct B {
29 typedef std::forward_list<B, min_allocator<B>> FList;
30 FList d;
31 FList::iterator it;
32 FList::const_iterator it2;
34 #endif
36 int main(int, char**)
39 A a;
40 assert(a.d.empty());
41 a.it = a.d.begin();
42 a.it2 = a.d.cbefore_begin();
44 #if TEST_STD_VER >= 11
46 B b;
47 assert(b.d.empty());
48 b.it = b.d.begin();
49 b.it2 = b.d.cbefore_begin();
51 #endif
53 return 0;