Support boost 1.76:

* remove unused `std::hash` specialization
* Use `std::chrono::floor` instead of `floor`
This commit is contained in:
seelabs
2021-04-11 17:28:31 -04:00
committed by manojsdoshi
parent fa9ecae2d6
commit 04ff6249d5
6 changed files with 7 additions and 19 deletions

View File

@@ -2202,8 +2202,8 @@ NetworkOPsImp::getServerInfo(bool human, bool admin, bool counters)
info[jss::server_state] = strOperatingMode(admin); info[jss::server_state] = strOperatingMode(admin);
info[jss::time] = to_string( info[jss::time] = to_string(std::chrono::floor<std::chrono::microseconds>(
floor<std::chrono::microseconds>(std::chrono::system_clock::now())); std::chrono::system_clock::now()));
if (needNetworkLedger_) if (needNetworkLedger_)
info[jss::network_ledger] = "waiting"; info[jss::network_ledger] = "waiting";

View File

@@ -238,7 +238,7 @@ public:
auto last = getLastMsgTime(); auto last = getLastMsgTime();
if (last.time_since_epoch().count() != 0) if (last.time_since_epoch().count() != 0)
result["last_message_arrival_time"] = result["last_message_arrival_time"] =
to_string(floor<std::chrono::microseconds>(last)); to_string(std::chrono::floor<std::chrono::microseconds>(last));
return result; return result;
} }

View File

@@ -316,7 +316,8 @@ public:
auto last = getLastPublish(); auto last = getLastPublish();
if (last.time_since_epoch().count() != 0) if (last.time_since_epoch().count() != 0)
result["last_publish_time"] = result["last_publish_time"] =
to_string(floor<std::chrono::microseconds>(getLastPublish())); to_string(std::chrono::floor<std::chrono::microseconds>(
getLastPublish()));
return result; return result;
} }

View File

@@ -288,7 +288,7 @@ PerfLogImp::report()
lastLog_ = present; lastLog_ = present;
Json::Value report(Json::objectValue); Json::Value report(Json::objectValue);
report[jss::time] = to_string(floor<microseconds>(present)); report[jss::time] = to_string(std::chrono::floor<microseconds>(present));
{ {
std::lock_guard lock{counters_.jobsMutex_}; std::lock_guard lock{counters_.jobsMutex_};
report[jss::workers] = report[jss::workers] =

View File

@@ -100,20 +100,6 @@ hash_append(Hasher& h, beast::IP::Address const& addr) noexcept
} }
} // namespace beast } // namespace beast
namespace std {
template <>
struct hash<beast::IP::Address>
{
explicit hash() = default;
std::size_t
operator()(beast::IP::Address const& addr) const
{
return beast::uhash<>{}(addr);
}
};
} // namespace std
namespace boost { namespace boost {
template <> template <>
struct hash<::beast::IP::Address> struct hash<::beast::IP::Address>

View File

@@ -27,6 +27,7 @@
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
#include <vector>
namespace ripple { namespace ripple {
namespace test { namespace test {