I\'m trying to parse an example of boost spirit (2.5.2) following the example. My code is the following
#include
#include
You are missing an include:
#include
It defines the attribute assignment rules to make Fusion sequences (vector2<>) assignable to std::pair.
See the code live: liveworkspace.org
#include
#include
#include
#include
#include
int main()
{
// Parsing two numbers
std::string input("1.2 3.4");
std::pair p;
namespace qi = boost::spirit::qi;
qi::phrase_parse(
input.begin(),
input.end(),
qi::double_ >> qi::double_ , // Parse grammar
qi::space, p);
std::cout << "Lo: " << p.first << "\n"
<< "Behold: " << p.second << "\n";
}