git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@12154 626c5289-ae23-0410-ae9c-e8d60b6d4f22
22 lines
447 B
OpenEdge ABL
22 lines
447 B
OpenEdge ABL
/* This testcase checks whether SWIG syntactically correctly parses the curly
|
|
brackets {} for uniform member initialization. */
|
|
%module cpp0x_uniform_initialization
|
|
|
|
%inline %{
|
|
struct BasicStruct {
|
|
int x;
|
|
double y;
|
|
};
|
|
|
|
struct AltStruct {
|
|
AltStruct(int x, double y) : x_{x}, y_{y} {}
|
|
|
|
private:
|
|
int x_;
|
|
double y_;
|
|
};
|
|
|
|
BasicStruct var1{5, 3.2}; // only fills the struct components
|
|
AltStruct var2{2, 4.3}; // calls the constructor
|
|
|
|
%}
|