Remove noexcept from file's move assignment

This commit is contained in:
Victor Zverovich 2021-03-30 09:51:25 -07:00
parent 14848875bf
commit b49af043d7

View File

@ -291,7 +291,8 @@ class file {
file(file&& other) FMT_NOEXCEPT : fd_(other.fd_) { other.fd_ = -1; }
file& operator=(file&& other) FMT_NOEXCEPT {
// Move assignment is not noexcept because close may throw.
file& operator=(file&& other) {
close();
fd_ = other.fd_;
other.fd_ = -1;
@ -399,7 +400,6 @@ class ostream final : private detail::buffer<char> {
other.clear();
other.set(nullptr, 0);
}
~ostream() {
flush();
delete[] data();