Common
std::string
implementations don't allocate dynamically if the string is short enough ("SSO"). Since the shortness threshold depends on the implementation, you probably shouldn't rely on it.