Код: Выделить всё
// `y` can refer to data managed by `x`.
void foo(std::string& x, std::string_view y) {
x.assign(y);
}
Подробнее здесь: https://stackoverflow.com/questions/792 ... ternal-buf
Код: Выделить всё
// `y` can refer to data managed by `x`.
void foo(std::string& x, std::string_view y) {
x.assign(y);
}