The vast majority of people do not know however and it is very hard to know if the author knows (or knew when they wrote the code). That is the opposite of simple.
You keep making my points for me: If you have to ask whether this was intentional you have long left the realms of readable and self-explaining code.
Also: Not every other author sits next to you in an office that both of you work in every day. Maybe you are looking at a sporadically maintained FLOSS-project or the author is on vacation, making this into a potentially multi-week-endeavor until you get your answer.
18
u/F-J-W Mar 29 '19
The problem is that
std::endlis premature pessimization in the vast majority of cases, making it impossible to see whether the flush is intentional.<< '\n' << std::flushcompletely avoids that problem and should thus always be preferred.