[libc++][ranges] Make sure all range algorithms support differing projection types:
authorKonstantin Varlamov <varconst@apple.com>
Tue, 26 Jul 2022 22:51:37 +0000 (15:51 -0700)
committerKonstantin Varlamov <varconst@apple.com>
Tue, 26 Jul 2022 22:51:49 +0000 (15:51 -0700)
commit964aeb713e7be96c2fb9ee06eb6bf47d72de26ca
tree4241f604c6982f4d314743ad10bb043b6859a5ad
parentead7302bbb148df2f53d028e1a446f5437bac916
[libc++][ranges] Make sure all range algorithms support differing projection types:

- for all algorithms taking more than one range, add a `robust` test to
  check the case where the ranges have different value types and the
  given projections are different, with each projection applying to
  a different value type;
- fix `ranges::include` to apply the correct projection to each range.

Differential Revision: https://reviews.llvm.org/D130515
libcxx/include/__algorithm/includes.h
libcxx/include/__algorithm/ranges_includes.h
libcxx/test/std/algorithms/ranges_robust_against_differing_projections.pass.cpp [new file with mode: 0644]