fd33598558
This adds constexpr to 11 algorithms defined in <numeric> as per P1645R1. libstdc++-v3/ChangeLog: P1645R1 constexpr for <numeric> algorithms * include/bits/stl_numeric.h (iota, accumulate, inner_product, partial_sum, adjacent_difference): Make conditionally constexpr for C++20. * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature test macro. (reduce, transform_reduce, exclusive_scan, inclusive_scan, transform_exclusive_scan, transform_inclusive_scan): Make conditionally constexpr for C++20. * include/std/version (__cpp_lib_constexpr_numeric): Define. * testsuite/26_numerics/accumulate/constexpr.cc: New test. * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise. * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise. * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise. * testsuite/26_numerics/inner_product/constexpr.cc: Likewise. * testsuite/26_numerics/iota/constexpr.cc: Likewise. * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise. * testsuite/26_numerics/reduce/constexpr.cc: Likewise. * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise. * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise. * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise. |
||
---|---|---|
.. | ||
17_intro | ||
18_support | ||
19_diagnostics | ||
20_util | ||
21_strings | ||
22_locale | ||
23_containers | ||
24_iterators | ||
25_algorithms | ||
26_numerics | ||
27_io | ||
28_regex | ||
29_atomics | ||
30_threads | ||
abi | ||
backward | ||
config | ||
data | ||
decimal | ||
experimental | ||
ext | ||
lib | ||
libstdc++-abi | ||
libstdc++-dg | ||
libstdc++-prettyprinters | ||
libstdc++-xmethods | ||
performance | ||
special_functions | ||
std | ||
tr1 | ||
tr2 | ||
util | ||
Makefile.am | ||
Makefile.in |