[Bug c++/117061] Error on use of parameter in lambda outside function body

2025-03-28 Thread eczbek.void at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117061 eczbek.void at gmail dot com changed: What|Removed |Added Resolution|--- |INVALID Statu

[Bug c++/117061] Error on use of parameter in lambda outside function body

2025-03-03 Thread eczbek.void at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117061 --- Comment #4 from eczbek.void at gmail dot com --- Constructors too :( ``` template struct S { S(int x) requires(requires { [x] { x; }; }) {} }; ``` ``` : In lambda function: :3:41: error: use of parameter outside function body before ';

[Bug c++/117061] Error on use of parameter in lambda outside function body

2025-01-19 Thread eczbek.void at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117061 --- Comment #3 from eczbek.void at gmail dot com --- Another test case: https://godbolt.org/z/98joW6saj ``` auto f = [x = 0] noexcept(noexcept(x)) { return x; }; ``` :1:36: error: 'x' was not declared in this scope 1 | auto f = [x = 0] noex

[Bug c++/117061] Error on use of parameter in lambda outside function body

2024-10-10 Thread eczbek.void at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117061 --- Comment #2 from eczbek.void at gmail dot com --- Clang errors on a similar-looking piece of code: ``` void foo(auto x) noexcept(noexcept([x] { x; })) {} ```

[Bug c++/117061] Error on use of parameter in lambda outside function body

2024-10-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117061 --- Comment #1 from Andrew Pinski --- Accepts: * clang * MSVC Rejects: * GCC * EDG