We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbaa9d2 commit fc0a86bCopy full SHA for fc0a86b
ofstream.cc
@@ -50,6 +50,8 @@ ofstream::ofstream (const char* filename, openmode mode)
50
ofstream::~ofstream (void) noexcept
51
{
52
try { flush(); } catch (...) {}
53
+ if (m_File.fd() <= STDERR_FILENO) // Do not close cin,cout,cerr
54
+ m_File.detach();
55
}
56
57
/// Flushes the buffer and closes the file.
0 commit comments