mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2026-07-31 00:37:02 +08:00
When both vector_type<T> and vector_conversion<T> are registered, the dispatch scoring treats all parameter mismatches equally. This causes the C++ push_back (for the converted type) to be selected over the built-in one when both have the same number of type differences. The converted function operates on a temporary copy of the vector, silently discarding the mutation. The fix deprioritizes overloads that require type conversion on the first parameter (the object/receiver), ensuring functions matching the receiver type exactly are always tried first. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| chaiscript | ||