title: Is there any reason to use the 'auto' keyword in C++03?
body: <blockquote>
    <p><strong>Note</strong> this question was originally posted in 2009, before C++11 was ratified and before the meaning of the <code>auto</code> keyword was drastically changed.  The answers provided pertain <em>only</em> to the C++03 meaning of <code>auto</code> -- that being a storage class specified -- and not the C++11 meaning of <code>auto</code> -- that being automatic type deduction.  If you are looking for advice about when to use the C++11 <code>auto</code>, this question is not relevant to that question.</p>
  </blockquote>
  
  <p>For the longest time I thought there was no reason to use the <code>static</code> keyword in C, because variables declared outside of block-scope were implicitly global. Then I discovered that declaring a variable as <code>static</code> within block-scope would give it permanent duration, and declaring it outside of block-scope (in program-scope) would give it file-scope (can only be accessed in that compilation unit).</p>
  
  <p>So this leaves me with only one keyword that I (maybe) don't yet fully understand: The <code>auto</code> keyword. Is there some other meaning to it other than 'local variable?' Anything it does that isn't implicitly done for you wherever you may want to use it? How does an <code>auto</code> variable behave in program scope? What of a <code>static auto</code> variable in file-scope? Does this keyword have any purpose other than <em>just existing for completeness</em>?</p>