more compat

This commit is contained in:
Michael Davidsaver
2019-10-24 18:10:54 -07:00
parent cf64dad10d
commit 3a1123e3b9
5 changed files with 20 additions and 0 deletions
+10
View File
@@ -20,7 +20,12 @@ testCase::testCase(bool result)
testCase::testCase(testCase&& o) noexcept
:result(o.result)
#if !GCC_VERSION || GCC_VERSION>=VERSION_INT(4,9,0,0)
,msg(std::move(o.msg))
#else
// gcc 4.8 (at least) doesn't provide a move ctor yet
,msg(o.msg.str())
#endif
{
o.result = Nothing;
}
@@ -30,7 +35,12 @@ testCase& testCase::operator=(testCase&& o) noexcept
if(this!=&o) {
result = o.result;
o.result = Nothing;
#if !GCC_VERSION || GCC_VERSION>=VERSION_INT(4,9,0,0)
msg = std::move(o.msg);
#else
msg.seekp(0);
msg.str(o.msg.str());
#endif
}
return *this;
}