Archive pour septembre 2019
The Hidden Dangers of std::function and lambdas
Posté par Olivier dans Trucs & Astuces le 30 septembre 2019
Once upon a time, there was an active object which had callbacks using std::function.On the same day, a user of this object registered a callback function which, in its core, cancelled the registration. That callback was a lambda that aside of that took some reference in the current context.And guess what happened ? Here is […]