Skip to content

Commit 22fac39

Browse files
committed
fix size_
1 parent 2c9fdfc commit 22fac39

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/beman/inplace_vector/inplace_vector.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct inplace_vector_destruct_base {
6262
inplace_vector_destruct_base(
6363
const inplace_vector_destruct_base
6464
&&other) noexcept(std::is_nothrow_move_constructible_v<T>)
65-
: elems(), size_(other.size()) {}
65+
: elems(), size_(other.size_) {}
6666

6767
inplace_vector_destruct_base &
6868
operator=(const inplace_vector_destruct_base &other) noexcept(
@@ -106,7 +106,7 @@ struct inplace_vector_base : public inplace_vector_destruct_base<T, Capacity> {
106106
: inplace_vector_destruct_base<T, Capacity>(other.size) {
107107
std::ranges::copy(other.begin(), other.end(), begin());
108108
std::destroy(other.begin(), other.end());
109-
other.size = 0;
109+
other.size_ = 0;
110110
}
111111
inplace_vector_base &operator=(const inplace_vector_base &other) noexcept(
112112
std::is_nothrow_copy_constructible_v<T> &&

0 commit comments

Comments
 (0)