Py2Cpp 1.6.7
Loading...
Searching...
No Matches
enumerate.hpp File Reference

Python-like enumerate implementation for C++. More...

#include <cstddef>
#include <iterator>
#include <utility>
Include dependency graph for enumerate.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  py::detail::EnumerateIterator< T >
 Iterator for enumerated access to container elements. More...
struct  py::detail::EnumerateIterableWrapper< T >
 Wrapper for making containers enumerable. More...

Namespaces

namespace  py
 Python-like utilities and data structures for C++.
namespace  py::detail

Functions

template<typename T>
auto py::enumerate (T &iterable) -> detail::EnumerateIterableWrapper< T >
 Create an enumerable wrapper for a container.
template<typename T>
auto py::enumerate (const T &iterable) -> detail::EnumerateIterableWrapper< const T >
 Create an enumerable wrapper for a const container.
template<typename T>
auto py::const_enumerate (const T &iterable) -> detail::EnumerateIterableWrapper< const T >
 (deprecated) Create an enumerable wrapper for a const container

Detailed Description

Python-like enumerate implementation for C++.

Provides EnumerateIterator, EnumerateIterableWrapper, and enumerate() function templates that mimic Python's enumerate() for indexed iteration.