class foo
{
string bar()
{
const string c = "dead beef";
return c;
}
void Test()
{
string a = bar();
string b = bar();
}
}
are a
and b
different instance or are they pointing to the same memory address? (the == comparison would return true regardless they are the same instance or not so I can't really test it)