| 4 | #include <string> |
| 5 | |
| 6 | std::string read_file(const std::string& path) { |
| 7 | std::ifstream f(path); |
| 8 | if (!f) { |
| 9 | throw std::runtime_error("cannot open: " + path); |
| 10 | } |
| 11 | return std::string( |
| 12 | std::istreambuf_iterator<char>(f), |
| 13 | std::istreambuf_iterator<char>() |
| 14 | ); |
| 15 | } |
| 16 | |
| 17 | int safe_divide(int a, int b) { |
| 18 | if (b == 0) { |
nothing calls this directly
no outgoing calls
no test coverage detected