aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2014-03-11 19:52:23 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2014-03-14 01:57:16 +0000
commitfd5f4c25aa1ba62157aded4b4a140485e7fb0506 (patch)
tree052520db4cb521dcf67bafc8f2b2f4570c00819f /Examples/test-suite
parent9a45a09aece8da3540250176b710bbd92c2e1b04 (diff)
downloadswig-fd5f4c25aa1ba62157aded4b4a140485e7fb0506.tar.gz
C++11 alignof alignas testcase and further C++11 doc updates
Diffstat (limited to 'Examples/test-suite')
-rw-r--r--Examples/test-suite/common.mk1
-rw-r--r--Examples/test-suite/cpp11_alignment.i16
2 files changed, 17 insertions, 0 deletions
diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk
index f2a2242b7..4106e17d5 100644
--- a/Examples/test-suite/common.mk
+++ b/Examples/test-suite/common.mk
@@ -495,6 +495,7 @@ CPP_TEST_CASES += \
# C++11 test cases.
CPP11_TEST_CASES = \
+ cpp11_alignment \
cpp11_alternate_function_syntax \
cpp11_constexpr \
cpp11_decltype \
diff --git a/Examples/test-suite/cpp11_alignment.i b/Examples/test-suite/cpp11_alignment.i
new file mode 100644
index 000000000..fb25c4ebb
--- /dev/null
+++ b/Examples/test-suite/cpp11_alignment.i
@@ -0,0 +1,16 @@
+%module cpp11_alignment
+
+%inline %{
+struct A {
+ int member;
+};
+const int align1 = alignof(A::member);
+%}
+
+%{
+// alignas - not yet working
+struct alignas(16) S {
+ int num;
+};
+alignas(double) unsigned char c[sizeof(double)];
+%}