UT
Size: a a a
UT
DB
AB
D
AB
D
AB
AB
UT
AB
AB
J
void foo(string str) { ... }
int main()
{
string test = "test";
foo(test);
}
void foo(const string& str) { ... }
int main()
{
string test = "test";
foo(test);
}
J
J
void foo(string str) { ... }
int main()
{
string test = "test";
foo(test);
}
void foo(const string& str) { ... }
int main()
{
string test = "test";
foo(test);
}
string foo()
{
string test = "test";
return test;
}
string& foo()
{
string test = "test";
return test;
}
AF
DP
string foo()
{
string test = "test";
return test;
}
string& foo()
{
string test = "test";
return test;
}
AB
string foo()
{
string test = "test";
return test;
}
string& foo()
{
string test = "test";
return test;
}
W
constexpr static std::string_view str="ABC";
getenv(reinterpret_cast<const char*>(str+'\0'));
// это не работает
Е
constexpr static std::string_view str="ABC";
getenv(reinterpret_cast<const char*>(str+'\0'));
// это не работает
string_view::data
вернет нулл-терминейтед в твоём кодеW
string_view::data
вернет нулл-терминейтед в твоём коде