Skip to content

nullptr as default argument #124

@JohanMabille

Description

@JohanMabille

Not sure this is an issue, but I didn't find in the doc how to specify a nullptr default argument for a function. The following code will throw an exception when importing the module in Python:

module.def("my_function", &my_function, py::arg("ptr1"), py::arg("ptr2") = nullptr);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions