File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,8 @@ class ApplicationStarter {
233233
234234 // load frequently used headers
235235 const char * code =
236+ " #include <algorithm>\n "
237+ " #include <complex>\n "
236238 " #include <iostream>\n "
237239 " #include <string.h>\n " // for strcpy
238240 " #include <string>\n "
@@ -1511,11 +1513,16 @@ Cppyy::TCppMethod_t Cppyy::GetMethodTemplate(
15111513 Cppyy::AppendTypesSlow (proto, arg_types);
15121514 Cppyy::AppendTypesSlow (explicit_params, templ_params);
15131515
1514- Cppyy::TCppMethod_t cppmeth = Cpp::BestTemplateFunctionMatch (unresolved_candidate_methods, templ_params, arg_types);
1515-
1516- if (!cppmeth){
1517- return nullptr ;
1518- }
1516+ Cppyy::TCppMethod_t cppmeth = nullptr ;
1517+
1518+ if (unresolved_candidate_methods.size () == 1 && !templ_params.empty ())
1519+ cppmeth =
1520+ Cpp::InstantiateTemplate (unresolved_candidate_methods[0 ],
1521+ templ_params.data (), templ_params.size ());
1522+
1523+ if (!cppmeth)
1524+ cppmeth = Cpp::BestOverloadFunctionMatch (unresolved_candidate_methods,
1525+ templ_params, arg_types);
15191526
15201527 return cppmeth;
15211528
You can’t perform that action at this time.
0 commit comments