Define [range.cmp] comparisons for C++20
authorJonathan Wakely <jwakely@redhat.com>
Thu, 17 Oct 2019 15:40:00 +0000 (16:40 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 17 Oct 2019 15:40:00 +0000 (16:40 +0100)
commitda8ddcec0c68a304fce64b102ba27e58c066a5c7
tree45921a1a0a1145385437e004bc7b067562f8e462
parent4c3784ae0fb0a3cc3a3a6c262e6dff0908a0d795
Define [range.cmp] comparisons for C++20

Define std::identity, std::ranges::equal_to, std::ranges::not_equal_to,
std::ranges::greater, std::ranges::less, std::ranges::greater_equal and
std::ranges::less_equal.

* include/Makefile.am: Add new header.
* include/Makefile.in: Regenerate.
* include/bits/range_cmp.h: New header for C++20 function objects.
* include/std/functional: Include new header.
* testsuite/20_util/function_objects/identity/1.cc: New test.
* testsuite/20_util/function_objects/range.cmp/equal_to.cc: New test.
* testsuite/20_util/function_objects/range.cmp/greater.cc: New test.
* testsuite/20_util/function_objects/range.cmp/greater_equal.cc: New
test.
* testsuite/20_util/function_objects/range.cmp/less.cc: New test.
* testsuite/20_util/function_objects/range.cmp/less_equal.cc: New test.
* testsuite/20_util/function_objects/range.cmp/not_equal_to.cc: New
test.

From-SVN: r277120
12 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/bits/range_cmp.h [new file with mode: 0644]
libstdc++-v3/include/std/functional
libstdc++-v3/testsuite/20_util/function_objects/identity/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/function_objects/range.cmp/equal_to.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/function_objects/range.cmp/greater.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/function_objects/range.cmp/greater_equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/function_objects/range.cmp/less.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/function_objects/range.cmp/less_equal.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/function_objects/range.cmp/not_equal_to.cc [new file with mode: 0644]