You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
input_line_33:38:23: error: expected '(' for function-style cast or type construction
return unsigned int{};
~~~~~~~~ ^
Traceback (most recent call last):
File "/home/rembserj/example.py", line 5, in <module>
class MyMultiGenFCN( ROOT.Math.IMultiGenFunction ):
TypeError: no python-side overrides supported (failed to compile the dispatcher code)
Cling fails to compile the initialization in return unsigned int{}; since it is not valid C++. We should also consider unsigned int and other multi keyword types that require a function style cast for value initialization (like return (unsigned int){}. If I am not wrong, this should just work for all primitives(as zero initialization) and user-defined types(as default initialization).
I was able to get this example from the manual to work with this fix. Based on the issue, I was of the opinion we should land this upstream but I see that this is a high priority issue and @wlav is on vacation.
Description
One example from the ROOT manual doesn't work anymore with ROOT 6.32:
https://root.cern/manual/python/#alternative-for-tpymultigenfunction-and-tpymultigradfunction
The error is:
input_line_33:38:23: error: expected '(' for function-style cast or type construction return unsigned int{}; ~~~~~~~~ ^ Traceback (most recent call last): File "/home/rembserj/example.py", line 5, in <module> class MyMultiGenFCN( ROOT.Math.IMultiGenFunction ): TypeError: no python-side overrides supported (failed to compile the dispatcher code)
See:
The text was updated successfully, but these errors were encountered: