diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e7dd527..6f4dbf74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) # turn on folder hierarchies include (cmake/Flags.cmake) -set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD 23) enable_testing() find_package(GTest QUIET REQUIRED) diff --git a/conanfile.py b/conanfile.py index 66043269..63cad7cc 100644 --- a/conanfile.py +++ b/conanfile.py @@ -9,7 +9,7 @@ class SISLConan(ConanFile): name = "sisl" - version = "13.1.0" + version = "13.2.0" homepage = "https://github.com/eBay/sisl" description = "Library for fast data structures, utilities" diff --git a/include/sisl/grpc/rpc_client.hpp b/include/sisl/grpc/rpc_client.hpp index 1b7b3ec2..97be40da 100644 --- a/include/sisl/grpc/rpc_client.hpp +++ b/include/sisl/grpc/rpc_client.hpp @@ -14,6 +14,7 @@ *********************************************************************************/ #pragma once +#include #include #include #include @@ -77,7 +78,7 @@ template < typename ReqT, typename RespT > class ClientRpcDataFuture; template < typename T > -using Result = folly::Expected< T, ::grpc::Status >; +using Result = std::expected< T, ::grpc::Status >; template < typename T > using AsyncResult = folly::SemiFuture< Result< T > >; @@ -162,7 +163,7 @@ class ClientRpcDataFuture : public ClientRpcDataInternal< ReqT, RespT > { if (this->m_status.ok()) { m_promise.setValue(this->m_reply); } else { - m_promise.setValue(folly::makeUnexpected(this->m_status)); + m_promise.setValue(std::unexpected(this->m_status)); } } diff --git a/src/grpc/rpc_client.cpp b/src/grpc/rpc_client.cpp index 68737828..2c0ca54e 100644 --- a/src/grpc/rpc_client.cpp +++ b/src/grpc/rpc_client.cpp @@ -238,7 +238,7 @@ void GenericRpcDataFutureBlob::handle_response([[maybe_unused]] bool ok) { auto future_resp = GenericClientResponse(this->m_reply); m_promise.setValue(std::move(future_resp)); } else { - m_promise.setValue(folly::makeUnexpected(this->m_status)); + m_promise.setValue(std::unexpected(this->m_status)); } } diff --git a/src/grpc/tests/function/echo_async_client.cpp b/src/grpc/tests/function/echo_async_client.cpp index 903b91f1..ede6bffe 100644 --- a/src/grpc/tests/function/echo_async_client.cpp +++ b/src/grpc/tests/function/echo_async_client.cpp @@ -215,7 +215,7 @@ class TestClient { req.set_message(std::to_string(i)); echo_stub->call_unary< EchoRequest, EchoReply >(req, &EchoService::StubInterface::AsyncEcho, 1) .deferValue([req, this](auto e) { - RELEASE_ASSERT(e.hasValue(), "echo request {} failed, status {}: {}", req.message(), + RELEASE_ASSERT(e.has_value(), "echo request {} failed, status {}: {}", req.message(), e.error().error_code(), e.error().error_message()); validate_echo_reply(req, e.value(), grpc::Status::OK); return folly::Unit(); @@ -246,7 +246,7 @@ class TestClient { req.set_seqno(i); ping_stub->call_unary< PingRequest, PingReply >(req, &PingService::StubInterface::AsyncPing, 1) .deferValue([req, this](auto e) { - RELEASE_ASSERT(e.hasValue(), "ping request {} failed, status {}: {}", req.seqno(), + RELEASE_ASSERT(e.has_value(), "ping request {} failed, status {}: {}", req.seqno(), e.error().error_code(), e.error().error_message()); validate_ping_reply(req, e.value(), grpc::Status::OK); return folly::Unit(); @@ -290,7 +290,7 @@ class TestClient { SerializeToByteBuffer(cli_buf, req); generic_stub->call_unary(cli_buf, GENERIC_METHOD, 1) .deferValue([req, this](auto e) { - RELEASE_ASSERT(e.hasValue(), "generic request {} failed, status {}: {}", req.m_seqno, + RELEASE_ASSERT(e.has_value(), "generic request {} failed, status {}: {}", req.m_seqno, e.error().error_code(), e.error().error_message()); validate_generic_reply(req, e.value(), grpc::Status::OK); return folly::Unit(); @@ -305,7 +305,7 @@ class TestClient { SerializeToBlob(cli_buf, req); generic_stub->call_unary(cli_buf, GENERIC_METHOD, 1) .deferValue([req, cli_buf, this](auto e) { - RELEASE_ASSERT(e.hasValue(), "generic request {} failed, status {}: {}", req.m_seqno, + RELEASE_ASSERT(e.has_value(), "generic request {} failed, status {}: {}", req.m_seqno, e.error().error_code(), e.error().error_message()); validate_generic_reply(req, std::move(e.value()), grpc::Status::OK, cli_buf); return folly::Unit();