title: Why GCC allows catch by rvalue reference?
body: <p>The standard states that catching by rvalue reference should be illegal: <a href="https://stackoverflow.com/a/3860676/1270003">Catch By Rvalue Reference</a>, but I have the follwing code:</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  int main(){
      try {
          throw string("test");
      } catch (string &amp;&amp; s) {
          cout &lt;&lt; s &lt;&lt; endl;
      }
      return 0;
  }
  </code></pre>
  
  <p>It successfully compiles without any warning with <code>-Wall</code> option. How does this happen?</p>
  
  <p>I am using  <code>gcc version 4.6.3 20120306 (Red Hat 4.6.3-2) (GCC)</code></p>