4 ms·
vector::insert() is certainly not a C idiom. In can never be a C idiom because that is C++ code. the x = append(x, foo) idiom can be seen all over C, most obvi
by webkike 13y ago
vector::insert() is certainly not a C idiom. In can never be a C idiom because that is C++ code.
the x = append(x, foo) idiom can be seen all over C, most obviously with the use of realloc, which is often called to resize an array via x = realloc(x, newsize).
- mjdwitt 13y agoIndeed. Which is why pcwalton is answering Thomas' conjecture about C++'s STL containers.