I have rather simple code but probably complex question.
std::vector<int> V;
///.. code that uses vector
V.push_back(V.back());
Is this call of push_back
undefined behaviour?
The problem really relates the case when vector is full, will it reallocate and somehow invalidates or changes back?