Annotated[Any, CppTypePybind11("cpp_namespace::UserType")] based on a suggestion by @sizmailov

https://github.com/pybind/pybind11/pull/4888#issuecomment-1773618327
This commit is contained in:
Ralf W. Grosse-Kunstleve 2023-10-20 22:10:54 -07:00
parent ea00323beb
commit 272152e68b

View File

@ -494,7 +494,7 @@ protected:
std::string tname(t->name());
detail::clean_type_id(tname);
if (detail::cpp_name_needs_typing_annotated(tname.c_str())) {
signature += "Annotated[Any, \"" + tname + "\"]";
signature += "Annotated[Any, CppTypePybind11(\"" + tname + "\")]";
} else {
signature += tname;
}