title: Should I use __restrict on references?
body: <p>In the program I am coding, one of my function declarations goes like this:</p>
  
  <pre><code>bool parse( const sentence &amp; __restrict sentence )
  {
    // whatever
  }
  </code></pre>
  
  <p>When I compile the code with Microsoft Visual Studio 2010 Express, the compiler complains:</p>
  
  <blockquote>
    <p>warning C4227: anachronism used : qualifiers on reference are ignored</p>
  </blockquote>
  
  <p>However, <a href="http://gcc.gnu.org/onlinedocs/gcc/Restricted-Pointers.html" rel="noreferrer">this page</a> of GCC’s documentation says:</p>
  
  <blockquote>
    <p>In addition to allowing restricted pointers, you can specify restricted references, which indicate that the reference is not aliased in the local context. </p>
  </blockquote>
  
  <p>And the same page gives a very explicit example:</p>
  
  <pre><code> void fn (int *__restrict__ rptr, int &amp;__restrict__ rref)
   {
     /* ... */
   }
  </code></pre>
  
  <p>Did I misunderstand MVSC’s warning? or should I transform all my references into pointers so that <code>__restrict</code> applies?</p>