When using D, JavaScript, Lua, PHP, R
Perhaps some better language specific uses of %namewarn/%keywordwarn
for keyword handling could instead be implemented??
Partial template specializations whose argument is a function type
(eg std::function<RET(ARGS...)>) were not matched: the primary template
was chosen instead.
In Source/CParse/templ.c, does_parm_match and resolve_partial_args now
handle function types by decomposing them with SwigType_pop_function
into a return type and a parameter list, recursing on the return type
and matching the argument list with full support for trailing parameter
packs (v.$N absorbing remaining concrete arguments as a parmlist).
The parmlist match/bind logic shared with the existing template-wrapper
case is factored out into two new helpers, match_partial_parmlists and
resolve_partial_arglists, and the template-wrapper branch is refactored
to use them.
Lib/std/std_function.i is updated to use the standard C++ forward
declaration of std::function, and adds %rename(call) for operator() so
target languages that cannot wrap operator() get a usable name.
Assisted-by: Claude Code (Opus 4.7)
Move std::function implementation out of Lib/typemaps directory noting
that there are no typemaps for the implementation.
Rename _SWIG_call_std_function to SWIG_call_std_function to be standards
compliant.
Remove redundant %rename in cpp11_std_function testcase.
Add java and python runtime tests based on javascript test for cpp11_std_function testcase.
Add some observations on specialization bug when using std::function.