C++11 alignof alignas testcase and further C++11 doc updates
This commit is contained in:
parent
9a45a09aec
commit
fd5f4c25aa
3 changed files with 96 additions and 11 deletions
16
Examples/test-suite/cpp11_alignment.i
Normal file
16
Examples/test-suite/cpp11_alignment.i
Normal file
|
|
@ -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)];
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue