Rename all C++0x to C++11 and cpp0x to cpp11
This commit is contained in:
parent
173c4b3bba
commit
738cc36aab
52 changed files with 307 additions and 307 deletions
23
Examples/test-suite/cpp11_unrestricted_unions.i
Normal file
23
Examples/test-suite/cpp11_unrestricted_unions.i
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* This testcase checks whether SWIG correctly parses the support for types
|
||||
without the defined trivial constructor in the unions. */
|
||||
%module cpp11_unrestricted_unions
|
||||
|
||||
%inline %{
|
||||
struct point {
|
||||
point() {}
|
||||
point(int x, int y) : x_(x), y_(y) {}
|
||||
int x_, y_;
|
||||
};
|
||||
|
||||
#include <new> // For placement 'new' in the constructor below
|
||||
union P {
|
||||
int z;
|
||||
double w;
|
||||
point p; // Illegal in C++03; legal in C++11.
|
||||
// Due to the point member, a constructor definition is required.
|
||||
P() {
|
||||
new(&p) point();
|
||||
}
|
||||
} p1;
|
||||
%}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue