A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue3186 below:

ranges removal, partition, and partial_sort_copy algorithms discard useful information

[…]
//26.7.8 [alg.remove], remove
[…]
namespace ranges {
template<Permutable I, Sentinel<I> S, class T, class Proj = identity>
  requires IndirectRelation<ranges::equal_to<>, projected<I, Proj>, const T*>
  constexpr subrange<I> remove(I first, S last, const T& value, Proj proj = {});
template<ForwardRange R, class T, class Proj = identity>
  requires Permutable<iterator_t<R>> &&
           IndirectRelation<ranges::equal_to<>, projected<iterator_t<R>, Proj>, const T*>
  constexpr safe_subrangeiterator_t<R>
    remove(R&& r, const T& value, Proj proj = {});
template<Permutable I, Sentinel<I> S, class Proj = identity,
         IndirectUnaryPredicate<projected<I, Proj>> Pred>
  constexpr subrange<I> remove_if(I first, S last, Pred pred, Proj proj = {});
template<ForwardRange R, class Proj = identity,
         IndirectUnaryPredicate<projected<iterator_t<R>, Proj>> Pred>
  requires Permutable<iterator_t<R>>
  constexpr safe_subrangeiterator_t<R>
    remove_if(R&& r, Pred pred, Proj proj = {});
}
[…]
// 26.7.9 [alg.unique], unique
[…]
namespace ranges {
  template<Permutable I, Sentinel<I> S, class Proj = identity,
           IndirectRelation<projected<I, Proj>> C = ranges::equal_to<>>
    constexpr subrange<I> unique(I first, S last, C comp = {}, Proj proj = {});
  template<ForwardRange R, class Proj = identity,
           IndirectRelation<projected<iterator_t<R>, Proj>> C = ranges::equal_to<>>
    requires Permutable<iterator_t<R>>
    constexpr safe_subrangeiterator_t<R>
      unique(R&& r, C comp = {}, Proj proj = {});
}
[…]
// 26.8.2 [alg.sort], sorting
[…]
namespace ranges {
  template<class I, class O> using partial_sort_copy_result = copy_result<I, O>;

  template<InputIterator I1, Sentinel<I1> S1, RandomAccessIterator I2, Sentinel<I2> S2,
           class Comp = ranges::less<>, class Proj1 = identity, class Proj2 = identity>
    requires IndirectlyCopyable<I1, I2> && Sortable<I2, Comp, Proj2> &&
             IndirectStrictWeakOrder<Comp, projected<I1, Proj1>, projected<I2, Proj2>>
    constexpr partial_sort_copy_result<I1, I2>
      partial_sort_copy(I1 first, S1 last, I2 result_first, S2 result_last,
                        Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {});
  template<InputRange R1, RandomAccessRange R2, class Comp = ranges::less<>,
           class Proj1 = identity, class Proj2 = identity>
    requires IndirectlyCopyable<iterator_t<R1>, iterator_t<R2>> &&
             Sortable<iterator_t<R2>, Comp, Proj2> &&
             IndirectStrictWeakOrder<Comp, projected<iterator_t<R1>, Proj1>,
                                     projected<iterator_t<R2>, Proj2>>
    constexpr partial_sort_copy_result<safe_iterator_t<R1>, safe_iterator_t<R2>>
      partial_sort_copy(R1&& r, R2&& result_r, Comp comp = {},
                        Proj1 proj1 = {}, Proj2 proj2 = {});
}
[…]
// 26.8.5 [alg.partitions], partitions
[…]
namespace ranges {
  template<Permutable I, Sentinel<I> S, class Proj = identity,
           IndirectUnaryPredicate<projected<I, Proj>> Pred>
    constexpr subrange<I>
      partition(I first, S last, Pred pred, Proj proj = {});
  template<ForwardRange R, class Proj = identity,
           IndirectUnaryPredicate<projected<iterator_t<R>, Proj>> Pred>
    requires Permutable<iterator_t<R>>
    constexpr safe_subrangeiterator_t<R>
      partition(R&& r, Pred pred, Proj proj = {});
}
[…]
namespace ranges {
  template<BidirectionalIterator I, Sentinel<I> S, class Proj = identity,
           IndirectUnaryPredicate<projected<I, Proj>> Pred>
    requires Permutable<I>
      subrange<I> stable_partition(I first, S last, Pred pred, Proj proj = {});
  template<BidirectionalRange R, class Proj = identity,
           IndirectUnaryPredicate<projected<iterator_t<R>, Proj>> Pred>
    requires Permutable<iterator_t<R>>
      safe_subrangeiterator_t<R> stable_partition(R&& r, Pred pred, Proj proj = {});
}
[…]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4