Wouldn't this be very annoying to work with, because now you have to explicitly move or copy the string whenever you want to construct one of these objects?
It's kinda what Rust forces you to do, except that std::move is implied. Anything taken by value is equivalent to taking by && unless the type is explicitly marked as Copy (i.e. it can be trivially copied and the copies are implicit).
But yeah, in a c++ codebase, good modern practices are often verbose and clunky.
But yeah, in a c++ codebase, good modern practices are often verbose and clunky.