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_iterator I, sentinel_for<I> S, weakly_incrementable O, class Proj = identity,
15 //          indirect_equivalence_relation<projected<I, Proj>> C = ranges::equal_to>
16 //   requires indirectly_copyable<I, O> &&
17 //            (forward_iterator<I> ||
18 //             (input_iterator<O> && same_as<iter_value_t<I>, iter_value_t<O>>) ||
19 //             indirectly_copyable_storable<I, O>)
20 //   constexpr unique_copy_result<I, O>
21 //     unique_copy(I first, S last, O result, C comp = {}, Proj proj = {});                         // Since C++20
22 //
23 // template<input_range R, weakly_incrementable O, class Proj = identity,
24 //          indirect_equivalence_relation<projected<iterator_t<R>, Proj>> C = ranges::equal_to>
25 //   requires indirectly_copyable<iterator_t<R>, O> &&
26 //            (forward_iterator<iterator_t<R>> ||
27 //             (input_iterator<O> && same_as<range_value_t<R>, iter_value_t<O>>) ||
28 //             indirectly_copyable_storable<iterator_t<R>, O>)
29 //   constexpr unique_copy_result<borrowed_iterator_t<R>, O>
30 //     unique_copy(R&& r, O result, C comp = {}, Proj proj = {});                                   // Since C++20
31 
32 #include <algorithm>
33 #include <array>
34 #include <concepts>
35 #include <functional>
36 #include <ranges>
37 
38 #include "almost_satisfies_types.h"
39 #include "test_iterators.h"
40 
41 // TODO: SFINAE tests.
42 
43 constexpr bool test() {
44   // TODO: main tests.
45   // TODO: A custom comparator works.
46   // TODO: A custom projection works.
47 
48   return true;
49 }
50 
51 int main(int, char**) {
52   test();
53   static_assert(test());
54 
55   return 0;
56 }
57