boost::burl::request_head::reserve

Reserve storage.

Synopsis

void
reserve(
    std::size_t bytes,
    std::size_t count,
    std::size_t start_line);

Description

Ensures the field section can grow to bytes bytes and the number of fields to count, and the request line to start_line bytes, without reallocating. Has no effect if the current allocation is already sufficient.

Reserving room for the request line lets it be set or changed later, up to start_line bytes, without shifting the field section.

All views are invalidated when a reallocation occurs.

Exception Safety

Strong guarantee. Calls to allocate may throw.

Exceptions

Name

Thrown on

std::length_error

bytes exceeds max_buffer_size, the table for count fields does not fit alongside bytes within max_buffer_size, or start_line exceeds fields_base::max_start_line_size.

Parameters

Name

Description

bytes

The serialized field‐section size, as returned by fields_base::buffer().size().

count

The number of fields.

start_line

The request‐line size to reserve room for, including its trailing CRLF, as it appears in message_head_base::buffer.

Created with MrDocs