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.
Declared in <folly/coro/safe/BindCaptures.h>
template<typename... Ts>
struct capture
: folly::bind::ext::merge_update_args</* implementation-defined */, Ts...>
capture_in_place<T>() is short for bind::capture(bind::in_place<T>()).
See Captures.md and folly/lang/Bindings.md.
| Name | Description |
|---|---|
folly::bind::ext::merge_update_args</* implementation-defined */, Ts...> | Concatenates several like_args lists, mapping each bind_info_t through BindInfoFn. |
| Name | Description |
|---|---|
binding_list_t | The concatenated binding list with each bind_info_t mapped by BindInfoFn. |
| Name | Description |
|---|---|
unsafe_tuple_to_bind | Move out the concatenated tuple of bound values. |
| Name |
|---|
Unnamed using |
| Name | Description |
|---|---|
capture<folly::bind::ext::deduce_args_t<Ts>...> | Deduction guide for capture from its bound arguments. |