diff options
author | Jakub Kuderski <jakub@nod-labs.com> | 2025-10-11 11:33:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-10-11 11:33:18 -0400 |
commit | 0820266651649c0eb6c384df91da4c6f662e5136 (patch) | |
tree | a8fc296bda4d986d118c1fc7823fded4cf52183d /libcxxabi/test/catch_class_04.pass.cpp | |
parent | 7eee67202378932d03331ad04e7d07ed4d988381 (diff) | |
download | llvm-main.zip llvm-main.tar.gz llvm-main.tar.bz2 |
Use wrappers around `std::accumulate` to make the code more concise and
less bug-prone: https://github.com/llvm/llvm-project/pull/162129.
With `std::accumulate`, it's the initial value that determines the
accumulator type. `llvm::sum_of` and `llvm::product_of` pick the right
accumulator type based on the range element type.
Found some funny bugs like a local accumulate helper that calculated a
sum with initial value of 1 -- we didn't hit the bug because the code
was actually dead...
Diffstat (limited to 'libcxxabi/test/catch_class_04.pass.cpp')
0 files changed, 0 insertions, 0 deletions