Parsing a pair of ints with boost spirit

后端 未结 1 1151
没有蜡笔的小新
没有蜡笔的小新 2020-12-31 08:40

I have the following code:

std::string test(\"1.1\");
std::pair d;

bool r = qi::phrase_parse(
        test.begin(),
        test.end(),
             


        
相关标签:
1条回答
  • 2020-12-31 09:13

    It should work. What people forget very often is to add a

    #include <boost/fusion/include/std_pair.hpp>
    

    to their list of includes. This is necessary to make std::pair a full blown Fusion citizen.

    0 讨论(0)
提交回复
热议问题