MAKE_RANGE_METHOD

Defines a range accessor method method_name over the given size and get functions.

Synopsis

Declared in <kernel/bitcoinkernel_wrapper.h>

#define MAKE_RANGE_METHOD(method_name, ContainerType, SizeFunc, GetFunc, container_expr)

Description

Emits an lvalue-only overload returning a Range and deletes the rvalue overload so the range never dangles past a temporary.

Parameters

NameDescription
method_nameThe name of the accessor method to generate.
ContainerTypeThe container type the range iterates over.
SizeFuncThe member function pointer returning the element count.
GetFuncThe member function pointer returning an element by index.
container_exprThe expression yielding the container instance to view.