mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-02 23:21:45 +01:00
Replace fmt::system_error with std::system_error
This commit is contained in:
12
test/util.cc
12
test/util.cc
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user