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(). */
| 1809 | * max_size(). Otherwise returns max_size(). |
| 1810 | */ |
| 1811 | std::size_t capacity() const ASIO_NOEXCEPT |
| 1812 | { |
| 1813 | return (std::min)(string_.capacity(), max_size()); |
| 1814 | } |
| 1815 | |
| 1816 | #if !defined(ASIO_NO_DYNAMIC_BUFFER_V1) |
| 1817 | /// @b DynamicBuffer_v1: Get a list of buffers that represents the input |