Commit 74b48077 authored by Pavel Vainerman's avatar Pavel Vainerman Committed by Pavel Vainerman

(timespec): fixed build for c++17

parent 07d6f94a
......@@ -184,16 +184,6 @@ namespace uniset
uniset::Timespec_var to_uniset_timespec( const std::chrono::system_clock::duration& d );
uniset::Timespec_var now_to_uniset_timespec(); /*!< получение текущего времени */
inline bool operator==( const struct timespec& r1, const struct timespec& r2 )
{
return ( r1.tv_sec == r2.tv_sec && r1.tv_nsec == r2.tv_nsec );
}
inline bool operator!=( const struct timespec& r1, const struct timespec& r2 )
{
return !(operator==(r1, r2));
}
/*! Разбивка строки по указанному символу */
IDList explode( const std::string& str, char sep = ',' );
std::vector<std::string> explode_str( const std::string& str, char sep = ',' );
......@@ -361,4 +351,12 @@ namespace uniset
// -----------------------------------------------------------------------------------------
} // end of namespace uniset
// -----------------------------------------------------------------------------------------
inline bool operator==(const struct timespec &r1, const struct timespec &r2)
{
return (r1.tv_sec == r2.tv_sec && r1.tv_nsec == r2.tv_nsec);
}
inline bool operator!=(const struct timespec &r1, const struct timespec &r2)
{
return !(operator==(r1, r2));
}
#endif
......@@ -773,3 +773,4 @@ uint32_t uniset::hash32( const char* buf, size_t sz ) noexcept
{
return NAMESPACE_FOR_HASH_FUNCTIONS::Hash32(buf, sz);
}
// -------------------------------------------------------------------------
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment