Use correct capacity in iterator_buffer (#1807)

This commit is contained in:
Victor Zverovich
2020-08-08 07:01:21 -07:00
parent d0dd678693
commit 065889a593
2 changed files with 7 additions and 1 deletions

View File

@@ -771,7 +771,7 @@ class iterator_buffer : public Traits, public buffer<T> {
void flush();
public:
explicit iterator_buffer(OutputIt out, size_t n = 0)
explicit iterator_buffer(OutputIt out, size_t n = buffer_size)
: Traits(n),
buffer<T>(data_, 0, n < size_t(buffer_size) ? n : size_t(buffer_size)),
out_(out) {}