According to my test in vs2019, ostream
takes 72 bytes, istream
takes 80 bytes and iostream
takes 88 bytes. There is no discernible difference in their size, so I don't think 'it's aimed at saving resource' is right.
Another confusing problem is why istringstream
enables construction with std::ios::out
?