Is it safe to pass a temporary std::string to a function accepting std::string_view?
Is it safe to pass a temporary std::string to a function accepting std::string_view?
I hope you found a solution that worked for you :)
The Content is licensed under (https://meta.stackexchange.com/help/licensing) CC BY-SA.
Attention! This video does always use the same license as the source!
Thanks to all those great people for their contributions!
(stackoverflow.com/users/24678627/yan)Yan
(stackoverflow.com/users/992490/marshall-clow)Marshall Clow
A special thanks goes out to the (stackoverflow.com/questions/79315542/is-it-safe-to-pass-a-temporary-stdstring-to-a-function-accepting-stdstring-v)Stackexchange community
I wish you all a wonderful day! Stay safe :)
If anything is off, please write me at peter D.O.T schneider A.T ois42.de
string-view c++17 c++ lifetime