Header Reference: <numeric>
Header Reference: <numeric>
Accumulation, reduction, scans, inner products, and integer utility algorithms provided by <numeric>.
Header Reference: <numeric>
Accumulation, reduction, scans, inner products, and integer utility algorithms provided by <numeric>.
Use reference pages to confirm names, categories, nearby facilities, and the constraints that matter before writing or reviewing code.
Header reference pages are meant to answer a practical question quickly: what this header provides, when to reach for it, and which usage rules are easiest to get wrong.
<numeric>std::accumulatestd::reducestd::transform_reducestd::inclusive_scanstd::exclusive_scanstd::transform_inclusive_scanstd::transform_exclusive_scanstd::adjacent_differencestd::inner_productstd::gcdstd::lcmUse <numeric> when the operation is primarily about folding, combining, scanning, or computing over ranges of numbers or numeric-like values.
reduce may permit reordering depending on execution context and operation assumptions.#include <numeric>
int main() {
// Start with the primary facility from <numeric>.
// Then verify lifetime, invalidation, ordering, or error-handling rules.
return 0;
}