#include <fstream>
int main()
{
auto fout = std::ofstream("/tmp/a.txt");
fout.open("/tmp/b.txt"); // Will "/tmp/a.txt" be closed?
fout.open("/tmp/c.txt"); // Will "/tmp/b.txt" be closed?
}
Does std::ofstream
guarantee the old open file will be closed if opening new one?