pybind / pybind11

Seamless operability between C++11 and Python
https://pybind11.readthedocs.io/
Other
15.1k stars 2.05k forks source link

[smart_holder] Smart holder default delete #4924

Closed iwanders closed 8 months ago

iwanders commented 8 months ago

@rwgk , as requested in https://github.com/pybind/pybind11/pull/4921#issuecomment-1795497776

Ensures std::default_delete<T> is used to look up the deleter for a type instead of delete directly.

Description

The smart holder should use std::default_delete for looking up a deleter instead of assuming delete is the correct thing.

Suggested changelog entry:

rwgk commented 8 months ago

Thanks @iwanders! I'm just waiting for the GHA to finish before merging.

It's fine to leave the suggested changelog entry blank, because we don't have smart_holder releases.

iwanders commented 8 months ago

:+1: good to know, I cleared it from the description.