I came across a subtle bug a couple of days ago where the code looked something like this:
ostringstream ss;
int anInt( 7 );
ss << anInt << \"HA
You've essentially answered your own question is as much detail that's needed. I certainly can't think of any reason to use std::ends
when std::string
and std::stringstream
handle all that for you.
So, to answer your question explicitly, no, there is no reason to use std::ends
in a std::string
only environment.