Suppose I have a C function
typedef void (* callback_t)(void* data);
register_callback(callback_t callback, void* data);
and I want to pass a lambda as the callback.
What's the idiomatic way to do this...
- When the lambda captures nothing?
- When the lambda has captures (by value, by reference etc.)?
Aucun commentaire:
Enregistrer un commentaire