I am trying to get the vector source code to see how the standard std or stl vector is implemented.
This is for learning purpose. Now the question is where can i find t
Different runtime has different implementation.
But I guess this is what you want, the widely used gcc implementation: https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/std/vector
It is the main header file, and the implementation is in https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/bits/stl_vector.h and https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/bits/stl_bvector.h
It use MACRO to make the code run in good performance and fit in variable situation, but make it hard to read, wish you good luck.