Reputation: 65
On this page http://herbsutter.com/elements-of-modern-c-style/ in the "Move / &&" section it refers to the term callee-allocated out in the following context (quoted from that link):
// C++11: move
vector<int> make_big_vector(); // usually sufficient for 'callee-allocated out' situations
:::
auto result = make_big_vector(); // guaranteed not to copy the vector
What does that term mean?
Upvotes: 3
Views: 87
Reputation: 2234
"Callee-allocated" as in allocated by the function being called, "out" meaning data being returned. This is as opposed to "caller-allocated" where the caller would have to pass the allocated structure into the function.
Upvotes: 5