simple formatting changes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@12154 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8e779193bf
commit
c3b48505e2
26 changed files with 134 additions and 134 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
/* This testcase checks whether Swig correctly uses the new alternate functions
|
/* This testcase checks whether SWIG correctly uses the new alternate functions
|
||||||
declarations and definitions introduced in C++0x. */
|
declarations and definitions introduced in C++0x. */
|
||||||
%module cpp0x_alternate_function_syntax
|
%module cpp0x_alternate_function_syntax
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This interface tests whether Swig supports the new "constexpr" keyword
|
/* This interface tests whether SWIG supports the new "constexpr" keyword
|
||||||
introduced by C++0x.
|
introduced by C++0x.
|
||||||
*/
|
*/
|
||||||
%module cpp0x_constexpr
|
%module cpp0x_constexpr
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
%inline %{
|
%inline %{
|
||||||
class TestClass {
|
class TestClass {
|
||||||
public:
|
public:
|
||||||
constexpr int func() { return 10; }
|
constexpr int func() { return 10; }
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This test checks whether Swig correctly parses the new delegating
|
/* This test checks whether SWIG correctly parses the new delegating
|
||||||
constructors and constructor inheritance.
|
constructors and constructor inheritance.
|
||||||
*/
|
*/
|
||||||
%module cpp0x_constructors
|
%module cpp0x_constructors
|
||||||
|
|
@ -6,25 +6,25 @@
|
||||||
%inline %{
|
%inline %{
|
||||||
class BaseClass {
|
class BaseClass {
|
||||||
private:
|
private:
|
||||||
int _val;
|
int _val;
|
||||||
public:
|
public:
|
||||||
BaseClass(int iValue) { _val = iValue; }
|
BaseClass(int iValue) { _val = iValue; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class DerivedClass: public BaseClass {
|
class DerivedClass: public BaseClass {
|
||||||
public:
|
public:
|
||||||
using BaseClass::BaseClass; // Adds DerivedClass(int) constructor
|
using BaseClass::BaseClass; // Adds DerivedClass(int) constructor
|
||||||
};
|
};
|
||||||
|
|
||||||
class A {
|
class A {
|
||||||
public:
|
public:
|
||||||
int a;
|
int a;
|
||||||
int b;
|
int b;
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
A() : A( 10 ) {}
|
A() : A( 10 ) {}
|
||||||
A(int aa) : A(aa, 20) {}
|
A(int aa) : A(aa, 20) {}
|
||||||
A(int aa, int bb) : A(aa, bb, 30) {}
|
A(int aa, int bb) : A(aa, bb, 30) {}
|
||||||
A(int aa, int bb, int cc) { a=aa; b=bb; c=cc; }
|
A(int aa, int bb, int cc) { a=aa; b=bb; c=cc; }
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
/* This testcase checks whether Swig correctly uses the new 'decltype()'
|
/* This testcase checks whether SWIG correctly uses the new 'decltype()'
|
||||||
introduced in C++0x.
|
introduced in C++0x.
|
||||||
*/
|
*/
|
||||||
%module cpp0x_decltype
|
%module cpp0x_decltype
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
class A {
|
class A {
|
||||||
public:
|
public:
|
||||||
int i;
|
int i;
|
||||||
decltype(i) j;
|
decltype(i) j;
|
||||||
|
|
||||||
auto foo( decltype(i) a ) -> decltype(i) {
|
auto foo( decltype(i) a ) -> decltype(i) {
|
||||||
if (a==5)
|
if (a==5)
|
||||||
return 10;
|
return 10;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This testcase checks whether Swig correctly parses the default and delete
|
/* This testcase checks whether SWIG correctly parses the default and delete
|
||||||
keywords which keep or remove default C++ object construction functions. */
|
keywords which keep or remove default C++ object construction functions. */
|
||||||
%module cpp0x_default_delete
|
%module cpp0x_default_delete
|
||||||
|
|
||||||
|
|
@ -14,11 +14,11 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
struct A1 {
|
struct A1 {
|
||||||
void f(int i);
|
void f(int i);
|
||||||
void f(double i) = delete; /* Don't cast double to int. Compiler returns an error */
|
void f(double i) = delete; /* Don't cast double to int. Compiler returns an error */
|
||||||
};
|
};
|
||||||
struct A2 {
|
struct A2 {
|
||||||
void f(int i);
|
void f(int i);
|
||||||
template<class T> void f(T) = delete; /* Only accept int */
|
template<class T> void f(T) = delete; /* Only accept int */
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This interface checks whether Swig correctly compiles the new
|
/* This interface checks whether SWIG correctly compiles the new
|
||||||
explicit conversion operators feature introduced in C++0x.
|
explicit conversion operators feature introduced in C++0x.
|
||||||
*/
|
*/
|
||||||
%module cpp0x_explicit_conversion_operators
|
%module cpp0x_explicit_conversion_operators
|
||||||
|
|
@ -7,22 +7,22 @@
|
||||||
|
|
||||||
class U {
|
class U {
|
||||||
public:
|
public:
|
||||||
int u;
|
int u;
|
||||||
};
|
};
|
||||||
|
|
||||||
class V {
|
class V {
|
||||||
public:
|
public:
|
||||||
int v;
|
int v;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TestClass {
|
class TestClass {
|
||||||
public:
|
public:
|
||||||
//implicit converting constructor
|
//implicit converting constructor
|
||||||
TestClass( U const &val ) { t=val.u; }
|
TestClass( U const &val ) { t=val.u; }
|
||||||
// explicit constructor
|
// explicit constructor
|
||||||
explicit TestClass( V const &val ) { t=val.v; }
|
explicit TestClass( V const &val ) { t=val.v; }
|
||||||
|
|
||||||
int t;
|
int t;
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This testcase checks whether Swig correctly parses function objects
|
/* This testcase checks whether SWIG correctly parses function objects
|
||||||
and the templates for the functions (signature).
|
and the templates for the functions (signature).
|
||||||
Function objects are objects which overload the operator() function. */
|
Function objects are objects which overload the operator() function. */
|
||||||
%module cpp0x_function_objects
|
%module cpp0x_function_objects
|
||||||
|
|
|
||||||
|
|
@ -23,21 +23,21 @@ using namespace std;
|
||||||
|
|
||||||
class MyClass {
|
class MyClass {
|
||||||
public:
|
public:
|
||||||
set<int> getSet() { return _set; }
|
set<int> getSet() { return _set; }
|
||||||
void addSet(int elt) { _set.insert(_set.begin(), elt); }
|
void addSet(int elt) { _set.insert(_set.begin(), elt); }
|
||||||
// map<int, int> getMap() { return _map; }
|
// map<int, int> getMap() { return _map; }
|
||||||
// void addMap(int elt1, int elt2) { _map.insert(make_pair(elt1, elt2)); }
|
// void addMap(int elt1, int elt2) { _map.insert(make_pair(elt1, elt2)); }
|
||||||
|
|
||||||
unordered_set<int> getUnorderedSet() { return _unordered_set; }
|
unordered_set<int> getUnorderedSet() { return _unordered_set; }
|
||||||
void addUnorderedSet(int elt) { _unordered_set.insert(_unordered_set.begin(), elt); }
|
void addUnorderedSet(int elt) { _unordered_set.insert(_unordered_set.begin(), elt); }
|
||||||
// unordered_map<int, int> getUnorderedMap() { return _unordered_map; }
|
// unordered_map<int, int> getUnorderedMap() { return _unordered_map; }
|
||||||
// void addUnorderedMap(int elt1, int elt2) { _unordered_map.insert(make_pair(elt1, elt2)); }
|
// void addUnorderedMap(int elt1, int elt2) { _unordered_map.insert(make_pair(elt1, elt2)); }
|
||||||
private:
|
private:
|
||||||
set<int> _set;
|
set<int> _set;
|
||||||
// map<int, int> _map;
|
// map<int, int> _map;
|
||||||
|
|
||||||
unordered_set<int> _unordered_set;
|
unordered_set<int> _unordered_set;
|
||||||
// unordered_map<int, int> _unordered_map;
|
// unordered_map<int, int> _unordered_map;
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This testcase checks whether Swig correctly uses the new initializer_list
|
/* This testcase checks whether SWIG correctly uses the new initializer_list
|
||||||
introduced in C++0x. */
|
introduced in C++0x. */
|
||||||
%module cpp0x_initializer_list
|
%module cpp0x_initializer_list
|
||||||
%warnfilter(520) A;
|
%warnfilter(520) A;
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
|
|
||||||
class A {
|
class A {
|
||||||
public:
|
public:
|
||||||
A( std::initializer_list<int> ) {}
|
A( std::initializer_list<int> ) {}
|
||||||
A() {}
|
A() {}
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,34 @@
|
||||||
/* This testcase checks whether Swig correctly parses the lambda expressions
|
/* This testcase checks whether SWIG correctly parses the lambda expressions
|
||||||
and closure syntax introduced in C++0x.
|
and closure syntax introduced in C++0x.
|
||||||
Swig supports only lambda syntax and doesn't produce any wrapper code for
|
SWIG supports only lambda syntax and doesn't produce any wrapper code for
|
||||||
this.
|
this.
|
||||||
*/
|
*/
|
||||||
%module cpp0x_lambda_functions
|
%module cpp0x_lambda_functions
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
struct A {
|
struct A {
|
||||||
/* Defined lambda function with return value. */
|
/* Defined lambda function with return value. */
|
||||||
auto lambda1 = [](int x, int y) -> int { return x+y; };
|
auto lambda1 = [](int x, int y) -> int { return x+y; };
|
||||||
|
|
||||||
/* Defined lambda function without return value.
|
/* Defined lambda function without return value.
|
||||||
Return value is calculated by compiler, if the function contains a
|
Return value is calculated by compiler, if the function contains a
|
||||||
single statement "return expr;". */
|
single statement "return expr;". */
|
||||||
auto lambda2 = [](int x, int y) { return x+y; };
|
auto lambda2 = [](int x, int y) { return x+y; };
|
||||||
};
|
};
|
||||||
|
|
||||||
int runLambda1() {
|
int runLambda1() {
|
||||||
A myA;
|
A myA;
|
||||||
return myA.lambda1(5,6);
|
return myA.lambda1(5,6);
|
||||||
}
|
}
|
||||||
|
|
||||||
int runLambda2() {
|
int runLambda2() {
|
||||||
A myA;
|
A myA;
|
||||||
return myA.lambda2(5,6);
|
return myA.lambda2(5,6);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Inline defined lambda function. */
|
/* Inline defined lambda function. */
|
||||||
int runLambda3() {
|
int runLambda3() {
|
||||||
auto myLambda = [](int x, int y) { return x+y; };
|
auto myLambda = [](int x, int y) { return x+y; };
|
||||||
return myLambda(5,6);
|
return myLambda(5,6);
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This testcase checks whether Swig correctly treats the new nullptr_t
|
/* This testcase checks whether SWIG correctly treats the new nullptr_t
|
||||||
constant introduced in C++0x.
|
constant introduced in C++0x.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
class A {
|
class A {
|
||||||
public:
|
public:
|
||||||
A() : _myA(std::nullptr) { }
|
A() : _myA(std::nullptr) { }
|
||||||
|
|
||||||
A *_myA;
|
A *_myA;
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
/* This module tests whether Swig correctly parses:
|
/* This module tests whether SWIG correctly parses:
|
||||||
- ordinary strings (char_t)
|
- ordinary strings (char_t)
|
||||||
- L wide strings (wchar_t)
|
- L wide strings (wchar_t)
|
||||||
- u8 unicode8 strings (char_t)
|
- u8 unicode8 strings (char_t)
|
||||||
- u unicode16 strings (char16_t)
|
- u unicode16 strings (char16_t)
|
||||||
- U unicode32 strings (char32_t)
|
- U unicode32 strings (char32_t)
|
||||||
|
|
||||||
This module also tests whether Swig correctly parses custom string delimiters.
|
This module also tests whether SWIG correctly parses custom string delimiters.
|
||||||
*/
|
*/
|
||||||
%module cpp0x_raw_string_literals
|
%module cpp0x_raw_string_literals
|
||||||
%warnfilter(SWIGWARN_TYPEMAP_CHARLEAK_MSG) bb;
|
%warnfilter(SWIGWARN_TYPEMAP_CHARLEAK_MSG) bb;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This testcase checks whether Swig correctly uses the new result_of class
|
/* This testcase checks whether SWIG correctly uses the new result_of class
|
||||||
and its templating capabilities introduced in C++0x. */
|
and its templating capabilities introduced in C++0x. */
|
||||||
%module cpp0x_result_of
|
%module cpp0x_result_of
|
||||||
|
|
||||||
|
|
@ -7,12 +7,12 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
double square(double x) {
|
double square(double x) {
|
||||||
return (x * x);
|
return (x * x);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Fun, class Arg>
|
template<class Fun, class Arg>
|
||||||
typename std::result_of<Fun(Arg)>::type test_result_impl(Fun fun, Arg arg) {
|
typename std::result_of<Fun(Arg)>::type test_result_impl(Fun fun, Arg arg) {
|
||||||
return fun(arg);
|
return fun(arg);
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
/* This testcase checks whether Swig correctly parses the double ampersand &&
|
/* This testcase checks whether SWIG correctly parses the double ampersand &&
|
||||||
move operator which is currently mapped to the reference & operator. */
|
move operator which is currently mapped to the reference & operator. */
|
||||||
%module cpp0x_rvalue_reference
|
%module cpp0x_rvalue_reference
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
class A {
|
class A {
|
||||||
public:
|
public:
|
||||||
int getAcopy() { return _a; }
|
int getAcopy() { return _a; }
|
||||||
int *getAptr() { return &_a; }
|
int *getAptr() { return &_a; }
|
||||||
int &getAref() { return _a; }
|
int &getAref() { return _a; }
|
||||||
int &&getAmove() { return _a; }
|
int &&getAmove() { return _a; }
|
||||||
|
|
||||||
void setAcopy(int a) { _a = a; }
|
void setAcopy(int a) { _a = a; }
|
||||||
void setAptr(int *a) { _a = *a; }
|
void setAptr(int *a) { _a = *a; }
|
||||||
void setAref(int &a) { _a = a; }
|
void setAref(int &a) { _a = a; }
|
||||||
void setAmove(int &&a) { _a = a; }
|
void setAmove(int &&a) { _a = a; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int _a;
|
int _a;
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
/* This testcase checks whether Swig correctly uses the sizeof() on the
|
/* This testcase checks whether SWIG correctly uses the sizeof() on the
|
||||||
concrete objects and not only types introduced in C++0x. */
|
concrete objects and not only types introduced in C++0x. */
|
||||||
%module cpp0x_sizeof_object
|
%module cpp0x_sizeof_object
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
struct B {
|
struct B {
|
||||||
unsigned long member1;
|
unsigned long member1;
|
||||||
long long member2;
|
long long member2;
|
||||||
char member3;
|
char member3;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct A {
|
struct A {
|
||||||
B member;
|
B member;
|
||||||
};
|
};
|
||||||
|
|
||||||
const int a = sizeof(A::member);
|
const int a = sizeof(A::member);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This testcase checks whether Swig correctly uses the new general-purpose
|
/* This testcase checks whether SWIG correctly uses the new general-purpose
|
||||||
smart pointers introduced in C++0x:
|
smart pointers introduced in C++0x:
|
||||||
- shared_ptr
|
- shared_ptr
|
||||||
- weak_ptr
|
- weak_ptr
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This test case checks whether swig correctly parses and ignores the
|
/* This test case checks whether SWIG correctly parses and ignores the
|
||||||
keywords "static_assert()" inside the class or struct.
|
keywords "static_assert()" inside the class or struct.
|
||||||
*/
|
*/
|
||||||
%module cpp0x_static_assert
|
%module cpp0x_static_assert
|
||||||
|
|
@ -6,12 +6,12 @@
|
||||||
%inline %{
|
%inline %{
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct Check1 {
|
struct Check1 {
|
||||||
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class Check2 {
|
class Check2 {
|
||||||
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This testcase checks whether Swig produces the correct wrapper for the
|
/* This testcase checks whether SWIG produces the correct wrapper for the
|
||||||
strongly typed enums. Enums with the same type are comparable. Enum classes
|
strongly typed enums. Enums with the same type are comparable. Enum classes
|
||||||
require support for nested classes. */
|
require support for nested classes. */
|
||||||
%module cpp0x_strongly_typed_enumerations
|
%module cpp0x_strongly_typed_enumerations
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This interface checks whether Swig supports the new double angled brackets
|
/* This interface checks whether SWIG supports the new double angled brackets
|
||||||
in the template syntax without having a space inbetween. This feature was
|
in the template syntax without having a space inbetween. This feature was
|
||||||
introduced in new C++0x standard.
|
introduced in new C++0x standard.
|
||||||
*/
|
*/
|
||||||
|
|
@ -10,21 +10,21 @@ std::map< int,std::map<int, double> > n;
|
||||||
|
|
||||||
class ABC {
|
class ABC {
|
||||||
public:
|
public:
|
||||||
int a;
|
int a;
|
||||||
int operator>>(ABC &);
|
int operator>>(ABC &);
|
||||||
int operator<<(ABC &);
|
int operator<<(ABC &);
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
class ABC2 {
|
class ABC2 {
|
||||||
public:
|
public:
|
||||||
int a;
|
int a;
|
||||||
|
|
||||||
template<typename U>
|
template<typename U>
|
||||||
U operator>>(ABC &);
|
U operator>>(ABC &);
|
||||||
|
|
||||||
template<typename U>
|
template<typename U>
|
||||||
U operator<<(ABC &);
|
U operator<<(ABC &);
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This unit tests whether Swig correctly parses the code and makes wrappers
|
/* This unit tests whether SWIG correctly parses the code and makes wrappers
|
||||||
for the new C++0x extern templates (explicit template instantiation without
|
for the new C++0x extern templates (explicit template instantiation without
|
||||||
using the translation unit).
|
using the translation unit).
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
/* This testcase checks whether Swig correctly parses the template aliasing. */
|
/* This testcase checks whether SWIG correctly parses the template aliasing. */
|
||||||
%module cpp0x_template_typedefs
|
%module cpp0x_template_typedefs
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
template< typename T1, typename T2, int >
|
template< typename T1, typename T2, int >
|
||||||
class SomeType {
|
class SomeType {
|
||||||
T1 a;
|
T1 a;
|
||||||
T2 b;
|
T2 b;
|
||||||
int c;
|
int c;
|
||||||
};
|
};
|
||||||
|
|
||||||
template< typename T2 >
|
template< typename T2 >
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
/* This testcase checks whether Swig correctly parses the 'thread_local'
|
/* This testcase checks whether SWIG correctly parses the 'thread_local'
|
||||||
keyword before the member type and name. */
|
keyword before the member type and name. */
|
||||||
|
|
||||||
%module cpp0x_thread_local
|
%module cpp0x_thread_local
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
struct A {
|
struct A {
|
||||||
thread_local int val;
|
thread_local int val;
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This testcase checks whether Swig syntactically correctly parses the curly
|
/* This testcase checks whether SWIG syntactically correctly parses the curly
|
||||||
brackets {} for uniform member initialization. */
|
brackets {} for uniform member initialization. */
|
||||||
%module cpp0x_uniform_initialization
|
%module cpp0x_uniform_initialization
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This testcase checks whether Swig correctly parses the support for types
|
/* This testcase checks whether SWIG correctly parses the support for types
|
||||||
without the defined trivial constructor in the unions. */
|
without the defined trivial constructor in the unions. */
|
||||||
%module cpp0x_unrestricted_unions
|
%module cpp0x_unrestricted_unions
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This testcase checks whether Swig correctly parses the user-defined literals
|
/* This testcase checks whether SWIG correctly parses the user-defined literals
|
||||||
for the string introduced in C++0x. */
|
for the string introduced in C++0x. */
|
||||||
%module cpp0x_userdefined_literals
|
%module cpp0x_userdefined_literals
|
||||||
|
|
||||||
|
|
@ -6,9 +6,9 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
struct OutputType {
|
struct OutputType {
|
||||||
int val;
|
int val;
|
||||||
|
|
||||||
OutputType(int v) { v=val; }
|
OutputType(int v) { v=val; }
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Note: GCC doesn't support user-defined literals yet! */
|
/* Note: GCC doesn't support user-defined literals yet! */
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* This testcase checks whether Swig correctly parses and generates the code
|
/* This testcase checks whether SWIG correctly parses and generates the code
|
||||||
for variadic templates. This covers the variadic number of arguments inside
|
for variadic templates. This covers the variadic number of arguments inside
|
||||||
the template brackets, new functions sizeof... and multiple inheritance
|
the template brackets, new functions sizeof... and multiple inheritance
|
||||||
using variadic number of classes.
|
using variadic number of classes.
|
||||||
|
|
@ -45,19 +45,19 @@ template<typename... Args> struct SizeOf {
|
||||||
%inline %{
|
%inline %{
|
||||||
class A {
|
class A {
|
||||||
public:
|
public:
|
||||||
A() {
|
A() {
|
||||||
a = 100;
|
a = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
int a;
|
int a;
|
||||||
};
|
};
|
||||||
|
|
||||||
class B {
|
class B {
|
||||||
public:
|
public:
|
||||||
B() {
|
B() {
|
||||||
b = 200;
|
b = 200;
|
||||||
}
|
}
|
||||||
int b;
|
int b;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename... BaseClasses> class MultiInherit : public BaseClasses... {
|
template <typename... BaseClasses> class MultiInherit : public BaseClasses... {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue