diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h index dca7488cd..26c48d71a 100644 --- a/Source/cmGeneratedFileStream.h +++ b/Source/cmGeneratedFileStream.h @@ -80,7 +80,7 @@ public: /** * Allow a test for whether the file is open. */ - operator bool() { return static_cast(m_Stream); } + operator bool() { return m_Stream.good(); } /** * Close the file stream. This will cause the copy-if-different to the