| 56 | } |
| 57 | |
| 58 | static void write_file(const std::string & fname, const std::string & content) { |
| 59 | std::ofstream file(fname); |
| 60 | if (!file) { |
| 61 | throw std::runtime_error(string_format("error: failed to open file '%s'\n", fname.c_str())); |
| 62 | } |
| 63 | file << content; |
| 64 | file.close(); |
| 65 | } |
| 66 | |
| 67 | common_arg & common_arg::set_examples(std::initializer_list<enum llama_example> examples) { |
| 68 | this->examples = std::move(examples); |
no test coverage detected