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