mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
Add test for mixing STL casters and local binders across modules
One module uses a generic vector caster from `<pybind11/stl.h>` while the other exports `std::vector<int>` with a local `py:bind_vector`.
This commit is contained in:
@@ -21,6 +21,14 @@ using MixedLocalGlobal = LocalBase<4>;
|
||||
/// Mixed: global first, then local (which fails)
|
||||
using MixedGlobalLocal = LocalBase<5>;
|
||||
|
||||
using LocalVec = std::vector<LocalType>;
|
||||
using LocalVec2 = std::vector<NonLocal2>;
|
||||
using LocalMap = std::unordered_map<std::string, LocalType>;
|
||||
using NonLocalVec = std::vector<NonLocalType>;
|
||||
using NonLocalVec2 = std::vector<NonLocal2>;
|
||||
using NonLocalMap = std::unordered_map<std::string, NonLocalType>;
|
||||
using NonLocalMap2 = std::unordered_map<std::string, uint8_t>;
|
||||
|
||||
// Simple bindings (used with the above):
|
||||
template <typename T, int Adjust, typename... Args>
|
||||
py::class_<T> bind_local(Args && ...args) {
|
||||
|
||||
Reference in New Issue
Block a user