title: Howto initialize a reference to an object if reference is a class member?
body: <p>Let's say <em>Class</em> contains a reference called <em>matrix_</em>:</p>
  
  <p>Class.h</p>
  
  <pre><code>class Class
  {
  Matrix&amp; matrix_;
  }
  </code></pre>
  
  <p>Class.cpp    </p>
  
  <pre><code>Class::Class() : matrix_(Matrix())
  {
  }
  </code></pre>
  
  <p>I get the error: invalid initialization of non-const reference of type ‘Matrix&amp;’ from a 
   temporary of type ‘Matrix’.</p>
  
  <p>I see that the problem is that the temporary object will disappear and the reference will point to NULL. How can I create a persistent object for the reference? I want to use a reference because this member should be constant.</p>