Skip to content

Commit 42d0183

Browse files
committed
Fix MSVC 14.1 missing std::min
1 parent e018c0e commit 42d0183

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/boost/int128/numeric.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,9 @@ constexpr uint128_t gcd(uint128_t a, uint128_t b) noexcept
263263
return a;
264264
}
265265

266-
const auto shift {std::min(countr_zero(a), countr_zero(b))};
266+
const auto a_zero {countr_zero(a)};
267+
const auto b_zero {countr_zero(b)};
268+
const auto shift {b_zero < a_zero ? b_zero : a_zero};
267269
a >>= shift;
268270
b >>= shift;
269271

0 commit comments

Comments
 (0)