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

associated_cancellation_slot

Traits type used to obtain the cancellation_slot associated with an object.

template<
    typename T,
    typename CancellationSlot = cancellation_slot>
struct associated_cancellation_slot
Types

Name

Description

type

If T has a nested type cancellation_slot_type, T::cancellation_slot_type. Otherwise CancellationSlot.

Member Functions

Name

Description

get [static]

If T has a nested type cancellation_slot_type, returns t.get_cancellation_slot(). Otherwise returns type().

If T has a nested type cancellation_slot_type, returns t.get_cancellation_slot(). Otherwise returns s.

A program may specialise this traits type if the T template parameter in the specialisation is a user-defined type. The template parameter CancellationSlot shall be a type meeting the CancellationSlot requirements.

Specialisations shall meet the following requirements, where t is a const reference to an object of type T, and s is an object of type CancellationSlot.

Requirements

Header: boost/asio/associated_cancellation_slot.hpp

Convenience header: boost/asio.hpp


PrevUpHomeNext