There are also less than ideal diagnostics for -> (and I assume, some other operators that cannot be folded over).
Presumably, this happens because (args <=> ...) is not parsed as a fold-expression at all, so you get some syntax error. It may be better to parse it as a fold-expression but immediately reject it with an error such as
For this code, clang outputs (https://godbolt.org/z/xozTW66rY):
There are also less than ideal diagnostics for
->
(and I assume, some other operators that cannot be folded over).Presumably, this happens because
(args <=> ...)
is not parsed as a fold-expression at all, so you get some syntax error. It may be better to parse it as a fold-expression but immediately reject it with an error such as