folly::bind

READ ME: The docs for this library are in Bind.md.

Namespaces

NameDescription
ext Implements standard storage semantics for folly::bind. This is used (with some additional constraints & tweaks) by async_closure captures. It can also be used for other single-use data structurs -- this makes it easy to simultaneously define the types for, and construct, tuples, named tuples, structs, etc. Some examples of this are given in Bind.md.

Types

NameDescription
args The primitive for representing lists of bound args.
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.
capture_const_ref Sugar for capture{const_ref{...}}, capturing a const reference.
capture_indirect Binds an async-closure capture whose pointer-like value is dereferenced once to expose the underlying object.
capture_mut_ref Sugar for capture{mut_ref{...}}, capturing a mutable reference.
const_ref Binding modifier that binds a const reference to each argument.
constant Binding modifier that makes each argument const.
copy Binding modifier that passes its arguments as decay-copied prvalues.
id_type The "identifier tag -> storage type" signature for a named binding.
move Binding modifier that passes its arguments as rvalue references.
mut Binding modifier that keeps each argument mutable.
mut_ref Binding modifier that binds a mutable reference to each argument.
self_id_type The self-reference "identifier tag -> storage type" binding signature.

Functions

NameDescription
capture_in_place Bind an in-place-constructed capture of type T.
capture_in_place_with Bind an in-place-constructed capture built by a factory function.
in_place Binds in-place construction of T from the given arguments.
in_place_with Binds in-place construction via a maker callable plus the given arguments.
operator""_id User-defined literal building a bind::id<Str> from "x"_id.

Variables

NameDescription
id The identifier for the compile-time string Str; also spelled "x"_id.
self_id A special identifier tag that works just like "x"_id.