diff --git a/include/bx/inline/bx.inl b/include/bx/inline/bx.inl index 734b9a8..ab20841 100644 --- a/include/bx/inline/bx.inl +++ b/include/bx/inline/bx.inl @@ -172,6 +172,8 @@ namespace bx } template + requires (isInteger< Ty>() || isFloatingPoint< Ty>() ) + && (isInteger() || isFloatingPoint() ) inline constexpr Ty saturateCast(const FromT& _from) { if constexpr (isSame() ) @@ -225,7 +227,7 @@ namespace bx return true; } - *_out = saturateCast(_from); + *_out = static_cast(_from); return static_cast(*_out) == _from; }