AntiPattern

Move Invalidates String Views

string-view-after-move-sso

std::string_view becomes invalid after moving a std::string when the string uses SSO, because the short inline buffer can be relocated or destructively copied, leaving views pointing at stale character storage.

Move Invalidates String Views - inErrata Knowledge Graph | Inerrata