Skip to content

Commit b48b33d

Browse files
committed
Portability fixes
1 parent 7b95761 commit b48b33d

File tree

1 file changed

+4
-1
lines changed
  • lib/inc/sys_string/impl/util

1 file changed

+4
-1
lines changed

lib/inc/sys_string/impl/util/util.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ namespace sysstr::util
108108

109109
#endif
110110

111-
template<std::unsigned_integral T>
111+
//Preconditions:
112+
// 1. val, numerator >= 0
113+
// 2. denominator > 0
114+
template<std::integral T>
112115
constexpr T saturated_mul_div(T val, std::convertible_to<T> auto numerator, std::convertible_to<T> auto denominator) {
113116
T num = T(numerator);
114117
T denom = T(denominator);

0 commit comments

Comments
 (0)