diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ef2f3ea..2ea010a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 -------------------------------------------------------------------------------- diff --git a/include/beast/core/buffers_adapter.hpp b/include/beast/core/buffers_adapter.hpp index 2cb8eccc..6cff9923 100644 --- a/include/beast/core/buffers_adapter.hpp +++ b/include/beast/core/buffers_adapter.hpp @@ -112,6 +112,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.