@@ -86,13 +86,13 @@ TEST_SUBMODULE(stl_binders, m) {
86
86
87
87
// test_noncopyable_containers
88
88
py::bind_vector<std::vector<E_nc>>(m, " VectorENC" );
89
- m.def (" get_vnc" , &one_to_n<std::vector<E_nc>>, py::return_value_policy::reference );
89
+ m.def (" get_vnc" , &one_to_n<std::vector<E_nc>>);
90
90
py::bind_vector<std::deque<E_nc>>(m, " DequeENC" );
91
- m.def (" get_dnc" , &one_to_n<std::deque<E_nc>>, py::return_value_policy::reference );
91
+ m.def (" get_dnc" , &one_to_n<std::deque<E_nc>>);
92
92
py::bind_map<std::map<int , E_nc>>(m, " MapENC" );
93
- m.def (" get_mnc" , ×_ten<std::map<int , E_nc>>, py::return_value_policy::reference );
93
+ m.def (" get_mnc" , ×_ten<std::map<int , E_nc>>);
94
94
py::bind_map<std::unordered_map<int , E_nc>>(m, " UmapENC" );
95
- m.def (" get_umnc" , ×_ten<std::unordered_map<int , E_nc>>, py::return_value_policy::reference );
95
+ m.def (" get_umnc" , ×_ten<std::unordered_map<int , E_nc>>);
96
96
// Issue #1885: binding nested std::map<X, Container<E>> with E non-copyable
97
97
py::bind_map<std::map<int , std::vector<E_nc>>>(m, " MapVecENC" );
98
98
m.def (" get_nvnc" , [](int n)
@@ -102,11 +102,11 @@ TEST_SUBMODULE(stl_binders, m) {
102
102
for (int j = 1 ; j <= n; j++)
103
103
(*m)[i].emplace_back (j);
104
104
return m;
105
- }, py::return_value_policy::reference );
105
+ });
106
106
py::bind_map<std::map<int , std::map<int , E_nc>>>(m, " MapMapENC" );
107
- m.def (" get_nmnc" , ×_hundred<std::map<int , std::map<int , E_nc>>>, py::return_value_policy::reference );
107
+ m.def (" get_nmnc" , ×_hundred<std::map<int , std::map<int , E_nc>>>);
108
108
py::bind_map<std::unordered_map<int , std::unordered_map<int , E_nc>>>(m, " UmapUmapENC" );
109
- m.def (" get_numnc" , ×_hundred<std::unordered_map<int , std::unordered_map<int , E_nc>>>, py::return_value_policy::reference );
109
+ m.def (" get_numnc" , ×_hundred<std::unordered_map<int , std::unordered_map<int , E_nc>>>);
110
110
111
111
// test_vector_buffer
112
112
py::bind_vector<std::vector<unsigned char >>(m, " VectorUChar" , py::buffer_protocol ());
0 commit comments