]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
add the background image to distribution tarball
[lyx.git] / src / Buffer.cpp
index d3aa876e770ee731574f5b58eeb9b35991476725..7205f692789a3653e0827183637e6eddc19e6dad 100644 (file)
@@ -994,7 +994,8 @@ bool Buffer::importString(string const & format, docstring const & contents, Err
        TempFile const tempfile("Buffer_importStringXXXXXX." + fmt->extension());
        FileName const name(tempfile.name());
        ofdocstream os(name.toFilesystemEncoding().c_str());
-       bool const success = (os << contents);
+       // Do not convert os implicitly to bool, since that is forbidden in C++11.
+       bool const success = !(os << contents).fail();
        os.close();
 
        bool converted = false;