X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftex2lyx%2FParser.h;h=19f0c5fbe33a61ab5bbbb5af4a06fcef8dce8fb4;hb=237193f8a888777192981136469a5d4febb8e9d8;hp=15832f9fa7d739c3a8c975683c4ae295ad70f9c4;hpb=14a5d07df69bb493d8ec21947f177e3e62e1ffb1;p=lyx.git diff --git a/src/tex2lyx/Parser.h b/src/tex2lyx/Parser.h index 15832f9fa7..19f0c5fbe3 100644 --- a/src/tex2lyx/Parser.h +++ b/src/tex2lyx/Parser.h @@ -126,7 +126,8 @@ public: iparserdocstream(idocstream & is) : is_(is) {} /// Like std::istream::operator bool() - operator bool() const { return s_.empty() ? is_ : true; } + /// Do not convert is_ implicitly to bool, since that is forbidden in C++11. + explicit operator bool() const { return s_.empty() ? !is_.fail() : true; } /// change the encoding of the input stream to \p e (iconv name) void setEncoding(std::string const & e);