Fix exception propagation from iterators (#2097)

This commit is contained in:
Victor Zverovich committed 2021-01-23 17:27:24 -08:00
1 parent acef0bb51a
commit ce519e939b
2 files changed
+13 -1

No files matched your search

+2 -1
View File
@@ -658,8 +658,9 @@ void buffer<T>::append(const U* begin, const U* end) {
template <typename OutputIt, typename T, typename Traits>
void iterator_buffer<OutputIt, T, Traits>::flush() {
out_ = copy_str<T>(data_, data_ + this->limit(this->size()), out_);
auto size = this->size();
this->clear();
out_ = copy_str<T>(data_, data_ + this->limit(size), out_);
}
} // namespace detail