boost::redis::resp3::flat_tree::reserve

Reserves capacity for incoming data.

Synopsis

void
reserve(
    std::size_t bytes,
    std::size_t nodes);

Description

Adding nodes (e.g. by passing the tree to async_exec) won't cause reallocations until the data or node capacities are exceeded, following the usual vector semantics. The implementation might reserve more capacity than the one requested.

Object lifetimes

References to the nodes and strings in *this are invalidated.

Exception safety

Basic guarantee. Memory allocations might throw.

Parameters

Name Description

bytes

Number of bytes to reserve for data.

nodes

Number of nodes to reserve.

Created with MrDocs