template<class Base = Storable>
class StorableHelper< Base >
"Trampoline" for Storable to let it be used as a base class in Python.
Subclasses of Storable that are wrapped in pybind11 should have a similar helper that subclasses StorableHelper<subclass>. This helper can be skipped if the subclass neither adds any virtual methods nor implements any abstract methods.
- Template Parameters
-
| Base | the exact (most specific) class being wrapped |
- See also
- pybind11 documentation
Definition at line 54 of file python.h.
template<class Base = Storable>
template<typename... Args>
Delegating constructor for wrapped class.
While we would like to simply inherit base class constructors, when doing so, we cannot change their access specifiers. One consequence is that it's not possible to use inheritance to expose a protected constructor to python. The alternative, used here, is to create a new public constructor that delegates to the base class public or protected constructor with the same signature.
- Template Parameters
-
| Args | Variadic type specification |
- Parameters
-
| ...args | Arguments to forward to the Base class constructor. |
Definition at line 193 of file python.h.