Namespaces
Variants
Views
Actions

Talk:cpp/algorithm/ranges/clamp

From cppreference.com

The possible implementation is incorrect. forwarding pv twice can lead to problems. See this example: https://godbolt.org/z/4xjGds9Tb

--45.156.242.171 14:31, 15 August 2023 (PDT)

Yup, fixed  Done. Honestly, not a whole lot of reason to have any forwards at all for an expositional reference impl --Ybab321 (talk) 17:09, 15 August 2023 (PDT)