Skip to content
Snippets Groups Projects
Commit b3426141 authored by Giuseppe D'Angelo's avatar Giuseppe D'Angelo Committed by Patrick Palka
Browse files

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: default avatarGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: default avatarPatrick Palka <ppalka@redhat.com>
Reviewed-by: default avatarJonathan Wakely <jwakely@redhat.com>
parent 7cc57301
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment