if I have a function:
Foo& Bar()
{
return /// do something to create a non-temp Foo here and return a reference to it
}
why is this:
The type deduction for auto works exactly the same as for templates:
auto you will get a value type.auto& you wil get a non-const reference typeconst auto& you will get a const referenceauto&& you will get