I have a std::vector
on which I call reserve
with a large value. Afterwards I retrieve data()
.
Since iterating data
is then crashing I am wondering whether this is even allowed. Is reserve
forced to update data
to the allocated memory range?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…