[libcxx-commits] [PATCH] D129806: [libc++] Implement ranges::replace_copy{, _if}

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 14 15:19:53 PDT 2022


var-const added inline comments.


================
Comment at: libcxx/include/algorithm:718
 
   template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
            weakly_incrementable O, class Comp = ranges::less,
----------------
Please update the synopsis (you can copy the synopsis lines from the tests).


================
Comment at: libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove_if.pass.cpp:47
 template <class Range>
-concept HasRemoveIfR = requires(Range range) { std::ranges::remove_if(range, FalsePredicate{}); };
-
-static_assert(HasRemoveIfR<UncheckedRange<int*>>);
-static_assert(!HasRemoveIfR<PermutableRangeNotForwardIterator>);
-static_assert(!HasRemoveIfR<PermutableRangeNotSwappable>);
-static_assert(!HasRemoveIfR<SentinelForNotSemiregular>);
-static_assert(!HasRemoveIfR<SentinelForNotWeaklyEqualityComparableWith>);
-static_assert(!HasRemoveIfR<UncheckedRange<int**>>); // not indirect_unary_predicate
+concept HasReplaceCopyR = requires(Range range) { std::ranges::remove_if(range, FalsePredicate{}); };
+
----------------
This looks like an unintended change?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129806/new/

https://reviews.llvm.org/D129806



More information about the libcxx-commits mailing list