Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions include/sisl/grpc/rpc_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*********************************************************************************/
#pragma once

#include <expected>
#include <memory>
#include <string>
#include <chrono>
Expand Down Expand Up @@ -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 > >;
Expand Down Expand Up @@ -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));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/grpc/rpc_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/grpc/tests/function/echo_async_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand Down
Loading