Skip to content

Commit

Permalink
Do not insert empty proto as it adds extra comma
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-panda committed Jan 30, 2024
1 parent 606817f commit 4a96e25
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions clingwrapper/src/clingwrapper.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1499,10 +1499,12 @@ Cppyy::TCppMethod_t Cppyy::GetMethodTemplate(
full_name += "::" + name;
// Check if the instantiation was explicit. That means we already include
// `proto` in `name`.
if (full_name[full_name.size() - 1] == '>')
full_name.insert(full_name.size() - 1, "," + proto);
else
if (full_name[full_name.size() - 1] == '>') {
if (!proto.empty())
full_name.insert(full_name.size() - 1, "," + proto);
} else {
full_name += '<' + proto + '>';
}
return InterOp::InstantiateTemplateFunctionFromString(full_name.c_str());

// // There is currently no clean way of extracting a templated method out of ROOT/meta
Expand Down

0 comments on commit 4a96e25

Please sign in to comment.