void f(int count, ...){
//whatever
}
struct somestruct{
size_t a, b, c;
};
int main() {
somestruct s;
f(1, s); //what is actually passed?
}
整个struct
复制并在堆栈上传递?如果是这样,是否调用了复制构造函数?指针是否通过?这安全吗?
void f(int count, ...){
//whatever
}
struct somestruct{
size_t a, b, c;
};
int main() {
somestruct s;
f(1, s); //what is actually passed?
}
整个struct
复制并在堆栈上传递?如果是这样,是否调用了复制构造函数?指针是否通过?这安全吗?