leftibot 726169acc8
Fix #398: Allow overriding [] operator with string index on Dynamic_Object subtypes (#667)
The built-in Dynamic_Object::get_attr was always winning dispatch over
user-defined [] overrides when a string index was used, because its C++
type signature (Dynamic_Object, const string&) scored numdiffs=0 while
ChaiScript-defined functions had higher numdiffs due to undefined type
info. The fix deprioritizes generic C++ Dynamic_Object functions when the
actual first argument is a specific subtype, and maps named ChaiScript
type parameters to Dynamic_Object type_info for correct dispatch scoring.

Co-authored-by: leftibot <leftibot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 18:59:09 -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 Fix #571: How to redirect "cout" and "print" to a microsoft Windows 10 window? (#657) 2026-04-11 18:58:09 -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 change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02: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 Fix #625: function_less_than comparator violates strict-weak ordering (#654) 2026-04-11 16:42:40 -06:00
dynamic_object_detail.hpp Fix #398: Allow overriding [] operator with string index on Dynamic_Object subtypes (#667) 2026-04-11 18:59:09 -06:00
dynamic_object.hpp Fix #201: Suggestion: class Inheritance (#641) 2026-04-10 19:12:06 -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 change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02: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 change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
function_signature.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
handle_return.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
operators.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02: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 change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
proxy_functions.hpp Fix #398: Allow overriding [] operator with string index on Dynamic_Object subtypes (#667) 2026-04-11 18:59:09 -06:00
register_function.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
short_alloc.hpp change .clang-format and reformat code with clang-format 11 2021-05-24 10:44:15 +02:00
type_conversions.hpp Reimplement pair_conversion() helper 2021-06-18 16:40:38 +02:00
type_info.hpp Fix #17: Add const variables in ChaiScript (#643) 2026-04-10 22:12:13 -06:00