Fix implicit lambda capture of this in C++20
Implicit captures of this using [=] is deprecated in C++20. From the Book Nicolai Josuttis "The complete Guide for C++ 20" the correct new ways are: - [=] -> [=,this] //Capturing this by reference - [=,...] -> [=,this,...] //Capturing this by reference However, `[=,this]` is [not allowed in C++17](https://en.cppreference.com/w/cpp/language/lambda#:~:text=%5B%3D%2C%20this%5D%20%7B%7D%3B%20%20//%20until%20C%2B%2B20%3A%20Error%3A%20this%20when%20%3D%20is%20the%20default) so an alternative is to - explicitly capture all variables by value if possible - add a version check.
issue