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 {
233
233
234
234
// load frequently used headers
235
235
const char * code =
236
+ " #include <algorithm>\n "
237
+ " #include <complex>\n "
236
238
" #include <iostream>\n "
237
239
" #include <string.h>\n " // for strcpy
238
240
" #include <string>\n "
@@ -1511,11 +1513,16 @@ Cppyy::TCppMethod_t Cppyy::GetMethodTemplate(
1511
1513
Cppyy::AppendTypesSlow (proto, arg_types);
1512
1514
Cppyy::AppendTypesSlow (explicit_params, templ_params);
1513
1515
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);
1519
1526
1520
1527
return cppmeth;
1521
1528
You can’t perform that action at this time.
0 commit comments