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