From fbdd8c92e1f21a4f246a870154bf0b2366e76c2f Mon Sep 17 00:00:00 2001 From: ledhed2222 Date: Wed, 3 May 2023 23:25:42 -0400 Subject: [PATCH] fix loading from ledger --- CMakeLists.txt | 3 +++ src/backend/BackendInterface.h | 2 +- src/main/main.cpp | 2 +- src/rpc/RPC.cpp | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc9786257..6befb16ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,9 @@ if(VERBOSE) set(FETCHCONTENT_QUIET FALSE CACHE STRING "Verbose FetchContent()") endif() +#c++20 removed std::result_of but boost 1.75 is still using it. +add_definitions(-DBOOST_ASIO_HAS_STD_INVOKE_RESULT=1) + add_library(clio) target_compile_features(clio PUBLIC cxx_std_20) target_include_directories(clio PUBLIC src) diff --git a/src/backend/BackendInterface.h b/src/backend/BackendInterface.h index 2634650a7..e70d33079 100644 --- a/src/backend/BackendInterface.h +++ b/src/backend/BackendInterface.h @@ -111,7 +111,7 @@ synchronous(F&& f) * R is the currently executing coroutine that is about to get passed. * If corountine types do not match, the current one's type is stored. */ - using R = typename std::result_of::type; + using R = typename boost::result_of::type; if constexpr (!std::is_same::value) { /** diff --git a/src/main/main.cpp b/src/main/main.cpp index 859ff2092..db35b8dd5 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -224,7 +224,7 @@ doMigration( { std::vector toWrite = getNFTDataFromObj( ledgerRange->minSequence, - ripple::to_string(object.key), + std::string(object.key.begin(), object.key.end()), std::string(object.blob.begin(), object.blob.end())); doNFTWrite(toWrite, backend, "OBJ"); } diff --git a/src/rpc/RPC.cpp b/src/rpc/RPC.cpp index 35ae1e731..32e13a986 100644 --- a/src/rpc/RPC.cpp +++ b/src/rpc/RPC.cpp @@ -178,7 +178,7 @@ public: { for (auto const& handler : handlers) { - handlerMap_[handler.method] = move(handler); + handlerMap_[handler.method] = std::move(handler); } }