diff --git a/include/fmt/os.h b/include/fmt/os.h index 728a613b..c3388092 100644 --- a/include/fmt/os.h +++ b/include/fmt/os.h @@ -390,7 +390,7 @@ class file_buffer final : public buffer { public: FMT_API file_buffer(cstring_view path, const ostream_params& params); - FMT_API file_buffer(file_buffer&& other); + FMT_API file_buffer(file_buffer&& other) noexcept; FMT_API ~file_buffer(); void flush() { diff --git a/src/os.cc b/src/os.cc index 2ba9bc8a..81177b26 100644 --- a/src/os.cc +++ b/src/os.cc @@ -381,7 +381,7 @@ file_buffer::file_buffer(cstring_view path, const ostream_params& params) set(new char[params.buffer_size], params.buffer_size); } -file_buffer::file_buffer(file_buffer&& other) +file_buffer::file_buffer(file_buffer&& other) noexcept : buffer(grow, other.data(), other.size(), other.capacity()), file_(std::move(other.file_)) { other.clear();