| 25 | |
| 26 | |
| 27 | void github_issue_36() |
| 28 | { |
| 29 | namespace bp = boost::parser; |
| 30 | |
| 31 | auto id = bp::lexeme[+bp::char_( |
| 32 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz0123456789")]; |
| 33 | auto ids = +id; |
| 34 | |
| 35 | std::string str; |
| 36 | std::vector<std::string> vec; |
| 37 | |
| 38 | bp::parse("id1", id, bp::ws, str); // (1) |
| 39 | BOOST_TEST(str == "id1"); |
| 40 | str.clear(); |
| 41 | bp::parse("id1 id2", ids, bp::ws, vec); // (2) |
| 42 | BOOST_TEST(vec == std::vector<std::string>({"id1", "id2"})); |
| 43 | |
| 44 | // Intentionally ill-formed. |
| 45 | // bp::parse("i1 i2", ids, bp::ws, str); // (3) |
| 46 | } |
| 47 | |
| 48 | namespace issue_50 { |
| 49 | struct X |