Actually, the key thing to remember here is that named variables aren't implicitly moved - so while it looks like a typical move construction case, the compiler won't automatically move x into FooResult unless std::move(x)
is explicitly used. Otherwise, we fall back to copy semantics if a copy constructor exists.