Defined in:Inserts an object into an array.
template <typename T> void InsertArrayElement(int32 index, T&& element);
||The location at which the object is to be inserted.|
||The new element to insert into the array.|
InsertArrayElementfunction increases the size of an array by one, moves all of the existing elements at location
indexor greater up by one, and either copy-constructs or move-constructs the new element into the array using the object referenced by the
elementparameter, depending on whether an lvalue reference or rvalue reference is passed to the function. When the existing elements are moved, they are move-constructed in their new locations, and the old objects are destroyed.
indexparameter is greater than or equal to the current size of the array, then the array is enlarged to the size
index + 1. In this case, elements between the old size and new size are default-constructed if the type of object stored in the array is a non-POD type, and the elements are left uninitialized if the type of object stored in the array is a POD type.