| 70 | |
| 71 | template <int Line, class T> |
| 72 | std::string print(T const & x, char const * prefix, char const * delimiter) |
| 73 | { |
| 74 | std::ostringstream s; |
| 75 | leaf::detail::diagnostics_writer w(s); |
| 76 | w.set_prefix(prefix); |
| 77 | w.set_delimiter(delimiter); |
| 78 | w.write(x); |
| 79 | w.write(x); |
| 80 | std::string q = s.str(); |
| 81 | std::cout << "[LINE " << Line << "] " << q << '\n'; |
| 82 | return q; |
| 83 | } |
| 84 | |
| 85 | struct my_exception: std::exception |
| 86 | { |
no test coverage detected