gcc/libstdc++-v3/testsuite/26_numerics
Jonathan Wakely 5840e3b8ff PR libstdc++/84928 use std::move in <numeric> algorithms
P0616R0 altered the effects of the <numeric> algorithms to use std::move
on the accumulator values (resolving LWG 2055). This implements the
change for C++2a, but retains the previous behaviour for older
standards.

	* include/bits/stl_numeric.h (_GLIBCXX_MOVE_IF_20): Define macro to
	conditionally move, according to __cplusplus value.
	(accumulate, inner_product, partial_sum, adjacent_difference): Use
	_GLIBCXX_MOVE_IF_20.
	* testsuite/26_numerics/accumulate/lwg2055.cc: New test.
	* testsuite/26_numerics/adjacent_difference/lwg2055.cc: New test.
	* testsuite/26_numerics/inner_product/lwg2055.cc: New test.
	* testsuite/26_numerics/partial_sum/lwg2055.cc: New test.

From-SVN: r262477
2018-07-06 15:16:13 +01:00
..
accumulate PR libstdc++/84928 use std::move in <numeric> algorithms 2018-07-06 15:16:13 +01:00
adjacent_difference PR libstdc++/84928 use std::move in <numeric> algorithms 2018-07-06 15:16:13 +01:00
bit Optimize std::rotl and std::rotr, add test for std::popcount 2018-07-04 09:07:23 +01:00
complex Update copyright years. 2018-01-03 11:03:58 +01:00
gcd Update copyright years. 2018-01-03 11:03:58 +01:00
headers Update copyright years. 2018-01-03 11:03:58 +01:00
inner_product PR libstdc++/84928 use std::move in <numeric> algorithms 2018-07-06 15:16:13 +01:00
iota Update copyright years. 2018-01-03 11:03:58 +01:00
lcm Update copyright years. 2018-01-03 11:03:58 +01:00
partial_sum PR libstdc++/84928 use std::move in <numeric> algorithms 2018-07-06 15:16:13 +01:00
random Define "random_device" effective target 2018-07-04 17:56:21 +01:00
slice Update copyright years. 2018-01-03 11:03:58 +01:00
slice_array Update copyright years. 2018-01-03 11:03:58 +01:00
valarray LWG 3074 make scalar types non-deduced in valarray non-member functions 2018-06-14 20:36:54 +01:00