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
..
any.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
bad_boxed_cast.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
bind_first.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
bootstrap_stl.hpp Fix #470: Expose find() for associative container types (#668) 2026-04-11 18:57:26 -06:00
bootstrap.hpp Enable warnings as errors (#694) 2026-04-28 20:11:15 -06:00
boxed_cast_helper.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
boxed_cast.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
boxed_number.hpp Enable warnings as errors (#694) 2026-04-28 20:11:15 -06:00
boxed_value.hpp Fix #17: Add const variables in ChaiScript (#643) 2026-04-10 22:12:13 -06:00
callable_traits.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
dispatchkit.hpp Enable warnings as errors (#694) 2026-04-28 20:11:15 -06:00
dynamic_object_detail.hpp Fix #690: Apply clang-format consistently with CI (#691) 2026-04-17 18:45:41 -06:00
dynamic_object.hpp Fix #690: Apply clang-format consistently with CI (#691) 2026-04-17 18:45:41 -06:00
exception_specification.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
function_call_detail.hpp Fix #493: Allow shared_ptr arguments through std::function callbacks 2026-04-28 20:33:53 -06:00
function_call.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
function_params.hpp Enable warnings as errors (#694) 2026-04-28 20:11:15 -06:00
function_signature.hpp Fix #690: Apply clang-format consistently with CI (#691) 2026-04-17 18:45:41 -06:00
handle_return.hpp Fix #690: Apply clang-format consistently with CI (#691) 2026-04-17 18:45:41 -06:00
operators.hpp Fix #601: Allow operator functions to accept any type with an add() method (#686) 2026-04-13 20:20:11 -06:00
proxy_constructors.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
proxy_functions_detail.hpp Enable warnings as errors (#694) 2026-04-28 20:11:15 -06:00
proxy_functions.hpp Enable warnings as errors (#694) 2026-04-28 20:11:15 -06:00
register_function.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
type_conversions.hpp Fix #374: Support nested vector type conversions (#692) 2026-04-18 12:57:20 -06:00
type_info.hpp Fix #17: Add const variables in ChaiScript (#643) 2026-04-10 22:12:13 -06:00