Name |
Last commit
|
Last update |
---|---|---|
.. | ||
accumulate | ||
adjacent_difference | ||
bit | ||
complex | ||
gcd | ||
headers | ||
inner_product | ||
iota | ||
lcm | ||
partial_sum | ||
random | ||
slice | ||
slice_array | ||
valarray |
Use the value of the first element as the initial value of the __valarray_sum accumulator. Value-initialization might not create the additive identity for the value type. Make a similar change to __valarray_product even though it's only ever used internally with a value_type of size_t. PR libstdc++/87641 * include/bits/valarray_array.h (__valarray_sum): Use first element to initialize accumulator instead of value-initializing it. (__valarray_product<_Tp>): Move to ... * src/c++98/valarray.cc (__valarray_product<_Tp>): Here. Use first element to initialize accumulator. (__valarray_product(const valarray<size_t>&)): Remove const_cast made unnecessary by LWG 389. * testsuite/26_numerics/valarray/87641.cc: New test. From-SVN: r265270
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
accumulate | Loading commit data... | |
adjacent_difference | Loading commit data... | |
bit | Loading commit data... | |
complex | Loading commit data... | |
gcd | Loading commit data... | |
headers | Loading commit data... | |
inner_product | Loading commit data... | |
iota | Loading commit data... | |
lcm | Loading commit data... | |
partial_sum | Loading commit data... | |
random | Loading commit data... | |
slice | Loading commit data... | |
slice_array | Loading commit data... | |
valarray | Loading commit data... |