Fix move constructor (#1844)

This commit is contained in:
Victor Zverovich committed 2020-09-01 08:48:56 -07:00
1 parent 69902c1787
commit 6cccdc24bc
2 files changed
+9 -1

No files matched your search

+3 -1
View File
@@ -396,7 +396,9 @@ class ostream : private detail::buffer<char> {
}
public:
ostream(ostream&& other) : file_(std::move(other.file_)) {
ostream(ostream&& other)
: detail::buffer<char>(other.data(), other.size(), other.capacity()),
file_(std::move(other.file_)) {
other.set(nullptr, 0);
}
~ostream() {