Jonathan Wakely df1d436d17 libstdc++: Fix <numeric> parallel algos for move-only values [PR117905]
All of reduce, transform_reduce, exclusive_scan, and inclusive_scan,
transform_exclusive_scan, and transform_inclusive_scan have a
precondition that the type of init meets the Cpp17MoveConstructible
requirements. It isn't required to be copy constructible, so when
passing it to the next internal function it needs to be moved, not
copied. We also need to move when creating local variables on the stack,
and when returning as part of a pair.

libstdc++-v3/ChangeLog:

	PR libstdc++/117905
	* include/pstl/glue_numeric_impl.h (reduce, transform_reduce)
	(transform_reduce, inclusive_scan, transform_exclusive_scan)
	(transform_inclusive_scan): Use std::move for __init parameter.
	* include/pstl/numeric_impl.h (__brick_transform_reduce)
	(__pattern_transform_reduce, __brick_transform_scan)
	(__pattern_transform_scan): Likewise.
	* include/std/numeric (inclusive_scan, transform_exclusive_scan):
	Use std::move to create local copy of the first element.
	* testsuite/26_numerics/pstl/numeric_ops/108236.cc: Move test
	using move-only type to ...
	* testsuite/26_numerics/pstl/numeric_ops/move_only.cc: New test.
2025-05-06 17:19:26 +01:00
2025-04-16 00:18:18 +00:00
2025-05-02 00:17:18 +00:00
2025-04-17 00:18:03 +00:00
2025-04-29 00:20:16 +00:00
2025-04-26 00:19:18 +00:00
2025-04-23 00:18:18 +00:00
2025-04-25 00:18:00 +00:00
2025-05-06 11:41:18 +05:30
2025-05-03 00:18:18 +00:00
2025-04-26 00:19:18 +00:00
2025-04-29 00:20:16 +00:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.
Description
No description provided
Readme 4.2 GiB
Languages
C++ 30.7%
C 30.2%
Ada 14.4%
D 6.1%
Go 5.7%
Other 12.4%