[ox/std] Add proper forward function

This commit is contained in:
2021-07-23 21:29:57 -05:00
parent 78d444c2e5
commit 7ea0654af6
4 changed files with 25 additions and 2 deletions

View File

@ -67,6 +67,7 @@ struct SmallVector<T, 0> {
*items = bit_cast<T*>(new AllocAlias<T>[cap]);
}
[[maybe_unused]]
constexpr void moveItemsFrom(T**, SmallVector&, const std::size_t, const std::size_t) noexcept {
}
@ -488,7 +489,7 @@ void Vector<T, SmallVectorSize>::emplace_back(Args&&... args) {
if (m_size == m_cap) {
expandCap(m_cap ? m_cap * 2 : 100);
}
new (&m_items[m_size]) T{static_cast<Args>(args)...};
new (&m_items[m_size]) T{forward<Args>(args)...};
++m_size;
}