diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e31da3e..46580ce3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,9 @@ if(PACKAGING) add_definitions(-DPKG=1) 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 7ad6693e..33098249 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/rpc/RPC.cpp b/src/rpc/RPC.cpp index 35ae1e73..32e13a98 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); } } diff --git a/unittests/Backend.cpp b/unittests/Backend.cpp index 69581347..837878a5 100644 --- a/unittests/Backend.cpp +++ b/unittests/Backend.cpp @@ -988,7 +988,6 @@ TEST_F(BackendTest, Basic) Backend::LedgerPage page; std::vector retObjs; - size_t numLoops = 0; do { uint32_t limit = 10; @@ -1000,7 +999,6 @@ TEST_F(BackendTest, Basic) retObjs.end(), page.objects.begin(), page.objects.end()); - ++numLoops; } while (page.cursor); for (auto obj : objs) @@ -2343,7 +2341,6 @@ TEST_F(BackendTest, cacheIntegration) } Backend::LedgerPage page; std::vector retObjs; - size_t numLoops = 0; do { uint32_t limit = 10; @@ -2355,7 +2352,6 @@ TEST_F(BackendTest, cacheIntegration) retObjs.end(), page.objects.begin(), page.objects.end()); - ++numLoops; } while (page.cursor); for (auto obj : objs) { diff --git a/unittests/backend/cassandra/BackendTests.cpp b/unittests/backend/cassandra/BackendTests.cpp index b268d76f..8e1225e6 100644 --- a/unittests/backend/cassandra/BackendTests.cpp +++ b/unittests/backend/cassandra/BackendTests.cpp @@ -893,7 +893,6 @@ TEST_F(BackendCassandraTest, Basic) Backend::LedgerPage page; std::vector retObjs; - size_t numLoops = 0; do { uint32_t limit = 10; @@ -903,7 +902,6 @@ TEST_F(BackendCassandraTest, Basic) retObjs.end(), page.objects.begin(), page.objects.end()); - ++numLoops; } while (page.cursor); for (auto obj : objs) @@ -1544,7 +1542,6 @@ TEST_F(BackendCassandraTest, CacheIntegration) } Backend::LedgerPage page; std::vector retObjs; - size_t numLoops = 0; do { uint32_t limit = 10; @@ -1554,7 +1551,6 @@ TEST_F(BackendCassandraTest, CacheIntegration) retObjs.end(), page.objects.begin(), page.objects.end()); - ++numLoops; } while (page.cursor); for (auto obj : objs) {