1
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.

Himanshu
  • 4,327
  • 16
  • 31
  • 39
Yogi Joshi
  • 786
  • 1
  • 6
  • 19

1 Answers1

2

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

jfly
  • 7,715
  • 3
  • 35
  • 65