std::string_view:零拷贝字符串视图与生命周期 | C++
本章覆盖:`std::string_view`;non-owning view;pointer + length 高层模型;cheap copy;function parameter;substring view;no ownership;dangling string_view;temporary string;null termination 不保证;性能优化必须建立在生命周期正确性上。
本章知识点
std::string_view- non-owning view
- pointer + length 高层模型
- cheap copy
- function parameter
- substring view
- no ownership
- dangling string_view
- temporary string
- null termination 不保证
- 性能优化必须建立在生命周期正确性上