Base: Require clamp to take arithmetic values

use std::clamp internally, function should probably be removed
This commit is contained in:
Benjamin Nauck
2025-04-08 23:06:21 +02:00
parent 7f5b1c9f2c
commit 12fa564894

View File

@@ -113,9 +113,10 @@ inline manipulator<int> blanks(int n)
// ----------------------------------------------------------------------------
template<class T>
requires std::is_arithmetic_v<T>
inline T clamp(T num, T lower, T upper)
{
return std::max<T>(std::min<T>(upper, num), lower);
return std::clamp<T>(num, lower, upper);
}
template<class T>