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<permutable I, sentinel_for<I> S, class Proj = identity, 15 // indirect_equivalence_relation<projected<I, Proj>> C = ranges::equal_to> 16 // constexpr subrange<I> unique(I first, S last, C comp = {}, Proj proj = {}); // Since C++20 17 // 18 // template<forward_range R, class Proj = identity, 19 // indirect_equivalence_relation<projected<iterator_t<R>, Proj>> C = ranges::equal_to> 20 // requires permutable<iterator_t<R>> 21 // constexpr borrowed_subrange_t<R> 22 // unique(R&& r, C comp = {}, Proj proj = {}); // Since C++20 23 24 #include <algorithm> 25 #include <array> 26 #include <concepts> 27 #include <functional> 28 #include <ranges> 29 30 #include "almost_satisfies_types.h" 31 #include "test_iterators.h" 32 33 // TODO: SFINAE tests. 34 35 constexpr bool test() { 36 // TODO: main tests. 37 // TODO: A custom comparator works. 38 // TODO: A custom projection works. 39 40 return true; 41 } 42 43 int main(int, char**) { 44 test(); 45 static_assert(test()); 46 47 return 0; 48 } 49