diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2025-01-19 16:30:20 +0100 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2025-01-20 10:49:48 -0500 |
commit | b342614139c0a981b369176980663941b9c27f39 (patch) | |
tree | ad8dbd76489ef7cfccb14be00a030b44fd58ed57 /gcc/tree-inline.cc | |
parent | 7cc573017274acfd5a276d959a8297ba04e98002 (diff) | |
download | gcc-b342614139c0a981b369176980663941b9c27f39.zip gcc-b342614139c0a981b369176980663941b9c27f39.tar.gz gcc-b342614139c0a981b369176980663941b9c27f39.tar.bz2 |
libstdc++: perfectly forward std::ranges::clamp arguments
As reported in PR118185, std::ranges::clamp does not correctly forward
the projected value to the comparator. Add the missing forward.
libstdc++-v3/ChangeLog:
PR libstdc++/118185
PR libstdc++/100249
* include/bits/ranges_algo.h (__clamp_fn): Correctly forward the
projected value to the comparator.
* testsuite/25_algorithms/clamp/118185.cc: New test.
Signed-off-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Patrick Palka <ppalka@redhat.com>
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Diffstat (limited to 'gcc/tree-inline.cc')
0 files changed, 0 insertions, 0 deletions