mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-31 03:07:36 +02:00
Suppress a bogus warning
This commit is contained in:
@ -953,6 +953,8 @@ class basic_memory_buffer final : public detail::buffer<T> {
|
|||||||
T* old_data = this->data();
|
T* old_data = this->data();
|
||||||
T* new_data =
|
T* new_data =
|
||||||
std::allocator_traits<Allocator>::allocate(alloc_, new_capacity);
|
std::allocator_traits<Allocator>::allocate(alloc_, new_capacity);
|
||||||
|
// Suppress a bogus -Wstringop-overflow in gcc 13.1 (#3481).
|
||||||
|
FMT_ASSERT(this->size() <= new_capacity, "");
|
||||||
// The following code doesn't throw, so the raw pointer above doesn't leak.
|
// The following code doesn't throw, so the raw pointer above doesn't leak.
|
||||||
std::uninitialized_copy(old_data, old_data + this->size(),
|
std::uninitialized_copy(old_data, old_data + this->size(),
|
||||||
detail::make_checked(new_data, new_capacity));
|
detail::make_checked(new_data, new_capacity));
|
||||||
|
Reference in New Issue
Block a user