enum_: move most functionality to a non-template implementation
This commit addresses an inefficiency in how enums are created in
pybind11. Most of the enum_<> implementation is completely generic --
however, being a template class, it ended up instantiating vast amounts
of essentially identical code in larger projects with many enums.
This commit introduces a generic non-templated helper class that is
compatible with any kind of enumeration. enum_ then becomes a thin
wrapper around this new class.
The new enum_<> API is designed to be 100% compatible with the old one.
diff --git a/docs/changelog.rst b/docs/changelog.rst
index 9162048..eb25578 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -22,6 +22,11 @@
* Added support for write only properties.
`#1144 <https://github.com/pybind/pybind11/pull/1144>`_.
+* Python type wrappers (``py::handle``, ``py::object``, etc.)
+ now support map Python's number protocol onto C++ arithmetic
+ operators such as ``operator+``, ``operator/=``, etc.
+ `#1511 <https://github.com/pybind/pybind11/pull/1511>`_.
+
* A number of improvements related to enumerations:
1. The ``enum_`` implementation was rewritten from scratch to reduce