Skip to content

Commit eca6125

Browse files
committed
Fix -Wsign-compare
1 parent b8b39ca commit eca6125

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/test/benchmarks/algorithms/nonmodifying/fold.bench.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ int main(int argc, char** argv) {
3131
std::size_t const size = st.range(0);
3232
using ValueType = typename Container::value_type;
3333
ValueType const limit = 1000; // ensure we never overflow in the addition
34-
assert(size <= std::numeric_limits<ValueType>::max());
34+
assert(static_cast<ValueType>(size) <= std::numeric_limits<ValueType>::max());
3535
assert(std::numeric_limits<ValueType>::max() > static_cast<ValueType>(size) * limit);
3636
assert(std::numeric_limits<ValueType>::min() < static_cast<ValueType>(size) * limit * -1);
3737

0 commit comments

Comments
 (0)