more compat
This commit is contained in:
@@ -13,6 +13,10 @@
|
||||
#include <osiSock.h>
|
||||
#include <event2/util.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <ws2ipdef.h>
|
||||
#endif
|
||||
|
||||
#include <pvxs/version.h>
|
||||
|
||||
namespace pvxs {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <regex>
|
||||
#include <system_error>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <iomanip>
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user