title: Missing semicolon: C++ or SWIG issue?
body: <p>This question is actually about SWIG, not a basic C++ missing a semicolon.</p>
  
  <p>I have the following method in a class (in the header file):</p>
  
  <pre><code>class BarClass 
  {
      // ... more code goes here
      unsigned int foo(unsigned int val) throw(std::invalid_argument) override;
      // ... more code goes here
  };
  </code></pre>
  
  <p>I have a SWIG interface declaration in the form:</p>
  
  <pre><code>%include "stdint.i"
  %include "std_except.i"
  %include "exception.i"
  
  %module mymodule
  %{
      #include "headerFile.h"
  %}
  %include "headerFile.h"
  </code></pre>
  
  <p>The code is used as a C++ static library but also exposed to python via SWIG. Normal compilation with GCC / Clang works well. </p>
  
  <p>However, when wrapping the library with SWIG, I receive an error:</p>
  
  <blockquote>
    <p>headerFile.h:22: Error: Syntax error - possibly a missing semicolon.</p>
  </blockquote>
  
  <p>I could replace the method declaration with:</p>
  
  <pre><code>unsigned int foo(unsigned int val) throw(std::invalid_argument);
  </code></pre>
  
  <p>When removing the override, SWIG seems to work but I get warnings. I have the impression that SWIG gets confused by the combination of throw and override at the same time.</p>
  
  <p>Is this is SWIG bug or something silly that I am missing?</p>
  
  <p><strong>Note:</strong> I very much aware that using throw declarations is deprecated but that is the way SWIG gets information about exceptions and generates the appropriate code for Python. Maybe there is a better/newer way to do this in SWIG?</p>