[C++11] Allow static_assert at the top level

And disallow it right after template<T>).

Fixes https://github.com/swig/swig/issues/1031 reported by Artem V L.
This commit is contained in:
Olly Betts 2017-08-04 14:09:30 +12:00
commit a92137a708
4 changed files with 24 additions and 8 deletions

View file

@ -877,7 +877,8 @@ so in this case it is entirely possible to pass an int instead of a double to <t
<p>
SWIG correctly parses the new <tt>static_assert</tt> declarations.
SWIG correctly parses the new <tt>static_assert</tt> declarations (though 3.0.12 and earlier
had a bug which meant this wasn't accepted at file scope).
This is a C++ compile time directive so there isn't anything useful that SWIG can do with it.
</p>