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

PrevUpHomeNext

any_completion_handler

Polymorphic wrapper for completion handlers.

template<
    typename... Signatures>
class any_completion_handler
Types

Name

Description

allocator_type

The associated allocator type.

cancellation_slot_type

The associated cancellation slot type.

Member Functions

Name

Description

any_completion_handler [constructor]

Construct an any_completion_handler in an empty state, without a target object.

Construct an any_completion_handler to contain the specified target.

Move-construct an any_completion_handler from another.

get_allocator

Get the associated allocator.

get_cancellation_slot

Get the associated cancellation slot.

operator bool

Test if the polymorphic wrapper is empty.

operator!

Test if the polymorphic wrapper is non-empty.

operator()

Function call operator.

operator=

Move-assign an any_completion_handler from another.

Assignment operator that sets the polymorphic wrapper to the empty state.

swap

Swap the content of an any_completion_handler with another.

~any_completion_handler [destructor]

Destructor.

Friends

Name

Description

operator!=

Inequality operator.

operator==

Equality operator.

The any_completion_handler class template is a polymorphic wrapper for completion handlers that propagates the associated executor, associated allocator, and associated cancellation slot through a type-erasing interface.

When using any_completion_handler, specify one or more completion signatures as template parameters. These will dictate the arguments that may be passed to the handler through the polymorphic interface.

Typical uses for any_completion_handler include:

Requirements

Header: boost/asio/any_completion_handler.hpp

Convenience header: boost/asio.hpp


PrevUpHomeNext