#include <iostream>

struct Bar {
  Bar() {
    std::cout << "bar" << this<< std::endl;
  }

  ~Bar() {
    std::cout << "~bar" << this<<std::endl;
  }
};

struct Foo {
  Foo(Bar && = Bar()) {
    std::cout << "foo:" << this << std::endl;
  }

  ~Foo() {
    std::cout << "~foo:" << this << std::endl;
  }
};

void test(Foo = Foo()) {
  std::cout << 5566 << std::endl;
}

int main() {
  std::cout << 1 << std::endl;
  {
    Foo foo;
    std::cout << 5566 << std::endl;
  }
  std::cout << 2 << std::endl;
  test();
  return 0;
}
