Compiling with clang in C++20 mode gives a "implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20"