Questions about postblit and move semantics

Viewed 1022

I have already asked a similar question a while ago, but I'm still unclear on some details.

  1. Under what circumstances is the postblit constructor called?

  2. What are the semantics of moving an object? Will it be postblitted and/or destructed?

  3. What happens if I return a local variable by value? Will it implicitly be moved?

  4. How do I cast an expression to an rvalue? For example, how would a generic swap look like?

2 Answers
Related