Skip to content

Commit

Permalink
update Cpp::GetTemplatedMethods usage
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronj0 committed Apr 7, 2024
1 parent db09a91 commit 95e144a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions clingwrapper/src/clingwrapper.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,10 @@ std::string Cppyy::GetTemplatedMethodName(TCppScope_t scope, TCppIndex_t imeth)
{
std::vector<Cppyy::TCppMethod_t> mc;
Cpp::GetFunctionTemplatedDecls(scope, mc);
return GetMethodName(mc[imeth]);

if (imeth < mc.size()) return GetMethodName(mc[imeth]);

return "";
}

//
Expand Down Expand Up @@ -1491,7 +1494,7 @@ Cppyy::TCppMethod_t Cppyy::GetMethodTemplate(

else pureName = name;

std::vector<Cppyy::TCppMethod_t> unresolved_candidate_methods = Cpp::GetTemplatedMethods(pureName, scope, proto);
std::vector<Cppyy::TCppMethod_t> unresolved_candidate_methods = Cpp::GetTemplatedMethods(pureName, scope);

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

Expand Down

0 comments on commit 95e144a

Please sign in to comment.