Revert "[libc] Use best-fit binary trie to make malloc logarithmic" (#117065)
[llvm-project.git] / libcxx / test / std / ranges / range.factories / range.iota.view / ctor.default.pass.cpp
blobf462b96069f2c7b648214e6d132598a088a3dbf9
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 // UNSUPPORTED: c++03, c++11, c++14, c++17
11 // iota_view() requires default_initializable<W> = default;
13 #include <ranges>
14 #include <cassert>
16 #include "test_macros.h"
17 #include "types.h"
19 constexpr bool test() {
21 std::ranges::iota_view<Int42<DefaultTo42>> io;
22 assert((*io.begin()).value_ == 42);
25 return true;
28 int main(int, char**) {
29 test();
30 static_assert(test());
32 static_assert(!std::default_initializable<Int42<ValueCtor>>);
33 static_assert( std::default_initializable<Int42<DefaultTo42>>);
35 return 0;