|
|
|
|
|
by aw1621107
33 days ago
|
|
> But it's not actually taken as a reference (with &) anywhere I see... That is effectively what is happening internally. A string_view is morally a pointer/length pair; that pointer has to be initialized somehow. > and even if it's just internally referencing the (static) string It's not. The function call constructs a temporary std::string from the string literal, but once that is done the contents of the temporary are entirely independent from the string literal. |
|