Open taehyounpark opened 11 months ago
That code that doesn't compile is generated in CallFunc (ie. ROOT/meta, a portion of which lives in cppyy-backend, yes, hence this problem also shows up in cppyy master). CallFunc reconstructs the function name (incl. template parameters) from the decl, not from any parameters provided by cppyy. Probably the code generator should check if a method is variadic and then not add the explicit template parameters.
Still recommended to report this for the ROOT repo. I'll probably fix it on my end b/c it affects cppyy proper, but per CERN rules, the ROOT team can not accept patches to ROOT code from me, so they'll have to come up with their own fix.
Thank you for the quick reply and insight!
This is related to #192 which was displaying the issue inside a large library + older version of cppyy used by ROOT. I've managed to isolate the issue into a minimal example on the latest version of cppyy.
The issue seems to be stemming from the fact that cppyy cannot handle a function that is:
This (as far as I know) is valid C++ according to both GCC and Clang, including whatever is being used by the backend of cppyy. Here is the illustration of the issue:
Which fails with the message
Which (again, seems to me) has to do with cppyy explicitly providing the SFINAE template parameters somewhere in the process of passing the call down to its C++-binding.