int* p = new int(); // Allocate and initialise an int
new (p) int(); // Initialise a new int in the space allocated before
的构造函数T正在通过std::move(old_ptr[i])。假设old_ptr指向类型对象T,这一举动允许移动构造函数 of T用于创建对象。它基本上假装old_ptr[i]是暂时的T对象(即使实际上可能不是),允许新的T从中窃取。要了解更多相关信息,请查找移动语义 https://stackoverflow.com/questions/3106110/can-someone-please-explain-move-semantics-to-me.