Y
Hacker News
new
|
ask
|
show
|
jobs
by
MauranKilom
1647 days ago
It's possible to write something like `std::unique_function` (which uniquely owns the stored callable and can be moved but not copied). That's often preferable for storing functors.
Example:
https://github.com/facebook/folly/blob/main/folly/docs/Funct...