3 ms·
std::shared_ptr<void> foo(nullptr, [&bar] (void*) { printf(":) %s\n", bar); }); the downside is having to write nullptr instead of just the closure. Something
by goalieca 6y ago
std::shared_ptr<void> foo(nullptr, [&bar] (void*) { printf(":) %s\n", bar); });
the downside is having to write nullptr instead of just the closure. Something like this really should be part of the standard.