mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2026-06-15 08:26:16 +08:00
When ChaiScript wraps a script function in a C++ std::function whose parameter is a shared_ptr (e.g. const std::shared_ptr<T> &), the Build_Function_Caller_Helper boxed each argument with std::ref. That produced a Boxed_Value whose Any held a reference_wrapper<const shared_ptr<T>> with bare type info shared_ptr<T> instead of T, so dispatch to a C++ function expecting shared_ptr<T> failed. Detect shared_ptr parameter types in box() and store them by value instead, letting Boxed_Value's shared_ptr-aware overloads record the correct bare type and back the Any with a real shared_ptr. Co-authored-by: leftibot <leftibot@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| any.hpp | ||
| bad_boxed_cast.hpp | ||
| bind_first.hpp | ||
| bootstrap_stl.hpp | ||
| bootstrap.hpp | ||
| boxed_cast_helper.hpp | ||
| boxed_cast.hpp | ||
| boxed_number.hpp | ||
| boxed_value.hpp | ||
| callable_traits.hpp | ||
| dispatchkit.hpp | ||
| dynamic_object_detail.hpp | ||
| dynamic_object.hpp | ||
| exception_specification.hpp | ||
| function_call_detail.hpp | ||
| function_call.hpp | ||
| function_params.hpp | ||
| function_signature.hpp | ||
| handle_return.hpp | ||
| operators.hpp | ||
| proxy_constructors.hpp | ||
| proxy_functions_detail.hpp | ||
| proxy_functions.hpp | ||
| register_function.hpp | ||
| type_conversions.hpp | ||
| type_info.hpp | ||