make it compile with gcc 4.9 (ubuntu).

perhaps because fstream can't be passed around by value: http://stackoverflow.com/questions/12432952/why-is-my-fstream-being-implicitly-deleted
release/4.3a0
Duy-Nguyen Ta 2016-04-27 02:04:16 -04:00
parent 8541ad4dd4
commit 9c1952cd1f
2 changed files with 4 additions and 3 deletions

View File

@ -129,6 +129,8 @@ struct QPSParser::MPSGrammar: base_grammar {
QP QPSParser::Parse() {
RawQP rawData;
std::fstream stream(fileName_.c_str());
stream.unsetf(std::ios::skipws);
boost::spirit::basic_istream_iterator<char> begin(stream);
boost::spirit::basic_istream_iterator<char> last;

View File

@ -17,13 +17,12 @@ namespace gtsam {
class QPSParser {
private:
std::fstream stream;
std::string fileName_;
struct MPSGrammar;
public:
QPSParser(const std::string& fileName) :
stream(findExampleDataFile(fileName).c_str()) {
stream.unsetf(std::ios::skipws);
fileName_(findExampleDataFile(fileName)) {
}
QP Parse();