Guide110.4K views1,867 votes0 replies1,030 following
std::string_view by Value: The C++17 Read-Only String Parameter, and Where It Bites
Pass read-only string parameters as std::string_view by value: what the pointer-plus-length handle buys you, where NUL termination and lifetime break it, and how to check your build.