The following code results in "0004567" on clang++-7
#include <iostream>
#include <sstream>
using namespace std;
int main() {
ostringstream oss{"1234567"};
oss << "000";
cout << oss.str() << endl;
}
Now is this correct STL implementation?
I can't think of how is it useful to initialize with a string that will be overwritten...