Py2Cpp 1.6.3; VERSION ${PROJECT_VERSION}
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
dict.hpp File Reference

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

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

Go to the source code of this file.

Classes

struct  py::key_iterator< Iter >
 Iterator adapter for accessing keys in map-like containers. More...
 
class  py::dict< Key, T >
 Python-like dictionary implementation. More...
 

Namespaces

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

Functions

template<typename Key , typename T >
auto py::operator< (const Key &key, const dict< Key, T > &m) noexcept -> bool
 Check if a key is contained in a dictionary.
 
template<typename Key , typename T >
auto py::len (const dict< Key, T > &m) noexcept -> size_t
 Get the number of key-value pairs in a dictionary.
 

Detailed Description

Python-like dictionary implementation for C++.

Provides key_iterator and dict templates that extend std::unordered_map with Python-like convenience methods.