Removing py::classu, because it does not seem useful enough.

parent 795b2bc9
......@@ -18,12 +18,4 @@ public:
using class_<type_, smart_holder, options...>::class_;
};
// Similar in idea to `py::classh`, but for `std::unique_ptr<U>` holder, to support
// an easier transition to `py::smart_holder` as default holder.
template <typename type_, typename... options>
class classu : public class_<type_, std::unique_ptr<type_>, options...> {
public:
using class_<type_, std::unique_ptr<type_>, options...>::class_;
};
PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)
......@@ -41,9 +41,6 @@ private:
} // namespace pybind11_tests
PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::class_sh_unique_ptr_member::pointee)
PYBIND11_SMART_POINTER_HOLDER_TYPE_CASTERS(
pybind11_tests::class_sh_unique_ptr_member::ptr_owner,
std::unique_ptr<pybind11_tests::class_sh_unique_ptr_member::ptr_owner>)
namespace pybind11_tests {
namespace class_sh_unique_ptr_member {
......@@ -53,8 +50,7 @@ TEST_SUBMODULE(class_sh_unique_ptr_member, m) {
m.def("make_unique_pointee", make_unique_pointee);
// Could also be class_, but can conveniently be used for testing classu.
py::classu<ptr_owner>(m, "ptr_owner")
py::class_<ptr_owner>(m, "ptr_owner")
.def(py::init<std::unique_ptr<pointee>>(), py::arg("ptr"))
.def("is_owner", &ptr_owner::is_owner)
.def("give_up_ownership_via_unique_ptr", &ptr_owner::give_up_ownership_via_unique_ptr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment