[ using_logging_error_handler
| 77 | |
| 78 | //[ using_logging_error_handler |
| 79 | int main() |
| 80 | { |
| 81 | std::cout << "Enter a list of integers, separated by commas. "; |
| 82 | std::string input; |
| 83 | std::getline(std::cin, input); |
| 84 | |
| 85 | constexpr auto parser = bp::int_ >> *(',' > bp::int_); |
| 86 | logging_error_handler error_handler("parse.log"); |
| 87 | auto const result = bp::parse(input, bp::with_error_handler(parser, error_handler)); |
| 88 | |
| 89 | if (result) { |
| 90 | std::cout << "It looks like you entered:\n"; |
| 91 | for (int x : *result) { |
| 92 | std::cout << x << "\n"; |
| 93 | } |
| 94 | } |
| 95 | } |
| 96 | //] |
nothing calls this directly
no test coverage detected