4 ms·
Good point, thanks. (Though I've just checked gcc's definition of std::clamp and it looks like __glibcxx_assert(!(__hi < __lo)); return (__val < __lo)
by f00zz 6y ago
Good point, thanks.
(Though I've just checked gcc's definition of std::clamp and it looks like
__glibcxx_assert(!(__hi < __lo));
return (__val < __lo) ? __lo : (__hi < __val) ? __hi : __val;
so order of arguments does matter there.)