Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit a8a4da0b3c.
PrevUpHomeNext
stream_parser::stream_parser (7 of 8 overloads)

Constructor.

Synopsis
stream_parser(
    storage_ptr sp,
    parse_options const& opt,
    std::byte* buffer,
    std::size_t size);
Description

This constructs a new parser which first uses the caller-owned storage pointed to by buffer for temporary storage, falling back to the memory resource sp if needed. The parser will use the specified parsing options.

The parsed value will use the default memory resource for storage. To use a different resource, call reset after construction.

Complexity

Constant.

Exception Safety

No-throw guarantee.

Parameters

Name

Description

sp

The memory resource to use for temporary storage after buffer is exhausted.

opt

The parsing options to use.

buffer

A pointer to valid memory of at least size bytes for the parser to use for temporary storage. Ownership is not transferred, the caller is responsible for ensuring the lifetime of the memory pointed to by buffer extends until the parser is destroyed.

size

The number of valid bytes in buffer.


PrevUpHomeNext