title: Binding temporaries to non-const references in case of exceptions
body: <p>I have always read that temporaries are allowed to bind only with non-const reference arguments in case of function calls..</p>
  
  <p>CASE 1:-</p>
  
  <p>For example:-</p>
  
  <pre><code>class Simple{
      public: 
         int i;
         Simple(Simple &amp;f)
         {
           i = f.i + 1;
         }
         Simple(int j)
         {
           i = j;
         }
    };
  
  int main()
  {
     Simple f1 = Simple(2);   // error no matching call fruit::fruit(fruit)...
     return 0;
  }
  </code></pre>
  
  <p>This would give me error as I am trying to bind temporary with non-const reference arguments.</p>
  
  <p>CASE 2:-</p>
  
  <pre><code>try
  {
   throw e;
  }
  catch ( exception&amp; e )
  {
  }
  </code></pre>
  
  <p>I have learnt when we throw an exception what really get passed to catch is the copy of original exception thrown i.e a temporary is created for the object thrown and then this would be passed to catch clause.</p>
  
  <p>What catch is doing is catching this exception by non-const reference. This is in contrast to what I have shown in CASE 1.</p>
  
  <p>So, my questions are:-</p>
  
  <p>1) Are there specific scenarios where binding temporary to non-const reference is allowed.</p>
  
  <p>2) If there are then what factors are taken into account while allowing these exceptions.</p>