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 for the latest Boost documentation.
PrevUpHomeNext
handler_ptr::invoke

Invoke the handler in the owned object.

Synopsis
template<
    class... Args>
void
invoke(
    Args&&... args);
Description

This function invokes the handler in the owned object with a forwarded argument list. Before the invocation, the owned object is destroyed, satisfying the deallocation-before-invocation Asio guarantee.

Preconditions:

has_value() == true

Postconditions:

has_value() == false

Remarks

Care must be taken when the arguments are themselves stored in the owned object. Such arguments must first be moved to the stack or elsewhere, and then passed, or else undefined behavior will result.


PrevUpHomeNext