Files
gcc/libstdc++-v3/include
Matthias Kretz 804bde962d libstdc++: Implement P4012R1 while reverting P3844R2 (consteval simd broadcast)
P3844R2 added consteval conversion for value-preserving conversion from
constants. It had been approved by LEWG in Kona. Therefore, the current
implementation has the consteval broadcast constructor. In Croydon, LEWG
reversed the decision but changed the overload set to keep the design
space open for C++29.

This patch implements the removal of the consteval constructor and
changes the broadcast constructor according to P4012R1, to keep the
design space open.

libstdc++-v3/ChangeLog:

	* include/bits/simd_details.h (__value_preserving_cast): Remove.
	* include/bits/simd_mask.h (basic_mask): Replace plain 0 and 1
	literals with cw<0> and cw<1>. Replace explicit basic_vec
	construction from 0 and 1 with default init and broadcast from
	_Up(1).
	(_M_to_uint): Replace 1 with cw<1>.
	* include/bits/simd_vec.h (basic_vec): Remove consteval
	broadcast overload. Remove explicit broadcast from
	non-value-preserving types.
	* testsuite/std/simd/arithmetic.cc: Replace ill-formed integer
	literals with explicit cast to T or use cw.
	* testsuite/std/simd/mask.cc: Likewise.
	* testsuite/std/simd/simd_alg.cc: Likewise.
	* testsuite/std/simd/traits_common.cc: Adjust for resulting
	traits changes.
	* testsuite/std/simd/traits_math.cc: Likewise.

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
2026-04-21 15:48:43 +02:00
..
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00