libstdc++: Mark some more algorithms constexpr for C++20
authorPatrick Palka <ppalka@redhat.com>
Tue, 22 Sep 2020 00:48:17 +0000 (20:48 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 22 Sep 2020 00:48:17 +0000 (20:48 -0400)
commitf017952d31ba8fa965106505bed5844cc1a63b4b
tree5ed5ce03354daa0c012c06149d582faa7cac834a
parent44135373fcdbe4019c5524ec3dff8e93d9ef113c
libstdc++: Mark some more algorithms constexpr for C++20

As per P0202.

libstdc++-v3/ChangeLog:

* include/bits/stl_algo.h (for_each_n): Mark constexpr for C++20.
(search): Likewise for the overload that takes a searcher.
* testsuite/25_algorithms/for_each/constexpr.cc: Test constexpr
std::for_each_n.
* testsuite/25_algorithms/search/constexpr.cc: Test constexpr
std::search overload that takes a searcher.
libstdc++-v3/include/bits/stl_algo.h
libstdc++-v3/testsuite/25_algorithms/for_each/constexpr.cc
libstdc++-v3/testsuite/25_algorithms/search/constexpr.cc