4 ms·
Nobody in their right mind will use `shared_ptr` in this context. It will be `string_view` in and out with lifetime management left as an exercise to the progra
by boris 6y ago
Nobody in their right mind will use `shared_ptr` in this context. It will be `string_view` in and out with lifetime management left as an exercise to the programmer.
- steveklabnik 6y agoI read your parent as saying "assume we start from needing this to be checked," and then saying that this is the best that can be done. You're absolutely 1000% right that nobody would write that ever and would use string_view and not have it statically checked.
- vlovich123 6y agoThat’s exactly it. Just showing how trying to get the same safety guarantee in c++ is an either or between performance and safety.