r/cpp • • May 20 '26

C++26: More function wrappers

https://www.sandordargo.com/blog/2026/05/20/cpp26-copyable-function
118 Upvotes

37 comments sorted by

View all comments

Show parent comment

2

u/mt-wizard May 20 '26

A function is a reference to some code, it has to be a reference type. std::function is a wrapper for a bunch of data + code, but primarily it's the code, so I would call it a (crappy) reference type