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 //===----------------------------------------------------------------------===//
8 
9 // UNSUPPORTED: c++03, c++11, c++14, c++17
10 // UNSUPPORTED: libcpp-has-no-incomplete-ranges
11 
12 // <algorithm>
13 
14 // template<input_or_output_iterator O, sentinel_for<O> S, copy_constructible F>
15 //   requires invocable<F&> && indirectly_writable<O, invoke_result_t<F&>>
16 //   constexpr O generate(O first, S last, F gen);                                                  // Since C++20
17 //
18 // template<class R, copy_constructible F>
19 //   requires invocable<F&> && output_range<R, invoke_result_t<F&>>
20 //   constexpr borrowed_iterator_t<R> generate(R&& r, F gen);                                       // Since C++20
21 
22 #include <algorithm>
23 #include <array>
24 #include <concepts>
25 #include <functional>
26 #include <ranges>
27 
28 #include "almost_satisfies_types.h"
29 #include "test_iterators.h"
30 
31 // TODO: SFINAE tests.
32 
33 constexpr bool test() {
34   // TODO: main tests.
35   // TODO: A custom comparator works.
36   // TODO: A custom projection works.
37 
38   return true;
39 }
40 
41 int main(int, char**) {
42   test();
43   static_assert(test());
44 
45   return 0;
46 }
47