aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/cpp11_static_assert.i
blob: 8d616f96cbff2f4533f512f3849d1509c65a801a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* This test case checks whether SWIG correctly parses and ignores the
   keywords "static_assert()" inside the class or struct.
*/
%module cpp11_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");
};
%}