return move-assignment dequeue optimization

This commit is contained in:
2022-08-12 23:53:22 +03:00
parent 00f7a24d54
commit 67561636e5
2 changed files with 29 additions and 8 deletions

View File

@@ -2554,7 +2554,7 @@ private:
template<typename T1 = T, typename std::enable_if<
!std::is_trivially_copyable<T1>::value
, int>::type = 0>
inline void elementNew(T * to, T && from) {new(to)T(from);}
inline void elementNew(T * to, T && from) {new(to)T(std::move(from));}
template<typename T1 = T, typename std::enable_if<
std::is_trivially_copyable<T1>::value
, int>::type = 0>