mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 08:03:55 +00:00
Added handle_type_name
This commit is contained in:
parent
ce5e7be7f8
commit
4f54b374fb
@ -330,6 +330,14 @@ TEST_SUBMODULE(kwargs_and_defaults, m) {
|
||||
class KWArgsSubclass : public py::kwargs {
|
||||
using py::kwargs::kwargs;
|
||||
};
|
||||
template <>
|
||||
struct handle_type_name<ArgsSubclass> {
|
||||
static constexpr auto name = const_name("*args");
|
||||
};
|
||||
template <>
|
||||
struct handle_type_name<KWArgsSubclass> {
|
||||
static constexpr auto name = const_name("**kwargs");
|
||||
};
|
||||
m.def("args_kwargs_subclass_function",
|
||||
[](const ArgsSubclass &args, const KWArgsSubclass &kwargs) {
|
||||
return py::make_tuple(args, kwargs);
|
||||
|
Loading…
Reference in New Issue
Block a user