diff --git a/clingwrapper/src/clingwrapper.cxx b/clingwrapper/src/clingwrapper.cxx index fd5b1ffa..9b466425 100644 --- a/clingwrapper/src/clingwrapper.cxx +++ b/clingwrapper/src/clingwrapper.cxx @@ -1431,7 +1431,10 @@ std::string Cppyy::GetTemplatedMethodName(TCppScope_t scope, TCppIndex_t imeth) { std::vector mc; Cpp::GetFunctionTemplatedDecls(scope, mc); - return GetMethodName(mc[imeth]); + + if (imeth < mc.size()) return GetMethodName(mc[imeth]); + + return ""; } // @@ -1491,7 +1494,7 @@ Cppyy::TCppMethod_t Cppyy::GetMethodTemplate( else pureName = name; - std::vector unresolved_candidate_methods = Cpp::GetTemplatedMethods(pureName, scope, proto); + std::vector unresolved_candidate_methods = Cpp::GetTemplatedMethods(pureName, scope); // take the vector of decls(unresolved candidates set), pass that along with type sets to Clang