I ran into a compiler bug when submitting with the `C++23 (GCC 14-64, msys2)` option on Codeforces.↵
↵
- [Accepted submission](https://codeforces.me/contest/1628/submission/398239845)↵
- [Compilation error](https://codeforces.me/contest/1628/submission/398240402)↵
↵
The compilation error occurs in a recursive lambda inside a member function. In `[&](this auto&& dfs, ...)`, `dfs` refers to the lambda itself, while `this` inside the lambda body refers to the enclosing object. Both `info[u]` and `this->pull(u)` are valid C++23. The affected GCC version mishandles the `this` capture and rejects both expressions. This is a known [GCC bug (PR 113563)](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113563).↵
↵
If you want to use this style on Codeforces, my accepted submission shows a small workaround. Capture the pointer explicitly as `[&, t = this]`, then write `t->info[u]` and `t->pull(u)`. I hope Codeforces can update the C++23 compiler to a version that includes the fix soon.
↵
- [Accepted submission](https://codeforces.me/contest/1628/submission/398239845)↵
- [Compilation error](https://codeforces.me/contest/1628/submission/398240402)↵
↵
The compilation error occurs in a recursive lambda inside a member function. In `[&](this auto&& dfs, ...)`, `dfs` refers to the lambda itself, while `this` inside the lambda body refers to the enclosing object. Both `info[u]` and `this->pull(u)` are valid C++23. The affected GCC version mishandles the `this` capture and rejects both expressions. This is a known [GCC bug (PR 113563)](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113563).↵
↵
If you want to use this style on Codeforces, my accepted submission shows a small workaround. Capture the pointer explicitly as `[&, t = this]`, then write `t->info[u]` and `t->pull(u)`. I hope Codeforces can update the C++23 compiler to a version that includes the fix soon.



