title: Binding temporary to const reference in c'tor initializer list
body: <p>Section 12.2.5 in C++03 says "<strong>A temporary bound to a reference member in a
  constructor’s ctor-initializer (12.6.2) persists until the constructor exits</strong>"<br>
  So I tried following program  </p>
  
  <pre><code>#include&lt;iostream&gt;
  using namespace std;
  
  struct foo
  {
    foo()
    {
      cout&lt;&lt;"foo c'tor"&lt;&lt;endl;
    }
    ~foo()
    {
      cout&lt;&lt;"foo d'tor"&lt;&lt;endl;
    }
  };
  
  struct bar
  {
    const foo &amp;ref;
    bar():ref(foo()) 
    {
      cout&lt;&lt;"bar c'tor"&lt;&lt;endl;
    }
  
  };
  
  int main()
  {
    bar obj;
  }    
  </code></pre>
  
  <p>The output I get is : </p>
  
  <pre><code>foo c'tor
  foo d'tor
  bar c'tor
  </code></pre>
  
  <p>Now according to standard, temporary generated by foo() in c'tor init-list of bar's c'tor will be destroyed after bar's c'tor so <code>foo d'tor</code> should be printed after <code>bar c'tor</code><br>
  but it's other way around.<br>
  Please explain the reason.</p>