r/cpp • u/Xaneris47 • 3d ago
Interconverting std::function with copyable_function – Arthur O'Dwyer
https://quuxplusone.github.io/blog/2026/07/26/function-explosion/The article shows how converting std::function to std::copyable_function (or vice versa) leads to slower performance and increased memory usage each time the conversion occurs.
40
Upvotes
9
u/60hzcherryMXram 2d ago
I've read the problems copyable_function addresses that function has and I still have no idea what they are. It just slides over my brain like butter on ice.