[libcxx-commits] [libcxx] [libc++] Add `ranges::fold_left_first` and `ranges::fold_left_first_with_iter` (PR #121558)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 19 11:38:28 PDT 2025
================
@@ -392,5 +392,9 @@ void test() {
// expected-warning at -1{{ignoring return value of function declared with 'nodiscard' attribute}}
std::ranges::fold_left_with_iter(iter, iter, 0, std::plus());
// expected-warning at -1{{ignoring return value of function declared with 'nodiscard' attribute}}
+ std::ranges::fold_left_first_with_iter(range, std::plus());
+ // expected-warning at -1{{ignoring return value of function declared with 'nodiscard' attribute}}
+ std::ranges::fold_left_first_with_iter(iter, iter, std::plus());
----------------
mordante wrote:
Please test both `fold_left_first` overloads too.
https://github.com/llvm/llvm-project/pull/121558
More information about the libcxx-commits
mailing list