@b DynamicBuffer_v2: Grow the underlying memory by the specified number of bytes. * Resizes the string to accommodate an additional @c n bytes at the end. * * @throws std::length_error If size() + n > max_size() . */
| 1985 | * @throws std::length_error If <tt>size() + n > max_size()</tt>. |
| 1986 | */ |
| 1987 | void grow(std::size_t n) |
| 1988 | { |
| 1989 | if (size() > max_size() || max_size() - size() < n) |
| 1990 | { |
| 1991 | std::length_error ex("dynamic_string_buffer too long"); |
| 1992 | boost::asio::detail::throw_exception(ex); |
| 1993 | } |
| 1994 | |
| 1995 | string_.resize(size() + n); |
| 1996 | } |
| 1997 | |
| 1998 | /// @b DynamicBuffer_v2: Shrink the underlying memory by the specified number |
| 1999 | /// of bytes. |
nothing calls this directly
no test coverage detected