forked from fmtlib/fmt
Remove noexcept from file's move assignment
This commit is contained in:
@ -291,7 +291,8 @@ class file {
|
|||||||
|
|
||||||
file(file&& other) FMT_NOEXCEPT : fd_(other.fd_) { other.fd_ = -1; }
|
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();
|
close();
|
||||||
fd_ = other.fd_;
|
fd_ = other.fd_;
|
||||||
other.fd_ = -1;
|
other.fd_ = -1;
|
||||||
@ -399,7 +400,6 @@ class ostream final : private detail::buffer<char> {
|
|||||||
other.clear();
|
other.clear();
|
||||||
other.set(nullptr, 0);
|
other.set(nullptr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
~ostream() {
|
~ostream() {
|
||||||
flush();
|
flush();
|
||||||
delete[] data();
|
delete[] data();
|
||||||
|
Reference in New Issue
Block a user