##### cancellation_state::cancellation_state (3 of 4 overloads)

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

    template<
        typename CancellationSlot,
        typename Filter>
    constexpr cancellation_state(
        CancellationSlot slot,
        Filter filter);

###### Parameters

slot

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

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:

      asio::cancellation_type_t filter(
          asio::cancellation_type_t);

The library provides the following pre-defined cancellation filters:

- `disable_cancellation`
- `enable_terminal_cancellation`
- `enable_partial_cancellation`
- `enable_total_cancellation`