Please don't mark this as duplicate without having read it as a whole. This is not a "what does std::reserve do" question.
Is it an error to write to a vector::reserve'd address with built-in types?
vector<int> vec;
vec.reserve(10);
vec[5] = 24; // Is this an error?
I understand that objects aren't initialized but since those are just integers and space is allocated by reserve and this is done in contiguous storage, is this an error at all?