I think that comment “/// ooops?” is not necessary in example:
#include <iostream>
using namespace std;
int main() {
std::string s = "Hello World";
std::cout << s.size() << '\n';
std::string_view sv = s;
auto sv2 = sv.substr(0, 5);
std::cout << sv2.data() << '\n'; /// ooops?
}
because it’s valid example.
P.S. it’s my fist topic I am not sure that I have done everything correctly