This is a bug in clang's diagnosis. The use of curly braces in your last two cases does not 'fix' the dangling pointer issue.
By way of 'confirmation', the Code Analysis tool (static analyser) in Visual Studio/MSVC gives the following warnings for all fivesvX
variables:
warning C26449: gsl::span or std::string_view created from a temporary will be invalid when the temporary is invalidated (gsl.view).warning C26815: The pointer is dangling because it points at a temporary instance which was destroyed.