Question

int main() {
    std::string input("A90 (a-><>b)");
    std::string::iterator strbegin = input.begin();
    map<char, int> p;
    qi::phrase_parse(strbegin, input.end(),
    (qi::char_ >> qi::int_) % ':', // parser grammar
    qi::space, // delimiter grammar
    p); // attribute to fill while parsing
    return 0;
}

This code gives me error -

error: no matching function for call to ‘std::pair<char, int>::pair(const char&)’

and I am clueless on it.

Was it helpful?

Solution

You need include "boost/fusion/include/std_pair.hpp"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top