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, copy_constructible F>
15 //   requires invocable<F&> && indirectly_writable<O, invoke_result_t<F&>>
16 //   constexpr O generate_n(O first, iter_difference_t<O> n, F gen);                                // Since C++20
17 
18 #include <algorithm>
19 #include <array>
20 #include <concepts>
21 #include <functional>
22 #include <ranges>
23 
24 #include "almost_satisfies_types.h"
25 #include "test_iterators.h"
26 
27 // TODO: SFINAE tests.
28 
29 constexpr bool test() {
30   // TODO: main tests.
31   // TODO: A custom comparator works.
32   // TODO: A custom projection works.
33 
34   return true;
35 }
36 
37 int main(int, char**) {
38   test();
39   static_assert(test());
40 
41   return 0;
42 }
43