using std::flush ensures debug logging even in case of unexpected termination:
"This manipulator may be used to produce an incomplete line of output immediately, e.g. when displaying output from a long-running process, logging activity of multiple threads or logging activity of a program that may crash unexpectedly."
using std::flush ensures debug logging even in case of unexpected termination:
"This manipulator may be used to produce an incomplete line of output immediately, e.g. when displaying output from a long-running process, logging activity of multiple threads or logging activity of a program that may crash unexpectedly."
https://en.cppreference.com/w/cpp/io/manip/flush