libstdc++: P1243R4 Rangify new algorithms
authorPatrick Palka <ppalka@redhat.com>
Mon, 17 Feb 2020 16:50:29 +0000 (11:50 -0500)
committerPatrick Palka <ppalka@redhat.com>
Tue, 18 Feb 2020 16:06:49 +0000 (11:06 -0500)
commitf3169941996c76ecbfae9c37709d2b57652be555
treee30850eec86962e35c48736205ccd960792c0c66
parent06119d691e27e25fd4f4486467ad95f7b545fde3
libstdc++: P1243R4 Rangify new algorithms

This adds rangified overloads for for_each_n, sample and clamp as per P1243R4.

libstdc++-v3/ChangeLog:

P1243R4 Rangify new algorithms
* include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
* testsuite/25_algorithms/clamp/constrained.cc: New test.
* testsuite/25_algorithms/for_each/constrained.cc: Augment test.
* testsuite/25_algorithms/sample/constrained.cc: New test.
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/ranges_algo.h
libstdc++-v3/testsuite/25_algorithms/clamp/constrained.cc [new file with mode: 0644]
libstdc++-v3/testsuite/25_algorithms/for_each/constrained.cc
libstdc++-v3/testsuite/25_algorithms/sample/constrained.cc [new file with mode: 0644]