Fix small vector.

This commit is contained in:
ykiko 2024-06-06 15:11:24 +08:00
parent 78d203bdf4
commit 1a9c42ec80

View File

@ -334,7 +334,7 @@ struct small_vector {
small_vector(small_vector&& other) noexcept { small_vector(small_vector&& other) noexcept {
if(other.is_small()) { if(other.is_small()) {
_begin = reinterpret_cast<T*>(_buffer); _begin = reinterpret_cast<T*>(_buffer);
uninitialized_relocate_n(other._buffer, other.size(), _buffer); uninitialized_relocate_n((T*)other._buffer, other.size(), (T*)_buffer);
_end = _begin + other.size(); _end = _begin + other.size();
_capacity = _begin + N; _capacity = _begin + N;
} else { } else {