What is the overhead in the string structure that causes sizeof() to be 32 ?
std::string typically contains a buffer for the "small string optimization" --- if the string is less than the buffer size then no heap allocation is required.
std::string