spirit_x3
spirit_x3 copied to clipboard
lit("...") stores its match into the rule attribute
This test case fails:
{
// literals wrapping strings shall not be stored
std::string attr;
test_attr("foo", lit("foo"), attr, true);
BOOST_TEST((attr.empty()));
}
...while this one suceeds:
{
// same as above, but with lit(char)
std::string attr;
test_attr("foo", lit('f') >> lit('o') >> lit('o'), attr, true);
BOOST_TEST((attr.empty()));
}
This test case is also failing:
{
// same as above, but with lit(char)
char attr = 0;
BOOST_TEST((test_attr("f", lit('f'), attr, true)));
BOOST_TEST((!attr));
}
I believe this was fixed in https://github.com/boostorg/spirit/pull/6