title: Is reference binding to a temporary of a temporary undefined behavior?
body: <p>In the following the snippet, is the lifetime of the sphere extended in such a way that the value of <code>r</code> is not undefined?</p>
  
  <pre><code> struct Sphere {
     auto&amp; radius() const { return _radius;}
     float _radius{};
   };
   struct Capsule {
     auto sphere() const { return Sphere{12.0}; }
   };
   auto func() {
     auto capsule = Capsule{};
     const auto&amp; r = capsule.sphere().radius();
     std::cout &lt;&lt; r;
   }
  </code></pre>
  
  <p>I know that const-references extend the life time of a temporary, but I'm not sure what happens if a member of a temporary is bound to.</p>
  
  <p><em>Note: I'm very suspicious that the equivalent of this snippet is causing a bug for me, but neither Clang nor Visual Studio issues a warning.</em></p>