Adding pybind11::cast overload for rvalue references (#1260)

* Adding pybind11::cast overload for rvalue references
diff --git a/tests/test_smart_ptr.cpp b/tests/test_smart_ptr.cpp
index 87c9be8..6f8f382 100644
--- a/tests/test_smart_ptr.cpp
+++ b/tests/test_smart_ptr.cpp
@@ -291,7 +291,8 @@
         ~C() { print_destroyed(this); }
     };
     py::class_<C, custom_unique_ptr<C>>(m, "TypeWithMoveOnlyHolder")
-        .def_static("make", []() { return custom_unique_ptr<C>(new C); });
+        .def_static("make", []() { return custom_unique_ptr<C>(new C); })
+        .def_static("make_as_object", []() { return py::cast(custom_unique_ptr<C>(new C)); });
 
     // test_holder_with_addressof_operator
     struct TypeForHolderWithAddressOf {