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 d2ff41dbd7
commit ac0e188141

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>