[Bug c++/105222] gcc rejects valid syntax of ternary operator for lambda in requires clause
hewillk at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Apr 11 14:46:22 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105222
--- Comment #3 from 康桓瑋 <hewillk at gmail dot com> ---
(In reply to 康桓瑋 from comment #2)
> And gcc accepts the following invalid syntax:
>
> int main() {
> auto b = requires { true ? [] : [] {}; };
> }
>
> https://godbolt.org/z/xeE1oYs1Y
It seems like the single [] makes gcc totally broken.
int main() {
auto b = requires { true ? [] : []!-!-[]?[]; };
}
https://godbolt.org/z/EPTE6zf5E
More information about the Gcc-bugs
mailing list