Quick A: Yes.
Recently on SO:
std::vector: contiguous data and copy/move
I have two questions for the following code: 1) Will the elements of
faces
be contiguous? 2) Doesstd::vector
copy or moveFace f
when inserting it?#include <vector> int main() { struct Face {}; std::vector<Face> faces; for (int i=0; i<10; ++i) { Face f; faces.push_back (f); } return 0; }
Add a Comment
Comments are closed.