Simple question:
vector<int> vi;
vi.reserve(1984);
vi[84] = 1900;
Is this legal? Note we are talking int here not some Widget whose dtor might cause mayhem because it thinks element at position 84 is being destroyed, while at pos 84 there is just random(or maybe zero-d) memory.