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
cancellation_state::cancellation_state (4 of 4 overloads)

Construct and attach to a parent slot to create a new child slot.

template<
    typename CancellationSlot,
    typename InFilter,
    typename OutFilter>
constexpr cancellation_state(
    CancellationSlot slot,
    InFilter in_filter,
    OutFilter out_filter);
Parameters

slot

The parent cancellation slot to which the state will be attached.

in_filter

A function object that is used to transform incoming cancellation signals as they are received from the parent slot. This function object must have the signature:

boost::asio::cancellation_type_t in_filter(
    boost::asio::cancellation_type_t);

out_filter

A function object that is used to transform outcoming cancellation signals as they are relayed to the child slot. This function object must have the signature:

boost::asio::cancellation_type_t out_filter(
    boost::asio::cancellation_type_t);

The library provides the following pre-defined cancellation filters:


PrevUpHomeNext