Fix a conversion warning with Clang10 on Windows (#1750)

Fixes #1747
This commit is contained in:
Florin Iucha 2020-07-03 08:53:42 -04:00 committed by GitHub
parent c9c5b90da7
commit 31ce6bc702
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -566,7 +566,7 @@ template <typename U>
void buffer<T>::append(const U* begin, const U* end) {
size_t new_size = size_ + to_unsigned(end - begin);
reserve(new_size);
std::uninitialized_copy(begin, end, make_checked(ptr_, capacity_) + size_);
std::uninitialized_copy(begin, end, make_checked(ptr_ + size_, capacity_ - size_));
size_ = new_size;
}
} // namespace detail