Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
mbrubeck
on Oct 22, 2017
|
parent
|
context
|
favorite
| on:
C++ Tips of the Week
Use string_view, but beware of use-after-free bugs like
https://github.com/isocpp/CppCoreGuidelines/issues/1038
inetknght
on Oct 22, 2017
[–]
Think 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.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: