#include <iostream>

using namespace std;
class Foo
{
public:
  Foo() { cout << "cstr" << this << endl; }
  ~Foo() { cout << "dstr" << this << endl; }

};
Foo get()
{
  /*auto named = Foo();
  return named;*/
  return Foo();
}
int main() {

  //Foo& f = get();
  const Foo& f = get();
  cout << "after function call" << &f << endl;
  return 0;
}