crossbario / autobahn-cpp

WAMP for C++ in Boost/Asio
https://crossbar.io/autobahn
Boost Software License 1.0
251 stars 104 forks source link

Fix warning re: implicit `this` lambda capture in C++20 #205

Closed robinlinden closed 4 years ago

robinlinden commented 4 years ago

This fixes the warning in C++20, and remains warning-free on older C++-versions by explicitly specifying all lambda captures. If you were only targeting C++20, you could use [=, this], but that's a warning in older versions. 😢

warning: implicit capture of 'this' via '[=]' is deprecated in C++20 [-Wdeprecated]

oberstet commented 4 years ago

hey there and welcome=) and thanks for contributing! awesome.

rgd C++20-only: in general, I would support that - moving to latest std revision very quickly. however, as that might have implications for users, and since we currently announce https://github.com/crossbario/autobahn-cpp/blob/master/README.md ABC++ to be compatible with C++11 or higher, I'll file that as a separate issue ..

robinlinden commented 4 years ago

Thank you for having a look at the PR so quickly, and thank you for providing such a great library! :)