http://definedbehavior.blogspot.tw/2011/08/value-semantics-copy-elision.html
注意其中一段話 :
The compiler will elide copies when returning from a function
and when calling a function that takes the argument by value
還有就是 :
type f() {
return type();
}
type g( type arg ) {
return arg;
}
int main() {
type x = g( f() );
}
compiler 沒有做 copy elision
全站熱搜
留言列表