title: Compiler error with extra braces 'auto is not allowed here'
body: <pre><code>template &lt;typename T, size_t N&gt;
  class myarray : public std::array&lt;T, N&gt;
  {
  };
  
  int main()
  {
  
     myarray&lt; myarray&lt;unsigned int , 4&gt;, 8&gt; test2d;
     // Why does using an extra pair of braces gives a compile error
     for ((auto &amp;n : test2d)) {
       n.fill(0xdeadbeef); // init a 2D array
     }    
     return 0;
  }
  </code></pre>
  
  <p>So, my editor inserted an extra pair of braces - and I was surprised that the code did not compile. Can anyone explain what is going on here.</p>