A code like this is often seen in r-value references articles:
Dave Abrams: Move It With Rvalue References
void g(X);
void f()
{
X b;
g(b);
(...) assuming a generic case the compiler does not know anything about how is move, copy or destruct implemented for the X class?
No, compilers are not allowed to do optimisations based on faith.
For clarity, this question is unrelated to copy elision: compilers may be allowed to elide a copy, but they cannot change copies to moves willy-nilly.