mirror of https://github.com/swig/swig
Ocaml test-suite 'passes' with c++11 testing now
Test c++17 on Github Actions to try keep it passing when configure detects g++ can test c++17.
This commit is contained in:
parent
a71c318b06
commit
f44153069b
|
@ -296,6 +296,7 @@ jobs:
|
|||
- SWIGLANG: mzscheme
|
||||
continue-on-error: true
|
||||
- SWIGLANG: ocaml
|
||||
CPPSTD: c++17
|
||||
continue-on-error: true
|
||||
os: ubuntu-18.04 # ocaml-4.08 in ubuntu-20.04 not yet working
|
||||
# Run all of them, as opposed to aborting when one fails
|
||||
|
|
|
@ -20,10 +20,10 @@ static const bool PublicGlobalTrue = true;
|
|||
static const UserDef PublicUserDef = UserDef();
|
||||
struct Thingy {
|
||||
typedef int Integer;
|
||||
int val;
|
||||
int valval;
|
||||
int &lvalref;
|
||||
int &&rvalref;
|
||||
Thingy(int v, int &&rvalv) : val(v), lvalref(val), rvalref(std::move(rvalv)) {}
|
||||
Thingy(int v, int &&rvalv) : valval(v), lvalref(valval), rvalref(std::move(rvalv)) {}
|
||||
void refIn(long &i) {}
|
||||
void rvalueIn(long &&i) {}
|
||||
short && rvalueInOut(short &&i) { return std::move(i); }
|
||||
|
@ -31,10 +31,10 @@ struct Thingy {
|
|||
// test both primitive and user defined rvalue reference default arguments and compactdefaultargs
|
||||
void compactDefaultArgs(const bool &&b = (const bool &&)PublicGlobalTrue, const UserDef &&u = (const UserDef &&)PublicUserDef) {}
|
||||
void privateDefaultArgs(const bool &&b = (const bool &&)PrivateTrue) {}
|
||||
operator int &&() { return std::move(val); }
|
||||
Thingy(const Thingy& rhs) : val(rhs.val), lvalref(rhs.lvalref), rvalref(std::move(rhs.rvalref)) {}
|
||||
operator int &&() { return std::move(valval); }
|
||||
Thingy(const Thingy& rhs) : valval(rhs.valval), lvalref(rhs.lvalref), rvalref(std::move(rhs.rvalref)) {}
|
||||
Thingy& operator=(const Thingy& rhs) {
|
||||
val = rhs.val;
|
||||
valval = rhs.valval;
|
||||
lvalref = rhs.lvalref;
|
||||
rvalref = rhs.rvalref;
|
||||
return *this;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
template<typename T> class Temper {
|
||||
public:
|
||||
T val;
|
||||
T valu;
|
||||
};
|
||||
|
||||
class A {
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
#include <iostream>
|
||||
|
||||
struct OutputType {
|
||||
int val;
|
||||
OutputType(int v) : val(v) {}
|
||||
int valu;
|
||||
OutputType(int v) : valu(v) {}
|
||||
};
|
||||
|
||||
// Raw literal
|
||||
|
|
|
@ -17,6 +17,8 @@ FAILING_CPP_TESTS = \
|
|||
allprotected \
|
||||
apply_signed_char \
|
||||
apply_strings \
|
||||
cpp11_director_enums \
|
||||
cpp11_strongly_typed_enumerations \
|
||||
cpp_enum \
|
||||
default_constructor \
|
||||
director_binary_string \
|
||||
|
|
Loading…
Reference in New Issue