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 an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

saved_handler

An invocable, nullary function object which holds a completion handler.

Synopsis

Defined in header <boost/beast/core/saved_handler.hpp>

class saved_handler
Member Functions

Name

Description

emplace

Store a completion handler in the container.

has_value

Returns true if *this contains a completion handler.

invoke

Unconditionally invoke the stored completion handler.

maybe_invoke

Conditionally invoke the stored completion handler.

operator=

Copy Assignment (deleted)

Move Assignment.

reset

Discard the saved handler, if one exists.

saved_handler

Default Constructor.

Copy Constructor (deleted)

Move Constructor.

~saved_handler

Destructor.

Description

This container can hold a type-erased instance of any completion handler, or it can be empty. When the container holds a value, the implementation maintains an instance of net::executor_work_guard for the handler's associated executor. Memory is dynamically allocated to store the completion handler, and the allocator may optionally be specified. Otherwise, the implementation uses the handler's associated allocator.

Convenience header <boost/beast/core.hpp>


PrevUpHomeNext