Ostringstream and ends
I was working with someone else's code and noticed that with all the uses of ostringsteam they used to add explicitly std::ends
.
This is something that I have never done and never faced a problem.
It doesn't show up, but should I std::ends
change the following code?
ostringstream message;
message << "Hello world, version " << 2 /* << std::ends ??? */;
printf( "%s\n", message.str().c_str() );
+2
source to share