Throw TypeError when subclasses forget to call __init__ (#2152)
- Fixes #2103
diff --git a/docs/advanced/classes.rst b/docs/advanced/classes.rst
index 0d50cba..b3da037 100644
--- a/docs/advanced/classes.rst
+++ b/docs/advanced/classes.rst
@@ -149,6 +149,11 @@
will generally leave the C++ instance in an invalid state and cause undefined
behavior if the C++ instance is subsequently used.
+.. versionadded:: 2.5.1
+
+ The default pybind11 metaclass will throw a ``TypeError`` when it detects
+ that ``__init__`` was not called by a derived class.
+
Here is an example:
.. code-block:: python