Closed
Description
Suppose in test_stl_binders.cpp we have two types mapping back to the same underlying c++ type in this case "unsigned int".
py::bind_vector<std::vector<unsigned int>>(global, "VectorInt");
py::bind_vector<std::vector<unsigned int>>(global, "AnotherVectorInt");
When importing the module, the error generic_type: type "AnotherVectorInt" is already registered! arises.
Are we disallowing type alias within python. Can we not refer to the same vector type using multiple python types ?
If we choose to keep the current behaviour of disallowing multiple aliases for the same underlying type we should improve the error message to say "generic_type: type "AnotherVectorInt" has underlying type "unsigned int" that is already registered.
Metadata
Metadata
Assignees
Labels
No labels