mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
Implement the resolution of LWG 444, accepted in Kona 2025. The new value to be assigned to the matching elements should default to the value type of the range, not the type returned by the projection. The type returned by the projection is only used to find the matching elements, and might not be assignable to the value type at all. libstdc++-v3/ChangeLog: * include/bits/ranges_algo.h (__replace_fn, __replace_if_fn): Change default template argument for type of new value, as per LWG 4444. * testsuite/25_algorithms/replace/lwg4444.cc: New test. * testsuite/25_algorithms/replace_if/lwg4444.cc: New test. Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>