Flush happens in the following cases:
So it seems in most regular programs, std::endl is basically unnecessary, but it's used almost everywhere.
So it seems in most regular programs,
std::endl
is basically unnecessary, but it's used almost everywhere.
No it's not redundant, since implementation of flushing along '\n'
isn't mandated by the standard. That's just an implementation specific behavior, while the behavior of std::endl
is always clearly defined.