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

Function main

example/trivial.cpp:15–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace bp = boost::parser;
14
15int main()
16{
17 std::cout << "Enter a list of doubles, separated by commas. No pressure. ";
18 std::string input;
19 std::getline(std::cin, input);
20
21 auto const result = bp::parse(input, bp::double_ >> *(',' >> bp::double_));
22
23 if (result) {
24 std::cout << "Great! It looks like you entered:\n";
25 for (double x : *result) {
26 std::cout << x << "\n";
27 }
28 } else {
29 std::cout
30 << "Good job! Please proceed to the recovery annex for cake.\n";
31 }
32}
33//]

Callers

nothing calls this directly

Calls 1

parseFunction · 0.70

Tested by

no test coverage detected