We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b95761 commit b48b33dCopy full SHA for b48b33d
lib/inc/sys_string/impl/util/util.h
@@ -108,7 +108,10 @@ namespace sysstr::util
108
109
#endif
110
111
- template<std::unsigned_integral T>
+ //Preconditions:
112
+ // 1. val, numerator >= 0
113
+ // 2. denominator > 0
114
+ template<std::integral T>
115
constexpr T saturated_mul_div(T val, std::convertible_to<T> auto numerator, std::convertible_to<T> auto denominator) {
116
T num = T(numerator);
117
T denom = T(denominator);
0 commit comments