template<typename Container>
MapAdapter class

Dict-like data structure by std::vector and Range.

Base classes

template<typename Container>
class MapAdapterBase<Container>
Dict-like data structure by std::vector and Range.

Public types

using key_type = size_t
using mapped_type = typename Container::value_type
using value_type = std::pair<key_type, mapped_type>
using Base = MapAdapterBase<Container>
using E = decltype(py::enumerate(Base::_lst))

Constructors, destructors, conversion operators

MapAdapter(Container& lst) explicit

Public functions

auto begin() const -> auto
auto end() const -> auto

Function documentation

template<typename Container>
MapAdapter<Container>::MapAdapter(Container& lst) explicit

Parameters
lst in The lst parameter is a reference to a container object.

The function constructs a new MapAdapter object with a given container and creates a mapview using py::enumerate.

template<typename Container>
auto MapAdapter<Container>::begin() const

Returns The begin() function is returning an iterator pointing to the beginning of the mapview container.

The function returns an iterator pointing to the beginning of the mapview.

template<typename Container>
auto MapAdapter<Container>::end() const

Returns The end iterator of the mapview.

The function returns an iterator pointing to the end of the mapview.