"git@developer.sourcefind.cn:gaoqiong/pybind11.git" did not exist on "a859dd67a29372e478ad862d8d2979930471532e"
Commit 2f79cd94 authored by Ralf W. Grosse-Kunstleve's avatar Ralf W. Grosse-Kunstleve
Browse files

Adding return_value_policy::move to permissible policies for unique_ptr...

Adding return_value_policy::move to permissible policies for unique_ptr returns. New stats for all tests combined: 3 failed, 467 passed.
parent 64e6a807
...@@ -1572,7 +1572,8 @@ struct smart_holder_type_caster<std::unique_ptr<T, D>> : smart_holder_type_caste ...@@ -1572,7 +1572,8 @@ struct smart_holder_type_caster<std::unique_ptr<T, D>> : smart_holder_type_caste
static handle cast(std::unique_ptr<T, D> &&src, return_value_policy policy, handle parent) { static handle cast(std::unique_ptr<T, D> &&src, return_value_policy policy, handle parent) {
if (policy != return_value_policy::automatic if (policy != return_value_policy::automatic
&& policy != return_value_policy::reference_internal) { && policy != return_value_policy::reference_internal
&& policy != return_value_policy::move) {
// IMPROVABLE: Error message. // IMPROVABLE: Error message.
throw cast_error("Invalid return_value_policy for unique_ptr."); throw cast_error("Invalid return_value_policy for 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