Make buffers_adapter meet requirements

fix #386
This commit is contained in:
Vinnie Falco
2017-05-24 12:35:25 -07:00
parent 7c47668cbb
commit 2b18193f7d
2 changed files with 8 additions and 0 deletions

View File

@ -9,6 +9,7 @@ Version 44
* Fix README websocket example
* Add buffers_adapter regression test
* Tidy up is_dynamic_buffer traits test
* Make buffers_adapter meet requirements
--------------------------------------------------------------------------------

View File

@ -113,6 +113,13 @@ public:
return in_size_;
}
/// Returns the maximum sum of the sizes of the input sequence and output sequence the buffer can hold without requiring reallocation.
std::size_t
capacity() const
{
return max_size_;
}
/** Get a list of buffers that represents the output sequence, with the given size.
@throws std::length_error if the size would exceed the limit