r/cpp • • Mar 29 '19

Don’t Use std::endl

https://accu.org/index.php/journals/2619
0 Upvotes

27 comments sorted by

View all comments

Show parent comments

2

u/patatahooligan Mar 31 '19

Asking the author is not a viable solution. They might not remember, they might not work where you are anymore or you might have not gotten the code from someone in person to begin with. Information that is not in the code or in the documentation is almost guaranteed to be lost eventually.

0

u/Gotebe Apr 01 '19

So let me get this straight...

  • there is a performance problem (because if there wasn't, the point is moot)

  • one can't check whether changing to '\n' fixes it (because there's no tests? Because there's no performance targets?)

  • there's no documentation about this in a comment or whatever

  • there's nothing to see from code history (e.g. whether this part was written by an intern thereby making the probability of them nor knowing what endl does)

  • there's nobody to ask for all the reasons you evoke above.

Yeah, that is surely what OP called "impossible".