MCPcopy Create free account
hub / github.com/boostorg/parser / github_issue_36

Function github_issue_36

test/github_issues.cpp:27–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25
26
27void 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
48namespace issue_50 {
49 struct X

Callers 1

mainFunction · 0.85

Calls 2

parseFunction · 0.50
clearMethod · 0.45

Tested by

no test coverage detected