3 ms·
Use string_view, but beware of use-after-free bugs like https://github.com/isocpp/CppCoreGuidelines/issues/1038 https://github.com/isocpp/CppCoreGuidelines/issu
by mbrubeck 9y ago
Use string_view, but beware of use-after-free bugs like https://github.com/isocpp/CppCoreGuidelines/issues/1038 https://github.com/isocpp/CppCoreGuidelines/issues/1038
- inetknght 9y agoThink of string_view as a non-owning pointer to a known-size array. If the array is moved or destroyed, then string_view is left dangling... just like a pointer.