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
|
|
@ -495,6 +495,7 @@ CPP_TEST_CASES += \
|
|||
|
||||
# C++11 test cases.
|
||||
CPP11_TEST_CASES = \
|
||||
cpp11_alignment \
|
||||
cpp11_alternate_function_syntax \
|
||||
cpp11_constexpr \
|
||||
cpp11_decltype \
|
||||
|
|
|
|||
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