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:
parent
ee8bebb668
commit
72708ea173
4 changed files with 34 additions and 2 deletions
17
Examples/test-suite/cpp0x_static_assert.i
Normal file
17
Examples/test-suite/cpp0x_static_assert.i
Normal 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");
|
||||
};
|
||||
%}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue