diff --git a/include/slang/util/SmallVector.h b/include/slang/util/SmallVector.h index 26dcdbd38..e23e7444d 100644 --- a/include/slang/util/SmallVector.h +++ b/include/slang/util/SmallVector.h @@ -320,7 +320,10 @@ class SmallVectorBase { std::uninitialized_move(result, end(), begin() + newSize - existingOverlap); // Copy in the new elements. - first = std::ranges::copy_n(first, existingOverlap, result).in; + first = std::ranges::copy_n(first, + static_cast>(existingOverlap), + result) + .in; // Insert the non-overwritten middle part. std::ranges::uninitialized_copy(first, last, end(), end() + numElems - existingOverlap);