Replace fmt::error_code to std::error_code

This commit is contained in:
Владислав Щапов
2021-05-09 18:49:45 +05:00
committed by Victor Zverovich
parent 2165bef4ca
commit 2a9b314627
5 changed files with 9 additions and 28 deletions

View File

@@ -255,10 +255,10 @@ void file::dup2(int fd) {
}
}
void file::dup2(int fd, error_code& ec) FMT_NOEXCEPT {
void file::dup2(int fd, std::error_code& ec) FMT_NOEXCEPT {
int result = 0;
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
if (result == -1) ec = error_code(errno);
if (result == -1) ec = std::error_code(errno, std::generic_category());
}
void file::pipe(file& read_end, file& write_end) {