Replace fmt::system_error with std::system_error

This commit is contained in:
Victor Zverovich
2021-05-07 06:50:37 -07:00
parent 4b885c8633
commit 16f2ef91ab
13 changed files with 82 additions and 249 deletions

View File

@@ -9,18 +9,6 @@
#include <cstring>
std::string get_system_error(int error_code) {
#if defined(__MINGW32__) || !defined(_WIN32)
return strerror(error_code);
#else
enum { buffer_size = 200 };
char buffer[buffer_size];
if (strerror_s(buffer, buffer_size, error_code))
throw std::exception("strerror_s failed");
return buffer;
#endif
}
const char* const file_content = "Don't panic!";
fmt::buffered_file open_buffered_file(FILE** fp) {