From the documentation:
A Twine is not intended for use directly and should not be stored, its implementation relies on the ability to store pointers to temporary stack objects which may be deallocated at the end of a statement. Twines should only be used accepted as const references in arguments, when an API wishes to accept possibly-concatenated strings.
rdar://84799118
I'd personally prefer avail_name.str() instead of explicit std::string() but that's just me.