I have s simple code like this, I want to know the implementation of std::string, so I use the GDB and want to step into the source code, but failed. But step into std::map(or std::set) success.
#include <string>#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <string>#include <map>int main(){ std::string str; std::map<int, int> myMap; printf("sizeof empty string is %lu, size is %lu\n", sizeof(str), str.size()); std::string str1("abcdefghijklmnopqrstuvwxyz1234567890"); printf("sizeof string is %lu, size is %lu\n", sizeof(str), str1.size()); return 0;}