leftibot 9db4a88b99 Fix #493: Allow shared_ptr arguments through std::function callbacks
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: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 20:33:53 -06:00
..
chaiscript Fix #493: Allow shared_ptr arguments through std::function callbacks 2026-04-28 20:33:53 -06:00