Is there any better way (either faster or with fewer symbols of code) than erasing the element and re-adding it to the back?
template void mov
Possibly the fastest way, would be to swap it with the last element
template void moveItemToBack(std::vector& v, size_t itemIndex) { std::swap(v[itemIndex], v.back()); // or swap with *(v.end()-1) }
one operation! Ofcourse std::swap has to work with T
std::swap
T