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(). */
| 1863 | * max_size(). Otherwise returns max_size(). |
| 1864 | */ |
| 1865 | std::size_t capacity() const noexcept |
| 1866 | { |
| 1867 | return (std::min)(string_.capacity(), max_size()); |
| 1868 | } |
| 1869 | |
| 1870 | #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1) |
| 1871 | /// @b DynamicBuffer_v1: Get a list of buffers that represents the input |