folly::bind::capture

bind::capture() and bind::capture_indirect() work much like other folly::bind modifiers. However, since they're primarily intended for async_closure arguments, you will practically only use them: - alone, for non-co_cleanup arguments; - with bind::in_place() or bind::in_place_with(), for co_cleanup arguments; - with constant(), for either.

Synopsis

Declared in <folly/coro/safe/BindCaptures.h>

template<typename... Ts>
struct capture
    : folly::bind::ext::merge_update_args</* implementation-defined */, Ts...>

Description

capture_in_place<T>() is short for bind::capture(bind::in_place<T>()).

See Captures.md and folly/lang/Bindings.md.

Base Classes

NameDescription
folly::bind::ext::merge_update_args</* implementation-defined */, Ts...>Concatenates several like_args lists, mapping each bind_info_t through BindInfoFn.

Type Aliases

NameDescription
binding_list_t The concatenated binding list with each bind_info_t mapped by BindInfoFn.

Member Functions

NameDescription
unsafe_tuple_to_bind Move out the concatenated tuple of bound values.

Using Declarations

Name
Unnamed using

Deduction Guides

NameDescription
capture<folly::bind::ext::deduce_args_t<Ts>...> Deduction guide for capture from its bound arguments.