return move-assignment vector optimization

This commit is contained in:
2022-08-16 20:26:42 +03:00
parent 24da7aa644
commit 2550f76376

View File

@@ -2478,7 +2478,7 @@ private:
template<typename T1 = T, typename std::enable_if< template<typename T1 = T, typename std::enable_if<
!std::is_trivially_copyable<T1>::value !std::is_trivially_copyable<T1>::value
, int>::type = 0> , 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< template<typename T1 = T, typename std::enable_if<
std::is_trivially_copyable<T1>::value std::is_trivially_copyable<T1>::value
, int>::type = 0> , int>::type = 0>