BTW. About r-values:
void fun(S s)
{
fun2(s); //pass s by value.
}
Now, compiler inserts postblit call before func2 call and dtor
before end of fun. However, it is able to doesn't it, because
after fun2 call, s isn't used.
Thus, we can implement last postblit optimization:
If compiler want to insert postblit, and object is't used after
this postblit, compiler is able to doesn't generate postblit and
last dtor calls.
Is there limitation of this optimization?
It may 90 percent to solve a r-value ref task.