АР
Size: a a a
АР
AF
AF
AF
NP
std::string_view
вместо const std::string&
?struct Foo {
std::string str;
std::string_view get_str() const {
return str;
}
};
NP
NP
MK
m
std::string_view
вместо const std::string&
?struct Foo {
std::string str;
std::string_view get_str() const {
return str;
}
};
foo.set_str("foo");
const auto& s = foo.get_str();
foo.set_str("bar");
assert(s == "???");
ПК
std::string_view
вместо const std::string&
?struct Foo {
std::string str;
std::string_view get_str() const {
return str;
}
};
const char*
. Инвалидируется на каждый чихДГ
D
IC
D
AF
AF