Added test cases. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11385 626c5289-ae23-0410-ae9c-e8d60b6d4f22
28 lines
495 B
OpenEdge ABL
28 lines
495 B
OpenEdge ABL
/* This interface checks whether Swig correctly compiles the new
|
|
explicit conversion operators feature introduced in C++0x.
|
|
*/
|
|
%module cpp0x_explicit_conversion_operators
|
|
|
|
%inline %{
|
|
|
|
class U {
|
|
public:
|
|
int u;
|
|
};
|
|
|
|
class V {
|
|
public:
|
|
int v;
|
|
};
|
|
|
|
class TestClass {
|
|
public:
|
|
//implicit converting constructor
|
|
TestClass( U const &val ) { t=val.u; }
|
|
// explicit constructor
|
|
explicit TestClass( V const &val ) { t=val.v; }
|
|
|
|
int t;
|
|
};
|
|
%}
|
|
|