mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-07 01:06:54 +08:00
Merge pull request #548 from ChaiScript/stack-vector-pop-back
Fix stack_vector.pop_back() pre-decrementing
This commit is contained in:
commit
cb55083603
@ -43,7 +43,7 @@ struct Stack_Vector
|
|||||||
};
|
};
|
||||||
|
|
||||||
void pop_back() noexcept(std::is_nothrow_destructible_v<T>) {
|
void pop_back() noexcept(std::is_nothrow_destructible_v<T>) {
|
||||||
(*this)[m_size--].~T();
|
(*this)[--m_size].~T();
|
||||||
}
|
}
|
||||||
|
|
||||||
~Stack_Vector() noexcept(std::is_nothrow_destructible_v<T>)
|
~Stack_Vector() noexcept(std::is_nothrow_destructible_v<T>)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user