diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2015-07-06 20:07:23 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2015-07-06 20:07:23 +0100 |
commit | 1514e19efb00e5cfdfd00794341cbf991b87f693 (patch) | |
tree | 1949255d6fea0d649765c6342cae9460801d4231 /Examples | |
parent | d325eeee8492e9b0923aaebf78a83fc79920c981 (diff) | |
download | swig-1514e19efb00e5cfdfd00794341cbf991b87f693.tar.gz |
Test-suite fixes for c++11 compilation by g++-5.1
Diffstat (limited to 'Examples')
-rw-r--r-- | Examples/test-suite/array_typedef_memberin.i | 7 | ||||
-rw-r--r-- | Examples/test-suite/cpp11_lambda_functions.i | 3 | ||||
-rw-r--r-- | Examples/test-suite/cpp11_rvalue_reference2.i | 2 |
3 files changed, 4 insertions, 8 deletions
diff --git a/Examples/test-suite/array_typedef_memberin.i b/Examples/test-suite/array_typedef_memberin.i index d9f768ed8..3618c9305 100644 --- a/Examples/test-suite/array_typedef_memberin.i +++ b/Examples/test-suite/array_typedef_memberin.i @@ -13,13 +13,8 @@ namespace ArrayExample { public: Eight node_list; -#ifndef _MSC_VER const Eight node_list2; ConstEight node_list3; -#else - Eight node_list2; - Eight node_list3; -#endif void fn1(Eight a) {} void fn2(const Eight a) {} @@ -32,6 +27,8 @@ namespace ArrayExample void fn7(Eight*& a) {} void fn8(ConstEight*& a) {} void fn9(const ConstEight*& a) {} + + ExampleDetail() : node_list(), node_list2(), node_list3() {} }; } diff --git a/Examples/test-suite/cpp11_lambda_functions.i b/Examples/test-suite/cpp11_lambda_functions.i index 87c7196d8..161e08c65 100644 --- a/Examples/test-suite/cpp11_lambda_functions.i +++ b/Examples/test-suite/cpp11_lambda_functions.i @@ -100,9 +100,6 @@ int runLambdaInline() { %{ // TODO -struct LambdaStruct { - static constexpr auto lambda_struct1 = [=]() { return thing; }; -}; int(*lambda101notauto)(int, int) = [] (int a, int b) { return a + b; }; int lambda102 = [] (int a, int b) mutable { return a + b; }(1, 2); void lambda_init(int = ([=]{ return 0; })()); diff --git a/Examples/test-suite/cpp11_rvalue_reference2.i b/Examples/test-suite/cpp11_rvalue_reference2.i index 4ef871c63..89d2ee054 100644 --- a/Examples/test-suite/cpp11_rvalue_reference2.i +++ b/Examples/test-suite/cpp11_rvalue_reference2.i @@ -32,6 +32,7 @@ struct Thingy { void compactDefaultArgs(const bool &&b = (const bool &&)PublicGlobalTrue, const UserDef &&u = (const UserDef &&)PublicUserDef) {} void privateDefaultArgs(const bool &&b = (const bool &&)PrivateTrue) {} operator int &&() {} + Thingy(const Thingy& rhs) : val(rhs.val), lvalref(rhs.lvalref), rvalref(copy_int(rhs.rvalref)) {} Thingy& operator=(const Thingy& rhs) { val = rhs.val; lvalref = rhs.lvalref; @@ -39,6 +40,7 @@ struct Thingy { } private: static const bool PrivateTrue; + int copy_int(int& i) { return i; } Thingy(); }; const bool Thingy::PrivateTrue = true; |