File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1120,7 +1120,7 @@ inline constexpr bool operator!=(const T& x, const uint<N>& y) noexcept
11201120 return uint<N>(x) != y;
11211121}
11221122
1123- #if !defined(_MSC_VER) || _MSC_VER < 1916 // This kills MSVC 2017 compiler.
1123+ #if 0 && ( !defined(_MSC_VER) || _MSC_VER < 1916) // This kills MSVC 2017 compiler.
11241124inline constexpr bool operator<(const uint256& x, const uint256& y) noexcept
11251125{
11261126 auto xp = uint128{x[2], x[3]};
@@ -1137,7 +1137,11 @@ inline constexpr bool operator<(const uint256& x, const uint256& y) noexcept
11371137template <unsigned N>
11381138inline constexpr bool operator <(const uint<N>& x, const uint<N>& y) noexcept
11391139{
1140- return subc (x, y).carry ;
1140+ for (size_t i = uint<N>::num_words; i-- > 1 ; ) {
1141+ if (x[i] != y[i])
1142+ return x[i] < y[i];
1143+ }
1144+ return x[0 ] < y[0 ];
11411145}
11421146
11431147template <unsigned N, typename T,
You can’t perform that action at this time.
0 commit comments