The following code example that is here: http://coliru.stacked-crooked.com/a/c27c250819b72a01 shows 32 Bytes for std::string
while 24 Bytes for std::vector<int>
.
Though this may change from one platform to another, I expect to see sizeof std::string
always larger than std::vector
.
The question is why?