diff --git a/include/protozero/buffer_string.hpp b/include/protozero/buffer_string.hpp index 96ec8a02..c620879e 100644 --- a/include/protozero/buffer_string.hpp +++ b/include/protozero/buffer_string.hpp @@ -57,8 +57,8 @@ struct buffer_customization { protozero_assert(from <= buffer->size()); protozero_assert(to <= buffer->size()); protozero_assert(from <= to); - buffer->erase(buffer->begin() + from, - buffer->begin() + to); + buffer->erase(buffer->begin() + static_cast(from), + buffer->begin() + static_cast(to)); } static char* at_pos(std::string* buffer, std::size_t pos) {