    #include <iostream>
    
    struct Foo 
    {
       Foo() : a(10), b(20) {}
       ~Foo() { std::cout << "In Foo::~Foo()\n"; }
       int a;
       int b;
    };
    
    Foo getFoo()
    {
       return Foo();
    }
    
    void testFoo1()
    {
       int const& r = getFoo().a;
       std::cout << "In testFoo1()\n";
       (void)r; // Shut up the compiler
    }
    
    int main()
    {
       testFoo1();
    }
