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);
Parser & operator=(Parser const & p);
public:
///
- Parser(idocstream & is);
+ Parser(idocstream & is, std::string const & fixedenc);
///
Parser(std::string const & s);
///
std::string encoding_iconv_;
///
CatCode theCatcode_[256];
- //
+ ///
cat_type theCatcodesType_;
- //
+ ///
cat_type curr_cat_;
+ ///
+ bool fixed_enc_;
};