涉及C ++移动的术语

时间:2014-11-19 18:44:00

标签: c++ move

在此页面{&3;}中移动/&&"部分它指的是在以下上下文中引用的被调用者分配一词(引自该链接):

// 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

这个词是什么意思?

1 个答案:

答案 0 :(得分:5)

“Callee-allocated”,如被调用的函数分配,“out”表示返回的数据。这与“调用者分配”相反,调用者必须将分配的结构传递给函数。

相关问题