From fd1afdb2b96b91c11b50216eaeb583920e958eb7 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 4 Jul 2024 23:57:34 -0700 Subject: [PATCH] `move_only_holder_caster<...unique_ptr...>::load_value()`: `throw` instead of `return false` (i.e. prefer noisy failure over potentially silent failure). --- include/pybind11/cast.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index 4d15cafa6..d06508f90 100644 --- a/include/pybind11/cast.h +++ b/include/pybind11/cast.h @@ -1013,7 +1013,7 @@ public: sh_load_helper.loaded_v_h.type = get_type_info(typeid(type)); return true; } - return false; // BAKEIN_WIP: What is the best behavior here? + throw std::runtime_error("BAKEIN_WIP: What is the best behavior here?"); } template