Fix basic_streambuf::capacity

This commit is contained in:
Vinnie Falco
2016-10-14 19:38:28 -04:00
parent 0eb0e485c3
commit c9cd171c19
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -2,6 +2,7 @@
* Change implicit to default value in example
* Tidy up some declarations
* Fix basic_streambuf::capacity
--------------------------------------------------------------------------------
+1 -1
View File
@@ -533,7 +533,7 @@ basic_streambuf<Allocator>::capacity() const
{
auto pos = out_;
if(pos == list_.end())
return 0;
return in_size_;
auto n = pos->size() - out_pos_;
while(++pos != list_.end())
n += pos->size();