value_stack::value_stack

Constructors.

Synopsis

value_stack(
    storage_ptr sp = {},
    unsigned char* temp_buffer = nullptr,
    std::size_t temp_size = 0) noexcept; (1)

value_stack(
    value_stack const&) = delete; (2)

Description

The copy constructor (2) is deleted: the type is neither copyable nor movable.

The other overload constructs an empty stack. Before any value can be built, the function reset must be called.

The sp parameter is only used to allocate intermediate storage; it will not be used for the value returned by release.

Parameters

Name Description

sp

A pointer to the boost::container::pmr::memory_resource to use for intermediate storage allocations. If this argument is omitted, the default memory resource is used.

temp_buffer

A pointer to a caller-owned buffer which will be used to store temporary data used while building the value. If this pointer is null, the builder will use the storage pointer to allocate temporary data.

temp_size

The number of valid bytes of storage pointed to by temp_buffer.