| 66 | } |
| 67 | |
| 68 | static std::string unique_string(const std::string& prefix) |
| 69 | { |
| 70 | auto pid = getpid(); |
| 71 | auto tid = std::this_thread::get_id(); |
| 72 | auto clk = std::chrono::steady_clock::now().time_since_epoch().count(); |
| 73 | std::stringstream ss; |
| 74 | ss << std::hex << prefix << "-" << pid << "-" << tid << "-" << clk << "-" << random_string(16); |
| 75 | return ss.str(); |
| 76 | } |
| 77 | |
| 78 | tmp_dir::tmp_dir(std::string_view prefix) |
| 79 | : path(fs::temp_directory_path() / |
no test coverage detected