test_operator_overloading.py
3.26 KB
-
Access C++ hash functions from Python and vice versa (#1034) · 37de2da9
There are two separate additions: 1. `py::hash(obj)` is equivalent to the Python `hash(obj)`. 2. `.def(hash(py::self))` registers the hash function defined by `std::hash<T>` as the Python hash function.
Bruce Merry committed