Its placement.
new (new_ptr + i) T(std::move(old_ptr[i]));
Here we can simplify this:
new (<destinationLocation>) T(<constructor parameters);
This is normal C ++ 03 and basically allows you to dynamically create an object in the memory area that you previously allocated (its an advanced technique that most people will not use (unless they create their own container, such as objects)).
The std :: move () part is from C ++ 11 and creates a special reference type that allows you to use the move constructor in type T.
new T(std::move(<source Obj>));
This basically means creating a new T using the original object and using the move constructor for efficiency. This means that the "original Obj object" will remain in the undefined state (therefore, not used) after moving, but it allows you to efficiently create objects.
Combining the two, you get a new location with a move, using an element from the array as the source object.
source share