Testcase warning fix for gcc-9
warning: returning reference to temporary [-Wreturn-local-addr]
This commit is contained in:
parent
75c5cb7458
commit
35e24ebd66
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ struct Thingy {
|
||||||
// test both primitive and user defined rvalue reference default arguments and compactdefaultargs
|
// 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 compactDefaultArgs(const bool &&b = (const bool &&)PublicGlobalTrue, const UserDef &&u = (const UserDef &&)PublicUserDef) {}
|
||||||
void privateDefaultArgs(const bool &&b = (const bool &&)PrivateTrue) {}
|
void privateDefaultArgs(const bool &&b = (const bool &&)PrivateTrue) {}
|
||||||
operator int &&() { return std::move(0); }
|
operator int &&() { return std::move(val); }
|
||||||
Thingy(const Thingy& rhs) : val(rhs.val), lvalref(rhs.lvalref), rvalref(std::move(rhs.rvalref)) {}
|
Thingy(const Thingy& rhs) : val(rhs.val), lvalref(rhs.lvalref), rvalref(std::move(rhs.rvalref)) {}
|
||||||
Thingy& operator=(const Thingy& rhs) {
|
Thingy& operator=(const Thingy& rhs) {
|
||||||
val = rhs.val;
|
val = rhs.val;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue