When to Use
This lesson lists the various areas where std::string_view is recommended.
We'll cover the following...
- Optimization: you can carefully review your code and replace various string operations with
string_view
. In most cases, you should end up with faster code and fewer memory allocations. - As a possible replacement for const
std::string&
parameter -