| 61 | }; |
| 62 | |
| 63 | static std::string read_file(const std::string & fname) { |
| 64 | std::ifstream file(fname); |
| 65 | if (!file) { |
| 66 | throw std::runtime_error(string_format("error: failed to open file '%s'\n", fname.c_str())); |
| 67 | } |
| 68 | std::string content((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>()); |
| 69 | file.close(); |
| 70 | return content; |
| 71 | } |
| 72 | |
| 73 | static const std::vector<common_arg> & get_common_arg_defs() { |
| 74 | static const std::vector<common_arg> options = [] { |
no test coverage detected