title: decltype undeclared in mingw g++ 4.7.2
body: <p>For some reason or other when trying to compile the following code in G++ on mingw</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;cctype&gt;
  
  int main( int argc, char **argv )
  {
      std::string s( "Hello, World!" );
  
      decltype( s.size(  ) ) punct_cnt = 0;
  
      for ( auto c : s )
      {
          if ( ispunct( c ) )
              ++punct_cnt;
      }
  
      std::cout &lt;&lt; punct_cnt &lt;&lt; " punctuation characters in " &lt;&lt; s &lt;&lt; std::endl;
  
      return 0;
  }
  </code></pre>
  
  <p>I get the following error</p>
  
  <pre><code>test.cpp: In function 'int main(int, char**)':
  test.cpp:9:23: error: 'decltype' was not declared in this scope
  test.cpp:9:25: error: expected ';' before 'punct_cnt'
  test.cpp:11:13: error: 'c' does not name a type
  test.cpp:17:2: error: expected ';' before 'std'
  test.cpp:17:15: error: 'punct_cnt' was not declared in this scope
  test.cpp:19:2: error: expected primary-expression before 'return'
  test.cpp:19:2: error: expected ')' before 'return'
  </code></pre>
  
  <p>I have checked and the version of the g++ compiler is 4.7.2, anyone got any ideas how I can resolve other than changing <code>decltype</code> to <code>std::string::size_type</code>?</p>