title: GCC allows arrays to be returned from function - bug or feature?
body: <p>I was amazed to find out that GCC allows functions to return arrays when trailing return type is used instead of normal one. As you probably knows arrays can't be copied so this is quite limited but let me show you some cool <a href="http://melpon.org/wandbox/permlink/v5cCXzAKq5E1i69f">example</a>.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;typeinfo&gt;
  
  using namespace std;
  
  auto func() -&gt; int [5]
  {
      return {4, 56, 78, 4, 0};
  }
  
  int main()
  {
      cout &lt;&lt; func()[2] &lt;&lt; endl;
      cout &lt;&lt; typeid(func).name() &lt;&lt; endl;
  }
  </code></pre>
  
  <p>Is this a compiler bug or some new feature?</p>
  
  <p><em>Interestingly 'typeid' returns 'FA5_ivE' which is demangled as '<code>int (()) [5]</code>' and this means exactly what you think an function returning array of 5 int's.</em></p>
  
  <p>EDIT: I tried bounding the returned array into rvalue reference but without any success (used most of the possible forms):</p>
  
  <pre><code>auto &amp;&amp;refArrayTemp{ func() };
  </code></pre>
  
  <p>Seems that this extensions is rather useless.</p>