btck::IndexedContainer

Satisfied when a container exposes a size accessor and an indexed element accessor.

Synopsis

Declared in <kernel/bitcoinkernel_wrapper.h>

template<
    typename Container,
    typename SizeFunc,
    typename GetFunc>
concept IndexedContainer = requires(const Container& c, SizeFunc size_func, GetFunc get_func, std::size_t i) {
    { std::invoke(size_func, c) } -> std::convertible_to<std::size_t>;
    { std::invoke(get_func, c, i) }; // Return type is deduced
};