The move constructor T(T &&o) and the move assignment operator T &operator=(T &&o) build or assign from an rvalue by taking o’s resources rather than copying them. Afterwards o is a moved-from object: it must still be valid, which means it can be destroyed and assigned a new value, but its value is unspecified unless its class documents it.
a into c and then empties a, so that exactly one object owns the block. Nothing is allocated, and the cost does not depend on the length of the text.