#include "support/types.h"
#include "support/unicode.h"
-#include <boost/utility.hpp>
+#include <boost/noncopyable.hpp>
#include <functional>
#include <istream>
// The check only outputs a debug message, because it triggers
// a bug in compaq cxx 6.2, where is_open() returns 'true' for
// a fresh new filebuf. (JMarc)
- if (fb_.is_open() || istream::off_type(is.tellg()) > 0)
+ if (fb_.is_open() || istream::off_type(is.tellg()) > 0) {
LYXERR(Debug::LYXLEX) << "Error in Lexer::setFile: "
"file or stream already set." << endl;
+ }
fb_.open(filename.toFilesystemEncoding().c_str(), ios::in);
is.rdbuf(&fb_);
name = filename.absFilename();
void Lexer::Pimpl::setStream(istream & i)
{
- if (fb_.is_open() || istream::off_type(is.tellg()) > 0)
+ if (fb_.is_open() || istream::off_type(is.tellg()) > 0) {
LYXERR(Debug::LYXLEX) << "Error in Lexer::setStream: "
"file or stream already set." << endl;
+ }
is.rdbuf(i.rdbuf());
lineno = 0;
}