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
+4
View File
@@ -13,6 +13,10 @@
#include <osiSock.h>
#include <event2/util.h>
#ifdef _WIN32
# include <ws2ipdef.h>
#endif
#include <pvxs/version.h>
namespace pvxs {
+4
View File
@@ -32,6 +32,10 @@
#define PVXS_VERSION VERSION_INT(PVXS_MAJOR_VERSION, PVXS_MINOR_VERSION, PVXS_MAINTENANCE_VERSION, 0)
#ifdef __GNUC__
# define GCC_VERSION VERSION_INT(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__, 0)
#endif
namespace pvxs {
//! Library version as a string
+1
View File
@@ -5,6 +5,7 @@
*/
#include <list>
#include <map>
#include <regex>
#include <system_error>
+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;
}
+1
View File
@@ -7,6 +7,7 @@
#include <iomanip>
#include <cstring>
#include <sstream>
#include <stdexcept>
#include <ctype.h>