Test-suite fixes for c++11 compilation by g++-5.1

This commit is contained in:
William S Fulton 2015-07-06 20:07:23 +01:00
commit 1514e19efb
3 changed files with 4 additions and 8 deletions

View file

@ -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() {}
};
}

View file

@ -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; })());

View file

@ -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;