Constructing a qi::rule with a function attribute
问题 I'm trying to create a rule that returns a function<char(char const *)> constructed by currying a Phoenix expression. E.g., start = int_[_val = xxx]; rule<Iterator, function<char(char const *)> start; What should xxx be so that parsing the string "5" should give me a function that gives me the fifth character of its input? I've tried things like lambda(_a = arg1)[arg1[_a]](_1) might work, but I've not been able to hit on the magic formula. In other words, I'd like the attribute to curry arg2