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-deletedrelease/4.3a0
parent
8541ad4dd4
commit
9c1952cd1f
|
@ -129,6 +129,8 @@ struct QPSParser::MPSGrammar: base_grammar {
|
||||||
|
|
||||||
QP QPSParser::Parse() {
|
QP QPSParser::Parse() {
|
||||||
RawQP rawData;
|
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> begin(stream);
|
||||||
boost::spirit::basic_istream_iterator<char> last;
|
boost::spirit::basic_istream_iterator<char> last;
|
||||||
|
|
||||||
|
|
|
@ -17,13 +17,12 @@ namespace gtsam {
|
||||||
class QPSParser {
|
class QPSParser {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::fstream stream;
|
std::string fileName_;
|
||||||
struct MPSGrammar;
|
struct MPSGrammar;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
QPSParser(const std::string& fileName) :
|
QPSParser(const std::string& fileName) :
|
||||||
stream(findExampleDataFile(fileName).c_str()) {
|
fileName_(findExampleDataFile(fileName)) {
|
||||||
stream.unsetf(std::ios::skipws);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QP Parse();
|
QP Parse();
|
||||||
|
|
Loading…
Reference in New Issue