Skip to content

Commit c7289a5

Browse files
committed
update Cpp::GetTemplatedMethods usage
1 parent b998d5b commit c7289a5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

clingwrapper/src/clingwrapper.cxx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,10 @@ std::string Cppyy::GetTemplatedMethodName(TCppScope_t scope, TCppIndex_t imeth)
14311431
{
14321432
std::vector<Cppyy::TCppMethod_t> mc;
14331433
Cpp::GetFunctionTemplatedDecls(scope, mc);
1434-
return GetMethodName(mc[imeth]);
1434+
1435+
if (imeth < mc.size()) return GetMethodName(mc[imeth]);
1436+
1437+
return "";
14351438
}
14361439

14371440
//
@@ -1491,7 +1494,7 @@ Cppyy::TCppMethod_t Cppyy::GetMethodTemplate(
14911494

14921495
else pureName = name;
14931496

1494-
std::vector<Cppyy::TCppMethod_t> unresolved_candidate_methods = Cpp::GetTemplatedMethods(pureName, scope, proto);
1497+
std::vector<Cppyy::TCppMethod_t> unresolved_candidate_methods = Cpp::GetTemplatedMethods(pureName, scope);
14951498

14961499
// take the vector of decls(unresolved candidates set), pass that along with type sets to Clang
14971500

0 commit comments

Comments
 (0)