Does anyone know, why the following code does not raise a warning?
struct Foo
{
int a = 1;
};
struct Bar
{
Foo getString()
{
return Foo();
}
};
int main()
{
Bar a;
const Foo& b = a.getString(); <--- Foo getString() becomes Foo&?
}