mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-08 18:01:54 +00:00
Using a `union` is complicated: https://en.cppreference.com/w/cpp/language/union > If members of a union are classes with user-defined constructors and destructors, to switch the active member, explicit destructor and placement new are generally needed: Using `std::variant` increases compile-time overhead. It is currently unclear how much these effects matter in practice: optimization left for later. |
||
---|---|---|
.. | ||
pybind11 |