Added support for C++0x static_assert().

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11369 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Matevz Jekovec 2009-07-05 14:33:40 +00:00
commit 72708ea173
4 changed files with 34 additions and 2 deletions

View file

@ -402,7 +402,8 @@ CPP_TEST_CASES += \
CPP0X_TEST_CASES = \
cpp0x_template_double_brackets \
cpp0x_explicit_conversion_operators \
cpp0x_raw_string_literals
cpp0x_raw_string_literals \
cpp0x_static_assert
# cpp0x_constexpr # not supported by any compilers yet
# Broken C++0x test cases.

View file

@ -0,0 +1,17 @@
/* This test case checks whether swig correctly parses and ignores the
keywords "static_assert()" inside the class or struct.
*/
%module static_assert
%inline %{
template <typename T>
struct Check1 {
static_assert(sizeof(int) <= sizeof(T), "not big enough");
};
template <typename T>
class Check2 {
static_assert(sizeof(int) <= sizeof(T), "not big enough");
};
%}