Skip to content

Commit 7c23542

Browse files
committed
Fix sign conversion
1 parent 56d3f7c commit 7c23542

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/boost/int128/iostream.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ auto operator>>(std::basic_istream<charT, traits>& is, LibIntegerType& v)
8787

8888
// Put back unconsumed characters
8989
// If r is greater than 0 then an errno values has been hit
90-
const auto consumed {r > 0 ? 0 : -r};
90+
const auto consumed {static_cast<std::size_t>(r > 0 ? 0 : -r)};
9191
BOOST_INT128_ASSERT(t_buffer_len >= consumed);
9292
const auto return_chars {static_cast<std::size_t>(t_buffer_len - consumed)};
9393

0 commit comments

Comments
 (0)