Open mmoelle1 opened 2 years ago
This seems fixed already? It works for me now.
Anyway, I reproduced the problem on an older version. It seems a parser issue, and there is an easy workaround: just change return (... + Folder<F, decltype(args)>{foo, FWD(args)}).value_;
to return ((... + Folder<F, decltype(args)>{foo, FWD(args)})).value_;
.
I tried several version of xeus-cling (including 0.9 which is reported to work with C++17) on the following code (taken from https://quuxplusone.github.io/blog/2020/10/12/fold-a-function/):
Xeus-cling terminates with the following error message
Changing the above code to
seems to work. It seems to be a bug in the interpreter. Or isn't the original version valid C++ code?
Best regards, Matthias