gcc/libstdc++-v3/include
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
..
backward P0935R0 Eradicating unnecessarily explicit default constructors 2018-06-14 15:12:24 +01:00
bits PR libstdc++/84928 use std::move in <numeric> algorithms 2018-07-06 15:16:13 +01:00
c Update copyright years. 2018-01-03 11:03:58 +01:00
c_compatibility Update copyright years. 2018-01-03 11:03:58 +01:00
c_global PR libstdc++/85729 add linkage specifications to headers 2018-05-10 13:35:45 +01:00
c_std Update copyright years. 2018-01-03 11:03:58 +01:00
debug re PR libstdc++/86272 (__gnu_debug::string uses undefined __glibcxx_check_insert_range2) 2018-07-04 18:13:11 +00:00
decimal Update copyright years. 2018-01-03 11:03:58 +01:00
experimental Add experimental::sample and experimental::shuffle from N4531 2018-06-25 17:23:49 +01:00
ext LWG 3035. std::allocator's constructors should be constexpr 2018-06-18 16:47:07 +01:00
parallel Update copyright years. 2018-01-03 11:03:58 +01:00
precompiled P0556R3 Integral power-of-2 operations, P0553R2 Bit operations 2018-07-03 22:04:45 +01:00
profile Update copyright years. 2018-01-03 11:03:58 +01:00
std P0935R0 Eradicating unnecessarily explicit default constructors 2018-07-06 13:39:02 +01:00
tr1 PR libstdc++/83140 - assoc_legendre returns negated value when m is odd 2018-05-10 13:59:52 +00:00
tr2 Update copyright years. 2018-01-03 11:03:58 +01:00
Makefile.am P0556R3 Integral power-of-2 operations, P0553R2 Bit operations 2018-07-03 22:04:45 +01:00
Makefile.in P0556R3 Integral power-of-2 operations, P0553R2 Bit operations 2018-07-03 22:04:45 +01:00