Get the maximum size that the buffer may grow to without triggering reallocation. * @returns The current capacity of the underlying string if less than * max_size(). Otherwise returns max_size(). */
| 1633 | * max_size(). Otherwise returns max_size(). |
| 1634 | */ |
| 1635 | std::size_t capacity() const ASIO_NOEXCEPT |
| 1636 | { |
| 1637 | return (std::min)(string_.capacity(), max_size()); |
| 1638 | } |
| 1639 | |
| 1640 | #if !defined(ASIO_NO_DYNAMIC_BUFFER_V1) |
| 1641 | /// @b DynamicBuffer_v1: Get a list of buffers that represents the input |